Limits and remaining credit for the calling key
Returns the calling key’s configured limits and credit state: rate
limits (RPM/TPM), cumulative spend, budget ceiling, and remaining
budget — so a client can distinguish “the model is unhealthy” from
“I’m rate-limited / out of credits” without admin access. The key in
the Authorization header sees only itself.
This endpoint is budget-exempt: it keeps answering when the key is out of credits (that is exactly when you need it). Inference endpoints remain fully budget-gated.
remaining_budget_usd is the same value the gateway’s 402
insufficient_balance check enforces, floored at 0. rate_limit
reports the key’s configured limits — the same values the
x-ratelimit-* headers on inference responses advertise; for live
headroom in the current window, read x-ratelimit-remaining-* from
those headers.
Authorizations
Virtual API key. Create one from the
FlexAI dashboard. Pass as
Authorization: Bearer sk-xxxx.
Response
Successful response
key USD Masked display name ("sk-...abcd"); never the full key.
Budget ceiling for this key; null when no per-key ceiling is configured.
max_budget_usd - spend_usd, floored at 0; null when max_budget_usd is null.
When this key expires; null means it never expires.