Cost report
What model calls cost over time, by provider and model: one row per bucket, provider and model. It is cost alone, so it counts every cost recorded in the range, whether or not a run has revenue. For margin, use the margin report, which has no time axis. Costs are the ones recorded with trace() and POST /v1/costs.
Costs are in one currency. Send currency, or leave it out when every cost in the range is in one. If they are in more than one, the call returns 400 with parameter_invalid on currency.
Authentication
A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.
Query parameters
The bucket size, in UTC (a week starts on Monday). Default month.
Only costs from this model provider, such as anthropic.
Report in this currency (lowercase ISO 4217). Needed when the costs are in more than one.
Response
Oldest bucket first, and the highest cost first within a bucket.