402 insufficient_credits. This endpoint reads that balance up front, so an agent can pre-flight a long run, a gateway can decide when to top up, and a dashboard of your own can show the number without scraping a 402.
It is read-only and charges nothing. It is authenticated and rate-limited like every other endpoint, and the response is never served from an HTTP cache.
Request
Response
Every amount is an integer in US cents. Nothing here is a dollar float, because the ledger stores cents and a float would be the first rounding in the chain.
What decides whether a request runs
An inference request is admitted againstavailable_cents. Holds for requests already in flight are already taken out of that number, so a long request on a thin balance can show a small available_cents and a positive held_cents at the same time; when the request settles, the unused part of its hold returns to the balance.
The spend cap does not enter this decision. It bounds new optimization, benchmark and deployment work, never inference, which is why gates_inference is always false.
A refused request answers 402 with code: "insufficient_credits" and details.current_balance_cents, the same balance this endpoint reports, plus a topup_url. See Errors.
Who can read it
A workspace API key: the ordinary key created in Settings with no deployment or endpoint scope. A key that can spend the balance can read it, because the number is already disclosed to that key inside every402 it earns.
A key scoped to a single deployment or endpoint is refused with 403 credits_scope_violation. Those keys are the shape you hand to your own customers, and they do not get your workspace’s finances. Adding funds, changing the plan and reading invoices stay with the account owner in the dashboard; there is no write surface here.
Freshness and limits
The response carriesCache-Control: no-store and is read from the ledger on every call. Use as_of rather than your own clock when you compare two reads.
Every read costs several ledger statements, so on top of your plan’s per-key rate limit this endpoint has its own allowance of 60 reads a minute per key. Poll it when you need a decision, not on a timer. The x-ratelimit-* headers on the response describe the plan bucket, so a boot-time read here also tells you your remaining request quota.