Skip to main content
GET
Report token usage

Authorizations

Authorization
string
header
required

Organization Admin API key with an appropriate scope. Customer keys cannot call organization routes.

Query Parameters

start_time
integer
required

Report start as Unix seconds (inclusive).

Required range: x >= 0
end_time
integer | null

Report end as Unix seconds (exclusive); defaults to the current time.

Required range: x >= 0
bucket_width
enum<string>
default:1d

Length of each UTC usage bucket.

Available options:
1m,
1h,
1d
project_ids
string[] | null

Filter to project IDs within your organization. Repeat this query parameter or use comma-separated IDs.

Maximum array length: 100
api_key_ids
string[] | null

Filter to customer key IDs. Repeat this parameter or use comma-separated IDs.

Maximum array length: 100
models
string[] | null

Filter to exact model IDs.

Maximum array length: 100
group_by
string[] | null

Bucket dimensions. Usage: project_id, api_key_id, model. Costs: project_id, api_key_id, line_item.

Maximum array length: 3
limit
integer
default:7

Maximum records or time buckets to return.

Required range: 1 <= x <= 1440
page
string | null

Opaque next_page value from the previous report response. Keep the original report filters.

Required string length: 1 - 500

Response

Successful response.

data
object[]
required
has_more
boolean
required
object
string
default:page
Allowed value: "page"
next_page
string | null