POST (recommended for complex filters) and GET for simple queries.
Authentication
All endpoints require API key authentication:Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
start_time | ISO 8601 | 1 hour ago | Start of time range |
end_time | ISO 8601 | Current time | End of time range |
page | integer | 1 | Page number |
page_size | integer | 50 | Results per page (max 1000) |
sort_by | string | -timestamp | Sort field (prefix - for descending) |
environment | string | All | Filter by environment |
Supported Sort Fields
timestamp,start_time,end_time,durationtotal_cost,total_tokens,total_prompt_tokens,total_completion_tokensspan_count,llm_call_count,error_count
Request Body (POST)
Use filters to refine results server-side. See the Filters API Reference for operators and format.Available Filter Fields
trace_unique_id,customer_identifier,environmentspan_count,llm_call_count,error_counttotal_cost,total_tokens,total_prompt_tokens,total_completion_tokensduration,workflow_name(span_workflow_name)- Custom metadata via
metadata__your_field
Examples
Response
Field Descriptions
| Field | Type | Description |
|---|---|---|
trace_unique_id | string | Unique trace identifier |
start_time | datetime | When the trace started |
end_time | datetime | When the trace ended |
duration | float | Total duration in seconds |
span_count | integer | Total spans in the trace |
llm_call_count | integer | Number of LLM calls |
total_prompt_tokens | integer | Sum of input tokens |
total_completion_tokens | integer | Sum of output tokens |
total_tokens | integer | Total tokens used |
total_cost | float | Total cost in USD |
error_count | integer | Number of errors |
input | object | Root span’s input (full object) |
output | object | Root span’s output (full object) |
metadata | object | Custom metadata |
customer_identifier | string | Customer/user identifier |
environment | string | Environment (e.g., production, test) |
trace_group_identifier | string | Workflow group identifier |
name | string | Root span name |
model | string | Primary model used |
Error Responses
400 Bad Request
401 Unauthorized
500 Internal Server Error