Overview
Flowise supports two authentication methods:- API Keys - For programmatic access to predictions and vector operations
- JWT Tokens - For authenticated admin operations on chatflows, credentials, and tools
API Key Authentication
API keys are used to authenticate requests to public-facing endpoints like predictions and vector upsert operations.Creating an API Key
Create an API key through the Flowise UI or via the API:Using API Keys
Include the API key in theAuthorization header as a Bearer token:
API Key Permissions
API keys support granular permissions:chatflows:create- Create new chatflowschatflows:read/chatflows:view- Read chatflow datachatflows:update- Update chatflowschatflows:delete- Delete chatflowspredictions:create- Execute predictionscredentials:create- Create credentialscredentials:view- View credentialscredentials:update- Update credentialscredentials:delete- Delete credentialstools:create- Create toolstools:view- View toolstools:update- Update toolstools:delete- Delete tools
Chatflow-Specific API Keys
You can bind an API key to a specific chatflow by setting theapikeyid field on the chatflow. When configured, only requests with that API key can access the chatflow.
JWT Token Authentication
JWT tokens are used for authenticated admin operations. Tokens are obtained through the login process and should be included in the Authorization header.Obtaining a JWT Token
Login through the authentication endpoint:Using JWT Tokens
Include the JWT token in the Authorization header:Token Refresh
JWT tokens expire after a set period. Use the refresh token to obtain a new access token:Managing API Keys
List All API Keys
Update an API Key
Delete an API Key
Verify an API Key
Security Best Practices
Store API Keys Securely
Store API Keys Securely
Never commit API keys to version control. Use environment variables or secure secret management systems.
Use Different Keys for Different Environments
Use Different Keys for Different Environments
Create separate API keys for development, staging, and production environments.
Apply Principle of Least Privilege
Apply Principle of Least Privilege
Grant only the minimum permissions required for each API key.
Rotate Keys Regularly
Rotate Keys Regularly
Periodically delete old keys and create new ones to limit exposure from potential compromises.
Monitor API Key Usage
Monitor API Key Usage
Track which keys are being used and revoke any that show suspicious activity.
Workspace Isolation
API keys and JWT tokens are scoped to workspaces. Each request is validated against the workspace associated with the API key or authenticated user. This ensures data isolation between different workspaces.Public vs Authenticated Endpoints
Some endpoints are public and only require API key authentication:POST /api/v1/prediction/:id- Execute predictionsPOST /api/v1/vector/upsert/:id- Upsert vectorsGET /api/v1/public-chatflows/:id- Get public chatflow
- All chatflow management endpoints
- All credential management endpoints
- All tool management endpoints
- API key management endpoints