Analytics

Export consumption analytics

Export per-call consumption analytics for the workspace identified by {wId}. Each row represents one unit of billed credit consumption (an LLM call or a tool call). The export can be filtered by various dimensions (agents, users, API keys, groups, models, tools, skills, sources, tags). The export is limited to a maximum of 30 days per request and times out after 10 seconds: reduce the time range or apply filters to reduce the number of rows if you encounter a timeout. Results are streamed, if an error occurs, an error message is appended and the stream is closed.

post/api/v1/w/{wId}/analytics/consumption/export

Path parameters

wIdstring required

Unique string identifier for the workspace

Request body

startDatestring date-time required

Start of the time range (inclusive), ISO 8601 datetime

endDatestring date-time required

End of the time range (exclusive), ISO 8601 datetime. Must be after startDate, at most 30 days apart.

format'csv' | 'ndjson'

Output format (defaults to csv)

Example request

{
  "startDate": "2026-01-01T00:00:00Z",
  "endDate": "2026-01-15T00:00:00Z"
}

Response

The consumption data in CSV or NDJSON format

Changes

Changed in 1 of the 107 revisions of this API.1