Durable Agent Sessions use three credential types.
Org API key
Your account key. Use it server-side for all management calls — creating agents, starting sessions, registering webhooks, managing credentials.
Never ship the org API key to a browser or mobile client — it can do anything on your account. Use a client token instead.
Client tokens
A session-scoped, short-lived token with read + steer scope — safe to hand to a front-end. It can stream and steer one session and nothing else.
You get one back from POST /v3/sessions, and can mint more:
Browser pattern: your backend creates the session with the org key, then hands the client_token to the browser, which uses it directly for the SSE stream and steer calls.
A client token isn’t free to hand out: each
steer starts a turn, which
consumes tokens on your model key for the session it’s scoped to. Mint short-lived tokens, and rely on the session’s
limits (
tokens/
turn_seconds/
turns) to cap exposure.
For the SSE stream the browser passes the client token as ?token= (native EventSource can’t set an Authorization header); other calls use the Authorization header normally.
Model credentials
Sessions run the model either Managed — via OpenComputer, billed to your credits, with no key (the default for new orgs) — or on your own provider key (Anthropic for the claude runtime, OpenAI for codex). A bring-your-own key is stored at rest in a dedicated secrets vault (Infisical), write-only, and never returned by the API. The real key never enters a sandbox: the runtime gets an opaque placeholder, and a secret-store egress proxy swaps in the real value in flight, only on the outbound HTTPS call to the provider. A key isn’t required — Managed needs none; a session fails to start (422 no_credential) only when it resolves to neither Managed nor a usable key.
For Managed, set an agent’s credential to "managed" (or rely on the org default) — nothing to add. For BYO, the quickest way to add a key is inline when you create an agent ("key": "…"). To reuse a key across agents, set an org default, or rotate/remove keys, see the dedicated Credentials page.