API Reference
Log In
API Reference

Get cost by trace type over time

Returns the AI cost in USD per trace type for each time bucket in the period: the total, the average per call, and the 95th and 99th percentile per call. Calls with no trace type are grouped under unknown.

Bucket size by period: HOUR 5 minutes, EIGHT_HOURS 30 minutes, TWENTY_FOUR_HOURS 2 hours, SEVEN_DAYS 12 hours, THIRTY_DAYS 1 day, NINETY_DAYS 1 week, SIX_MONTHS and TWELVE_MONTHS 1 calendar month. Buckets are cut in UTC. Monthly buckets start at midnight UTC on the first of each month; shorter buckets start at the beginning of the window, which is the time of the request minus the period. Buckets are listed newest first.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

ID of the team that owns this data.

string
enum

Predefined time window to aggregate results. Defaults to THIRTY_DAYS.

string

Optional trace type filter. Omit to include all trace types.

string
enum

Optional operation type filter. Use to filter by specific operation type (e.g., CHAT, GENERATE, AUDIO, VIDEO, IMAGE). Omit to include all operation types.

string

Optional environment filter (e.g., production, staging). Omit to include all environments.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*