Get spans summary
Get aggregated statistics for spans matching the given filters. Uses the same filters and query parameters as List spans.
Headers
Authorization
Bearer token. Use Bearer YOUR_API_KEY.
Query parameters
start_time
Start of time range (ISO 8601).
end_time
End of time range (ISO 8601).
environment
Filter by environment.
Request
This endpoint expects an object.
Response
Summary statistics for matching spans.
total_cost
Total cost in USD for all matching spans.
total_tokens
Total tokens across all matching spans.
total_prompt_tokens
Total prompt/input tokens.
total_completion_tokens
Total completion/output tokens.
average_latency
Average latency in seconds.
average_cost
Average cost per span in USD.
total_requests
Total number of matching spans.
error_count
Number of spans with errors.
Errors
400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error
500
Internal Server Error