v54

latestSwagger 2.0AGPL-3.0raw.githubusercontent.com2026-08-03397565628.8 KB
Enterprise

Export organization AI spend as CSV

Returns per-user, per-group, per-model, per-provider aggregated AI spend for the organization as CSV, built from raw AI Gateway token usage. The optional period_start and period_end query parameters bound the period and are interpreted as UTC. They must be provided together and span at most 31 days. When both are omitted, the current UTC monthly period is used. An explicit period_start must fall within the configured AI Gateway data retention window, since older token usage is purged. The default period is narrowed to that window instead, and every row echoes the applied bounds. Requires organization-level administrator permissions.

get/api/v2/organizations/{organization}/ai/spend/export

Path parameters

organizationstring uuid required

Organization ID

Query parameters

period_startstring date-time

Inclusive lower bound (RFC3339)

period_endstring date-time

Exclusive upper bound (RFC3339)

Response

OK