Implementation vs Documentation
This guide only covers how to document your security requirements in OpenAPI. To implement the actual authentication logic, see How to add custom authentication.
Default Schema
The default security scheme varies by deployment type:x-api-key
header:
Custom Security Schema
To customize the security schema in your OpenAPI documentation, add anopenapi
field to your auth
configuration in langgraph.json
. Remember that this only updates the API documentation - you must also implement the corresponding authentication logic as shown in How to add custom authentication.
Note that LangGraph Platform does not provide authentication endpoints - you’ll need to handle user authentication in your client application and pass the resulting credentials to the LangGraph API.
Testing
After updating your configuration:- Deploy your application
- Visit
/docs
to see the updated OpenAPI documentation - Try out the endpoints using credentials from your authentication server (make sure you’ve implemented the authentication logic first)