Get usage and cost over a date range
Returns everything a usage page needs in one answer: totals for the range, a time series in hour or day buckets, per-model figures (cost, error rate, latency, how often a call fell back to another provider and why, the share of input read from cache), per-key totals, and sandbox figures (counts by status, running time and cost per provider, GPU time per GPU class, create time).
from is included and to is excluded. Both are UTC: a date (2026-11-24) or an
RFC 3339 time. Left out, the range is the 7 days that end now. With
bucket=hour the range may cover 31 days, with bucket=day 366 days.
group_by splits the series by one field. totals, by_model, by_key and
sandboxes do not depend on it. Sandboxes have no model. With group_by=model
the series holds model calls only, and totals still includes sandboxes. With a
model filter every section holds model calls only.
A key with the admin scope sees the whole account. Any other key sees its own
usage only, as if key_id were set to it.
Cost fields are US dollars. See the Usage tag for what a cost is and when it is
null. OpenAI’s analogue is GET /v1/organization/usage/completions with
GET /v1/organization/costs, and OpenRouter’s is its Activity page.
Scope: any. Whole-account figures need admin.
Authentication
A Meadow API key, sent as Authorization: Bearer mdw_.... The header
x-api-key: mdw_... is accepted in its place.
Query parameters
Start of the range, included. A UTC date or an RFC 3339 time. Defaults to 7 days before to.
Width of one point of series.
Splits series by this field. none gives one point per bucket.
Count only this key. A key without the admin scope may pass only its own id.
Count only this provider, for example anthropic or daytona.
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
Always usage.
The currency of every cost field. Always USD.
Per-model figures for the range, highest cost first. At most 200.
Per-key totals for the range, highest cost first. At most 50.