Skip to main content
GET
Export your organization’s AI Gateway usage and cost data for analysis, reporting, or billing purposes. You can export data in CSV or JSON format with flexible filtering options.

Query Parameters

string
default:"24h"
Time range for the export. Examples: 1h, 24h, 7d, 30d
string
Start date in ISO 8601 format (e.g., 2026-04-01). Overrides the period parameter if provided.
string
End date in ISO 8601 format (e.g., 2026-04-08). Overrides the period parameter if provided.
string
default:"csv"
Export format. Options: csv or json
string
Filter by specific API key IDs. This parameter can be repeated multiple times to include multiple keys.
string
Filter by tags. This parameter can be repeated multiple times to include multiple tags.

Examples

Response

The response is a CSV or JSON file containing your usage and cost data, ready for download or further processing. CSV format includes columns for:
  • Timestamp
  • API Key
  • Model
  • Provider
  • Input Tokens
  • Output Tokens
  • Cost
  • Tags
JSON format includes an array of usage records with the same information as CSV.