Skip to main content

Endpoint

The organization comes from the API key, so a key can read only its own organization’s usage. The report covers every successful execution in the organization, including executions made without an API key, so totals match what the organization is billed.

Authentication

Pass a standard API key as a Bearer token:

Query Parameters

The totals (total_requests, total_spend_usd) cover only the usage that matches api_key_id and api_key_kind. Use start_date and end_date for the date range. The report refuses from and to with a 400 that names the right parameters, so a request never silently returns the default range. The range may span at most 731 days, or 92 days with bucket=day; use bucket=month for longer ranges. end_date must not be before start_date after capping. A report with more than 50,000 rows is rejected; narrow the date range or use a coarser bucket or grouping.

Code Examples

Response

Response Fields

Each row contains: USD amounts are rounded to six decimal places, so sub-cent prices are preserved. Each row is rounded independently, so the sum of spend_usd can differ from total_spend_usd in the last decimal place.

Rate Limit

The endpoint allows 1 request per second with burst 3, keyed by the authenticated organization in each api-service process. This is a process-local load guard, not a fleet-wide organizational quota. A rejected request returns 429 Too Many Requests with Retry-After: 1.

Error Responses

Last modified on November 27, 2026