Get cost by model
Aggregates spend by model over a time range, priced in the cluster currency from the model price book. Org-scoped: org admins see their org; cluster admins may pass org_id. Includes billable work with no usage row of its own (store=false responses, agent tool calls), so totals cover all LLM spend. Platform-wide, cross-service cost reporting lives in the budgeting API (/api/v1/budgeting/usage/costs).
Authorizations
Send Authorization: Bearer , using an MKA1 API key for automation or an OAuth API access token for a signed-in application. Use a dynamic security callback to refresh OAuth access tokens. Browser session-only operations still require their declared cookie.
Headers
Optional external end-user identifier forwarded by the API gateway.
Query Parameters
Unix timestamp, inclusive
0 <= x <= 9007199254740991Unix timestamp, exclusive
0 <= x <= 9007199254740991Cluster admins only: org whose costs to report (defaults to caller's org)
Group cost by model / api_key_id (tenant key) / team_id (sub-tenant within an org) / external_user_id (caller-supplied end user, X-On-Behalf-Of, for resale chargeback) / org_id
model, api_key_id, team_id, external_user_id, org_id Response
OK
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991model, api_key_id, team_id, external_user_id, org_id Total cost in integer NANO-units (1e9 per major unit, NOT cents); use total_cost for the major amount.