All API requests require authentication using a Bearer token.
API Keys
API keys are prefixed with ak_ and can be created in your dashboard.
Keep your API key secret. Do not share it or commit it to version control.
Use your API key
Include your API key in the Authorization header:
SDK Authentication
Environment Variables
Set your API key as an environment variable for security:
Then use the SDK without passing the key directly:
Error Responses
| Status | Code | Description |
|---|
| 401 | invalid_api_key | API key is invalid or missing |
Authentication summary
| Category | Auth method | Token prefix |
|---|
API key endpoints (/v1/chat/completions, /v1/responses, /v1/messages, /v1/models, /v1/me) | API key | ak_ |
Workspace management (/v1/workspaces/{workspace_id}/*) | API key + scopes | ak_ |
Public catalog (/v1/registry/*, /v1/directory/*, /v1/byok/providers*) | None required | — |