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_idstringRequiredformat: "uuid"

Query parameters

startdateOptional

YYYY-MM-DD, inclusive. Defaults to the start of the current month.

enddateOptional

YYYY-MM-DD, inclusive. Defaults to today.

Response

Project spend for the range.
project_idstringformat: "uuid"
merge_hosted_spenddouble

Managed-credential spend, USD.

byok_spenddouble

BYOK usage at list price, USD (raw vendor cost is $0 for unpriced customer vendors).

web_search_spenddouble

Server-side web search cost, USD.

total_spenddouble
request_countinteger
model_spendmap from strings to doubles

Per-model spend, BYOK-corrected, month-granular. Accrues from when per-project model tracking deployed.

model_spend_granularityenum
startdate
enddate

Errors

400
Bad Request Error
404
Not Found Error