API Authentication
Flux uses two authentication mechanisms depending on which API surface you're accessing.
Frontend API (Internal)
The frontend communicates with the backend through Next.js API routes that proxy requests to the Python backend. These routes automatically attach the X-Clerk-User-Id header from the authenticated Clerk session. No additional configuration is needed for frontend use.
Platform API
The public Platform API at /api/v1/* uses Bearer token authentication. API keys use the flx_ prefix and are passed in the Authorization header:
Authorization: Bearer flx_your_api_key_here
Obtaining an API Key
API keys can be generated from your account settings in the Flux dashboard. Each key is scoped to your account and has access to all your workflows and agents.
Rate Limits
The Platform API enforces rate limits to ensure fair usage. Current limits are documented in the response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per window |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the window resets |