Get route usage
Gets daily route usage and estimated costs.
Authorizations
Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.
Query Parameters
Opaque cursor returned by a previous page. Omit to fetch the first page.
Number of daily buckets to return. Defaults to 7; maximum 31.
1 <= x <= 31Inclusive UTC calendar day at the start of the query range. Defaults to the previous UTC date, and is ignored when you pass a cursor.
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.
Dimensions to break usage down by, repeated once per dimension: API_KEY_PREFIX, USER, ROUTE, MODEL, or PROVIDER. Each result represents one observed combination of the requested dimensions within that day, and results are sorted by those values. Combinations without usage are omitted, so result counts can differ between days. Defaults to MODEL.
API_KEY_PREFIX, USER, ROUTE, MODEL, PROVIDER Return only usage for these exact Routes key prefixes, repeated once per prefix.
Return only usage from Routes keys created by these user IDs, repeated once per ID.
Return only usage for these route IDs, repeated once per ID.
Return only usage for these exact model names, repeated once per model.
Return only usage for these providers, repeated once per provider.
Upstream provider of a route target, named like the route target types.
BASETEN_MODEL_API, OPENAI, ANTHROPIC, XAI, VERTEX, OPENAI_COMPATIBLE