GET /v1/usage — Account-wide rollup
Query params
Response
cost_micros is in micro-dollars (1,000,000 = $1.00).
GET /v1/keys/:keyId/usage — Single-key drilldown
Response
events is the most recent 100 requests. Pagination is on the roadmap.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Per-key + per-model spending rollup. Requires master (admin) scope.
curl https://api.qlaud.ai/v1/usage -H "x-api-key: $QLAUD_MASTER_KEY"
| Param | Type | Default | Description |
|---|---|---|---|
from_ms | number | start of current calendar month (UTC) | Range start, milliseconds |
to_ms | number | now | Range end, milliseconds |
{
"from_ms": 1746124800000,
"to_ms": 1746518400000,
"total_cost_micros": 7340000,
"total_input_tokens": 142000,
"total_output_tokens": 68000,
"request_count": 312,
"by_key": [
{
"key_id": "0e2c3a91-...",
"key_name": "user_42",
"key_prefix": "qlk_live_a1b2…wxyz",
"cost_micros": 2347000,
"input_tokens": 41000,
"output_tokens": 22000,
"request_count": 84
}
],
"by_model": [
{
"model_slug": "claude-sonnet-4-6",
"provider_slug": "anthropic",
"cost_micros": 4900000,
"input_tokens": 95000,
"output_tokens": 38000,
"request_count": 200
}
]
}
cost_micros is in micro-dollars (1,000,000 = $1.00).
curl https://api.qlaud.ai/v1/keys/<key_id>/usage \
-H "x-api-key: $QLAUD_MASTER_KEY"
{
"key_id": "0e2c3a91-...",
"key_name": "user_42",
"key_prefix": "qlk_live_a1b2…wxyz",
"max_spend_micros": 5000000,
"from_ms": 1746124800000,
"to_ms": 1746518400000,
"total_cost_micros": 2347000,
"events": [
{
"id": "...",
"model_slug": "claude-sonnet-4-6",
"provider_slug": "anthropic",
"surface": "messages",
"input_tokens": 1024,
"output_tokens": 512,
"cost_micros": 28800,
"latency_ms": 1840,
"status": 200,
"created_at": 1746518100000
}
]
}
events is the most recent 100 requests. Pagination is on the roadmap.