Get Project Usage
Spend totals for one project over a date range, plus a per-model breakdown. Totals are by day; the per-model breakdown is by month and covers the whole months the range overlaps.
Authentication
A management key (mgmt_...), sent as Authorization: Bearer <key>. Reading /v1/routing-policies also accepts the organization’s gateway API keys; writing there needs a management key.
Path parameters
The project’s id.
Query parameters
First day of the range, YYYY-MM-DD, inclusive. Defaults to the 1st of this month.
Last day of the range, YYYY-MM-DD, inclusive. Defaults to today.
Response
Spend on your own provider credentials (BYOK), at list price, USD.
Last day of the range, inclusive, YYYY-MM-DD.
Spend on Merge-managed credentials, USD.
Spend in USD per provider/model, with BYOK spend at list price. Covers the whole months the range overlaps. Months before per-project model tracking began have totals but no entries here.
model_spend covers the whole months overlapping start to end.
First day of the range, YYYY-MM-DD.
Server-side web search cost, USD.