Authentication
Open AI Platform -> Setup if you want the fastest path to a working public connection. The setup page gives you the current organizationId, lets you verify auth, and is the easiest way to confirm the released route path.
Public routes use Authorization: Bearer <token>.
Access tokens
Use a user access token for:
access_token_onlyroutes such asPOST /api/agents/:id/run- interactive flows
- any route where API keys are explicitly rejected
API keys
Use an API key for server-to-server calls on public routes marked api_key_or_access_token.
API keys are:
- prefixed
sk_... - org-bound
- scope-limited per route
What to send
- Header:
Authorization: Bearer <accessToken or apiKey> organizationIdin the request query or body, depending on the route
Common auth failures:
AUTH_MISSINGAUTH_INVALID_TOKENAUTH_MODE_INVALIDAUTH_SCOPE_MISSINGAUTH_ORG_MISMATCH