Request
403 usage_scope_violation. Use a workspace key.
The endpoint has a separate limit of 60 reads per minute per key, in addition to the normal per-key request limit. Responses carry Cache-Control: no-store. A rate refusal returns 429 rate_limit_exceeded; follow its retry headers. If the limiter cannot be evaluated, the response is 503 limiter_unavailable.
Response
This example shows a workspace without a coding plan. The identifier and observation time are illustrative.Current plan state
Whencoding_plan.current is present, it has these fields. All are required except resumes_at, serving_until, can_keep, remedy_code and billing_frozen; a required field can still be null where noted. This endpoint always returns them; they are optional only so that older cached snapshots still parse.
Each window has
starts_at, resets_at, used_microcents, limit_microcents, and used_percent. Body timestamps use ISO 8601. Percentages are integers clamped to 0 through 100. A request admitted before a limit can finish beyond it, so retain the exact counters when adding usage.
One cent is 1,000,000 microcents. One US dollar is 100,000,000 microcents. The credits cap after plan limits is separate from the workspace spend cap returned by
/v1/credits.
Response funding headers
Model API responses carry these headers only when a coding plan decision applied to the request. They come from the admission snapshot. A workspace without a plan receives none of them. Uncovered operations, Credits only keys, non-serving plans, and promotional zero-price requests use the ordinary pay-as-you-go path without plan headers.
These are response headers, not controls for selecting how a request is paid. They describe the request’s admission state, not the counters after it finishes. An idempotent replay retains the original funding receipt.
Calculated cost and plan value
On chat completions and Responses,usage.cost reports the calculated charge in US dollars. It is 0 when the plan or Standby paid. usage.runinfra.cost_microcents is the same calculated charge in integer microcents.
This illustrative usage fragment shows a request with a list value of 294,000 microcents paid by the plan:
usage.runinfra.plan_value_microcents is the usage value counted at the applicable per-token rates. usage.runinfra.paid_from is plan or standby. Both fields are added only when the plan or Standby paid. A credit-funded response retains the ordinary cost fields; use x-runinfra-funding when present to identify credits after plan limits.
The calculated charge is not the final whole-cent credit debit for an individual request. Credit settlement carries fractional cents between requests, and the balance’s debt floor can limit a debit. See request cost and cached input for streaming and replay details.
Plan limit errors and Messages
When the plan is at a limit and neither credits nor Standby can serve the request, the OpenAI-compatible envelope returns402 plan_limit_reached. Its fields include the blocking window, reset time, standby_blocker, credit blocker, and a next step. It carries x-should-retry: false and no Retry-After. See the complete error example.
The Anthropic-compatible /v1/messages error envelope keeps error.type: "billing_error" and the message text, plus request_id. It does not preserve error.code, window fields, standby_blocker, or fixes. The message therefore states the product, blocking limit, reset time, Standby condition, and next step with its Billing URL.
The Messages success envelope reports token counts and does not expose usage.cost or usage.runinfra. Read its funding headers and use this endpoint for current plan state. See Anthropic Messages.