Integrations
FastAPI
Chainlit can be mounted as a FastAPI sub application.
my_cl_app
main
In the example above, we have a FastAPI application with a single endpoint /app
. We mount the Chainlit application my_cl_app.py
to the /chainlit
path.
Start the FastAPI server:
When using FastAPI integration, header authentication is the preferred method for authenticating users. This approach allows Chainlit to delegate the authentication process to the parent FastAPI application, providing a more seamless and secure integration.
Was this page helpful?