Skip to main content
We put no money ceiling on your own provider keys. Managed Keys spends a prepaid balance, so it can run out.

What Managed Keys can run out of

  • The balance. The money you prepaid. At zero you get 402 insufficient_balance until you add funds.
  • The daily spending limit. It counts what you spent today plus what your in-flight requests hold, over a UTC day. Past it you get 429 spend_velocity_exceeded until the day rolls over.
A risk review can pause managed requests on top of those two. That’s 403 account_under_review. Your own key routes keep working through all of it.

Two headers report your spend

  • x-flexinference-spend-remaining says unlimited when no money ceiling applies. Otherwise it’s a signed micro-USD number. It’s the smaller of your balance and what’s left of today’s limit.
  • x-flexinference-spend-as-of is when we read that number, in epoch milliseconds.
A negative number means we’re turning away managed requests until you add money.

The limits endpoint

Call GET /v1/limits with your key. It lists every ceiling on your organization, spending and usage alike.
Every money field is a micro-USD number, and one USD is a million of them. as_of is epoch milliseconds.
  • managed comes back null when no provider runs on Managed Keys.
  • managed.serving reads ok or paused. When paused, paused_reason carries the matching error code from the errors page.
  • managed.binding names the ceiling closest to stopping you (balance or daily_spend, with paused and exempt for the special cases).
  • managed.spend_remaining_micro_usd matches the x-flexinference-spend-remaining header.
  • managed.balance.remaining_micro_usd adds cash and credit together. reserved_micro_usd is money your in-flight requests hold, and we don’t subtract it.
  • managed.ramp_week says which week of the account-age schedule you’re in, and ramp_defaults is what that week gives you. override_in_force means an admin set a number by hand, so the schedule won’t move it.
  • A limit of null in abuse_limits.rates means the number isn’t published. Back off for Retry-After.
When we can’t read one of these records, you get 503 limits_unavailable. Requests keep working.