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 <= 31Limit usage to a team you can access. Organization admins can view all usage in the team, team admins can view usage in teams they manage, and other members can view only their own usage. Without a team, organization admins see all organization usage, team admins see their managed teams, and other members see their own usage.
Inclusive 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: USER, TEAM, MODEL, PROVIDER, or ROUTER. 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. ROUTER returns only usage sent through an intelligent router, one row per router, or per router and model with MODEL. Router rows repeat usage already counted in other groupings, so don't add them to model totals. Defaults to MODEL.
USER, TEAM, MODEL, PROVIDER, ROUTER Return only usage from Routes keys created by these user 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