API Reference
Log In
API Reference

List all AI metrics across all modalities

Returns a paginated list of AI metrics across all types (completion, audio, video, image).
Only common fields are returned. Use the metricType field to identify the specific type.
For full type-specific details, use the dedicated endpoints:

  • /v2/api/sources/metrics/ai/completions
  • /v2/api/sources/metrics/ai/audio
  • /v2/api/sources/metrics/ai/video
  • /v2/api/sources/metrics/ai/images
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

Searches trace ID and transaction ID by exact match first; when no ID matches, falls back to partial match across agent, model, provider, error reason and subscriber email.

string
enum

Filter by metric type (modality). If not specified, returns all types.

Allowed:
string

Filter start date/time in ISO 8601 format.

string

Filter end date/time in ISO 8601 format.

int64
0 to 300000

Minimum request duration (in milliseconds).

int64
0 to 300000

Maximum request duration (in milliseconds).

number
0 to 999999.99

Minimum total cost ($).

number
0 to 999999.99

Maximum total cost ($).

string
length between 1 and 255

Exact transaction ID match.

transactionIds
array of strings
length between 1 and 100

Any of these exact transaction IDs, at most 100. The Transaction Log's ClickHouse search sends the page's ids here so the rows render from Postgres.

transactionIds

Any of these exact transaction IDs, at most 100. The Transaction Log's ClickHouse search sends the page's ids here so the rows render from Postgres.

string
length between 1 and 255

Exact trace ID match.

string
length between 1 and 255

Filter by trace type. Use 'unknown' for metrics without traceType.

string
length between 1 and 255

Filter by consuming organization name.

string
length between 1 and 255

Filter by subscriber ID.

string
length between 1 and 255

Filter by subscriber email.

string
length between 1 and 255

Filter by subscription ID.

string
length between 1 and 255

Filter by product ID.

string
length between 1 and 255

Filter by agent name.

string
length between 1 and 255

Filter by AI provider.

string
length between 1 and 255

Filter by AI model.

string
length between 1 and 255

Filter by model source.

string
length between 1 and 255

Filter by error reason.

string
enum

Filter by operation type.

string
enum
length between 1 and 50

Filter by deployment environment.

Allowed:
boolean

Filter by whether billing was skipped (true = free tier/skipped, false = billed).

boolean

Whether to include coding assistant metrics (e.g. Claude Code, Gemini CLI). When true, usage from all coding assistants is included, regardless of your team's pricing settings and of includeCodingAssistantProviders. When false (default), only coding assistants your team pays for per API call are included, and the rest are treated as seat subscriptions and left out. Non-completion metrics (IMAGE, AUDIO, VIDEO) are unaffected by this filter.

includeCodingAssistantProviders
array of strings

Coding assistants you pay for per API call, not by seat. Their usage counts as spend. Others are treated as seat subscriptions and left out of cost totals. Accepted values: ClaudeCode, ClaudeCowork, CursorIde, GeminiCli, CodexCli, GithubCopilot. The values are validated, but the list does not change the results: the assistants that count as spend come from your team's coding assistant pricing settings. Set includeCodingAssistants to true to include all coding assistants regardless of those settings.

includeCodingAssistantProviders
string
enum

Filter by stop reason. Non-completion modalities carry no stop reason and are excluded when this filter is set.

integer
≥ 0
Defaults to 0

Zero-based page index (0..N)

integer
≥ 1
Defaults to 20

The size of the page to be returned

sort
array of strings
Defaults to requestTime,DESC

Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

sort
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
application/hal+json
*/*