Read the calling key's spend limit and spend
https://api.stav.ai/v1/keyThe spend limit and spend of the API key that makes the call, in
OpenRouter's /api/v1/key shape. A key sees only itself: never the
workspace's credit balance, and never another key's limits.
Amounts are in your workspace's currency (stav_currency), not
USD. usage is this calendar month's spend (UTC), not the key's
lifetime spend. limit is the key's hard spend cap with the least
left (a key can have a daily and a monthly one) and limit_reset
its period; a soft cap never blocks, so it is not listed. With no
hard cap, limit and limit_remaining are null. Spend is read
from the same figures the spend cap is enforced on, up to 30
seconds old. A key's spend cap is a hard cap set on that key (MCP
tool budget_set, scope_type key). Any inference scope may
call it.
With currency, the amounts are in that currency at the day's ECB
rate, for a client that counts in it, and stav_billing keeps the
exact figures in your workspace's currency. The cap is enforced in
your workspace's currency. This converts at the ECB rate itself;
prices on GET /v1/models?currency= come from the day's sell
tariff in that currency, which includes Stav's exchange margin, so
the two can differ by up to that margin.
Query-parametre
currencystringShow prices and amounts in this currency, for a client that counts in it: one of the currencies
GET /v1/public/currencieslists, or your workspace's own currency. Any other code is a 400. A request is still charged in your workspace's currency. OnGET /v1/models, applies with a key and is ignored without one;stav_image_optionsprices follow it too.
Fejl
| Status | Hvornår |
|---|---|
| 400 |
|
| 401 | Missing or invalid API key. |
| 429 | Per-key or per-IP rate limit exceeded. |
Alle fejlkoder, hvad de betyder, og hvad du skal gøre: Fejl.