Authentication

PromptOrchestraClientOptions:

  • accessToken - user access token (JWT)
  • apiKey - API key (sk_...)

resolveAuthToken behavior:

  • if route is access_token_only: requires accessToken
  • if route is api_key_only: requires apiKey
  • if route is api_key_or_access_token: uses accessToken when provided, otherwise apiKey

If accessToken is provided, the SDK always uses it and does not fall back to apiKey after request failure.

See also

Was this page helpful?