Plans
Token and concurrency allowances are subject to change, so read the live values from the API (below) rather than hard-coding the numbers in your integration.
Token usage
Tokens are consumed by the model as your agents run, and they accrue against your plan’s per-period allowance. When the allowance runs out, creating a session (or messaging a finished one, which restarts it) fails with402 Payment Required. The error’s detail carries your limit, used, and the window_end when the budget resets; see Errors.
Check your current token usage with GET /api/v2/quota/tokens:
Response
Concurrent sessions
Separately from tokens, your plan caps how many sessions can run at once. A session holds a slot while it is in a non-terminal state (pending, running, awaiting_tool_results, paused, or idle) and frees it as soon as it reaches a terminal state, including when you cancel it. queued sessions hold no slot and never count against your quota.
GET /api/v2/sessions/quota returns your current concurrency usage:
Response
queued and the session starts automatically when a slot frees up. If you prefer an immediate error, set queue: false on the create body to get a 429 Too Many Requests instead; the SDKs retry 429 with backoff automatically, see Errors.