Skip to main content
GET
cURL
Baseten began recording Model APIs usage on August 5, 2026, at 20:45 UTC (2026-08-05T20:45:00Z). Baseten did not backfill earlier usage.
For daily costs in USD, see Get Model APIs costs. 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

start_time
string<date-time> | null

Start of the query range (ISO 8601, UTC), inclusive. Snapped down to the start of its bucket. Required on the first page, and ignored when you pass a cursor.

end_time
string<date-time> | null

End of the query range (ISO 8601, UTC), exclusive. Defaults to the current time.

bucket_width
enum<string>
default:1d

Width of each time bucket: 1m, 1h, or 1d. Defaults to 1d.

Available options:
1m,
1h,
1d
group_by
enum<string>[]

Dimensions to break usage down by, repeated once per dimension: api_key, user, model. Defaults to model.

Available options:
api_key,
user,
model
api_keys
string[]

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

user_ids
string[]

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

models
string[]

Return only usage for these models, repeated once per model.

limit
integer | null

Number of time buckets to return. Defaults and maximums depend on bucket_width: 1d defaults to 7 and allows 31, 1h defaults to 24 and allows 168, 1m defaults to 60 and allows 1440.

cursor
string | null

Opaque cursor from the pagination.cursor field of a previous response

Response

200 - application/json

A page of Model APIs token usage: contiguous time buckets, ordered oldest first.

items
ModelApisUsageBucketV1 · object[]
required

Items in this page.

pagination
PaginationResponseV1 · object
required

Pagination metadata for the page.