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_only routes such as POST /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>
  • organizationId in the request query or body, depending on the route

Common auth failures:

  • AUTH_MISSING
  • AUTH_INVALID_TOKEN
  • AUTH_MODE_INVALID
  • AUTH_SCOPE_MISSING
  • AUTH_ORG_MISMATCH

See also

Was this page helpful?