API referenceUsage
List Run Usage
One page of Run usage; Run numbers include all Runs in each Thread, including those without usage.
GET
/api/v1/usage/runsOne page of Run usage; Run numbers include all Runs in each Thread, including those without usage.
AuthorizationBearer <token>
A workspace API key (a13n_...)
In: header
Query Parameters
run_id?|null
thread_id?|null
session_id?|null
ingested_after?|null
ingested_before?|null
limit?Limit
Range
1 <= value <= 100Default
50cursor?|null
Header Parameters
X-Workspace-ID?|
The workspace ID a login session acts in; required with a login session. An API key acts in its own workspace and needs none; naming another is forbidden.
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/usage/runs"{ "items": [ { "models": [ { "average_time_to_first_chunk_seconds": 0, "cache_read_tokens": 0, "cache_write_tokens": 0, "cost": "string", "input_tokens": 0, "model": "string", "output_tokens": 0, "output_tokens_per_second": 0, "requests": 0 } ], "run_id": "string", "run_number": 1, "thread_id": "string" } ], "next_cursor": "string"}