Authentication
All API requests require authentication via a Bearer token in the Authorization header.
Bearer Token
Include your API key in the Authorization header of every request.
Language Examples
Organization Context
If you belong to multiple organizations, pass the X-Org-Id header to select the context.
Token Format
API keys are prefixed with sk-org-. The full secret is shown only once, at creation — store it securely. List and revoke endpoints only ever return the key prefix, never the secret.
Scopes
Every key carries a list of scopes, enforced per endpoint. If a key is missing the scope an endpoint requires, the request fails with 403 AUTH_PERMISSION_DENIED. A key with the admin scope bypasses every per-scope check. New keys default to write:tools when no scopes are specified.
| Scope | Grants |
|---|---|
read:tools | Read tool and connector metadata |
write:tools | Execute tools and connectors |
read:data | Read your organization's data |
chat | Call the OpenAI-compatible /v1/chat/completions endpoint |
connector:gateway | Direct connector gateway access |
admin | Full access — bypasses per-scope checks |
Managing API Keys
Keys are issued, listed, and revoked per organization. Each key expires after expires_in_days (default 90, range 1–365).
Authentication Errors
An invalid or expired token results in a 401 response.