Get Organization Usage
Organization-wide spend for a date range: totals by day, a per-model breakdown by month, and optionally a breakdown by project, API key or vendor.
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.
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.
model_spend and vendors cover the whole months overlapping start to end.
First day of the range, YYYY-MM-DD.
Server-side web search cost, USD.
Spend per API key. Present with group_by=api_key.
Spend per project. Present with group_by=project.
Spend in USD per serving vendor, by month like model_spend. Present with group_by=vendor.