threads
Query Threads
Alpha: The request and response contract may change; Query threads within a project (session), with cursor-based pagination. Returns threads matching the given time range and optional filter.
post/v2/threads/query
Request body
Example request
{
"page_size": 20,
"project_id": "0190a1b2-c3d4-7ef0-a5b6-6ea3a82e9328"
}Response
items and pagination
Example response
{
"items": [
{
"count": 3,
"first_trace_id": "018e4c7e-a9fb-7ef0-a5b6-6ea3a82e9327",
"last_trace_id": "0190a1b2-c3d4-7ef0-a5b6-6ea3a82e9328",
"latency_p50": 0.15,
"latency_p99": 0.42,
"max_start_time": "2025-01-15T12:05:00.000Z",
"min_start_time": "2025-01-15T12:00:00.000Z",
"num_errored_turns": 1,
"start_time": "2025-01-15T12:00:00.000Z",
"thread_id": "018e4c7e-a9fb-7ef0-a5b6-6ea3a82e9327",
"total_cost": 0.045,
"total_tokens": 450,
"trace_id": "018e4c7e-a9fb-7ef0-a5b6-6ea3a82e9328"
}
],
"next_cursor": "eyJydW5zX2N1cnNvciI6Imx0KGN1cnNvciwiLi4uIikifQ=="
}