Skip to main content
GET
cURL
Cost data starts on August 5, 2026, at 20:45 UTC. The August 5 bucket includes only usage after that time. The API rejects an earlier start_date.
For token and request totals, see Get Model APIs usage. For examples and billing details, see Pricing and limits.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Query Parameters

cursor
string | null

Opaque cursor returned by a previous page. Omit to fetch the first page.

limit
integer
default:7

Number of daily cost buckets to return. Defaults to 7; maximum 31.

Required range: 1 <= x <= 31
start_date
string<date> | null

Inclusive UTC calendar day at the start of the query range. Defaults to the previous UTC date, cannot be before 2026-08-05, and is ignored when you pass a cursor.

end_date
string<date> | null

Exclusive UTC calendar day at the end of the query range. Defaults to the day after the current UTC date so current-day usage is included. The date range cannot exceed 90 days.

group_by
enum<string>[]

Dimensions to break costs down by, repeated once per dimension: api_key_prefix, user, model, or service_tier. Each result represents one observed combination of the requested dimensions within that day. For example, grouping by api_key_prefix and user returns each API-key and user pair that had usage. Combinations without usage are omitted, so result counts can differ between days. Omit for daily organization totals.

Available options:
api_key_prefix,
user,
model,
service_tier
api_key_prefixes
string[]

Return only costs for these exact API key prefixes, repeated once per prefix.

user_ids
string[]

Return only costs attributed to these exact user IDs, repeated once per ID.

models
string[]

Return only costs for these exact model identifiers, repeated once per model.

service_tiers
string[]

Return only costs for these exact service tiers, repeated once per tier.

Response

200 - application/json

One non-overlapping bucket per UTC day, ordered oldest first with no gaps.

Days without matching usage are included with an empty results list.

items
ModelApisCostBucketV1 · object[]
required

Items in this page.

pagination
PaginationResponseV1 · object
required

Pagination metadata for the page.