Read the budget of one project
Returns the budget of one project with what was spent in its current
window. Returns 404 budget_not_found when none is set.
Scope: admin.
Authentication
A Meadow API key, sent as Authorization: Bearer mdw_.... The header
x-api-key: mdw_... is accepted in its place.
Path parameters
Response headers
Meadow’s id for this request, req_ and 24 hex characters. Every response
carries it, including errors, streams and unknown routes. Every error in the
Error schema repeats it as request_id. Quote it when you report a problem.
Response
The amount to watch in one window, in US dollars. The name is the one on OpenRouter budgets. A plain JSON number above 0 and below 10^12 with at most 12 decimal places, read as written.
The window. daily starts at midnight UTC, weekly on Monday at midnight UTC, monthly on the first of the month at midnight UTC: the clock of limit_reset on keys.
The budget id (bud_...).
Always budget.
What was spent in the current window, from the usage records: model calls and sandboxes with a known cost. The name is OpenRouter’s.
limit_usd minus spend_usd. It can be negative: an alert-only budget does not stop spend, and one call may end above a hard limit.
Records in the window with no cost: calls on a provider Meadow has no price for, calls with estimated tokens, sandboxes with no price. When this is above 0, spend_usd is lower than what you were billed.
False, the default: the budget only alerts and never refuses a call. True
makes limit_usd a ceiling for the window. Once the dollars counted for the
budget reach it, model calls and sandbox creates in its scope are refused
with 402 budget_exceeded, and a call whose reserved estimate does not fit
what is left is refused the same way. A key in the scope of a hard budget is
held to the rules of a key with a dollar limit: a model call must send an
output cap, and a route that includes a provider with no price is refused
with 403 key_spend_price_unknown.
When it is switched on, the count starts at the window’s spend_usd so
far. Sandboxes that are running keep running. Left out of a PUT, it is
false: a PUT replaces the whole budget.
Percentages of limit_usd that send an alert when spend first reaches them. Whole numbers from 1 to 100, no repeats. Left out, [50, 75, 100]. An empty list sends no alerts.
The dollars counted against a budget with hard_limit in the current window: the number the 402 is decided on. Null when hard_limit is false. It can be above spend_usd: a call whose cost could not be measured is counted at the estimate that was held for it, and the usage records arrive a little later than the count.