Skip to main content
API usage exports are available to workspace administrators and provide detailed cost breakdowns for each API key over your selected time period.

Accessing API Usage Export

Navigate to your API settings page to view analytics and export detailed usage data for your API keys.
1

Open API Settings

Go to Settings > API in your workspace settings
2

View Analytics

Review the API key analytics displayed on the page
3

Select Time Period

Choose your desired time frame from the timeframe selector (default: last 30 days)
4

Export to CSV

Click the Export button to download a CSV file with detailed API usage data

Time Period Selection

The export includes all API calls made within the selected timeframe:
  • Default period: Last 30 days
  • Custom ranges: Select any timeframe using the timeframe selector
  • Data is filtered based on the date/timestamp of each API call
The same timeframe selection applies to both the analytics visualization and the CSV export.

Export Data Structure

The CSV export contains one row per API call with detailed cost and performance information.

Column Definitions

ColumnDescription
dateDate and timestamp of the API call (UTC)
api_key_idUnique identifier of the API key used
api_key_nameHuman-readable name of the API key
providerAI provider (OpenAI, Anthropic, Google, DeepSeek, Meta, Amazon, Mistral)
modelSpecific model name (e.g., GPT-4, Claude-3.5-Sonnet, Gemini-Pro, Llama-3)
input_tokensNumber of tokens in the request prompt
output_tokensNumber of tokens in the model’s response
completion_time_msTime taken to complete the request in milliseconds
input_token_price_per_1mCost per 1 million input tokens in USD
output_token_price_per_1mCost per 1 million output tokens in USD

Calculating Costs

To calculate the cost of an individual API call, use the following formula:
Total Cost = (input_tokens × input_token_price_per_1m / 1,000,000) +
             (output_tokens × output_token_price_per_1m / 1,000,000)

Example Calculation

For an API call with:
  • 500 input tokens
  • 1,200 output tokens
  • Input price: $2.50 per 1M tokens
  • Output price: $10.00 per 1M tokens
Input Cost  = 500 × $2.50 / 1,000,000 = $0.00125
Output Cost = 1,200 × $10.00 / 1,000,000 = $0.01200
Total Cost  = $0.01325
To calculate the total cost for an API key, sum the individual costs across all rows for that key in your spreadsheet application.

Data Privacy

  • API key IDs and names are included for administrative visibility
  • No end-user personal information is included in API usage exports
  • Data reflects actual API calls made through your workspace
I