Llm
Get token usage metrics
Return current-month token totals and per-model token timeseries for the tenant.
post/llm/tokens
Query parameters
cookie_namestring nullable
tenant_idinteger
Request body
Example request
{
"granularity": "monthly",
"date_start": "2026-01-01T00:00:00Z",
"date_end": "2026-01-31T23:59:59Z"
}Response
Successful Response
Example response
{
"total_prompt_tokens": 80000,
"total_completion_tokens": 40000,
"total_requests": 420,
"total_tokens": 120000,
"tokens_per_model": [
{
"llm_model": "gpt-4o",
"duration": "monthly",
"total_tokens_count": 12345,
"prompt_token_count": 8000,
"completion_token_count": 4345,
"total_requests": 42
}
],
"timeseries_per_model": [
{
"llm_model": "gpt-4o",
"timeseries": {
"TotalTokens": [
{
"date": "2026-01-15",
"value": 1234
}
]
}
}
]
}