Get project usage
Day-granular spend totals for one project, plus a month-granular per-model breakdown. Requires the read_usage scope.
Authentication
AuthorizationBearer
A management key (prefixed mgmt_), created in the dashboard under Settings, API keys, Management keys. Distinct from a regular gateway API key, and never used to call models.
Path parameters
project_id
Query parameters
start
YYYY-MM-DD, inclusive. Defaults to the start of the current month.
end
YYYY-MM-DD, inclusive. Defaults to today.
Response
Project spend for the range.
project_id
merge_hosted_spend
Managed-credential spend, USD.
byok_spend
BYOK usage at list price, USD (raw vendor cost is $0 for unpriced customer vendors).
web_search_spend
Server-side web search cost, USD.
total_spend
request_count
model_spend
Per-model spend, BYOK-corrected, month-granular. Accrues from when per-project model tracking deployed.
model_spend_granularity
start
end
Errors
400
Bad Request Error
404
Not Found Error