Skip to main content

Overview

Fireworks provides a CLI tool to export comprehensive billing metrics for all usage types including serverless inference, on-demand deployments, and fine-tuning jobs. The exported data can be used for cost analysis, internal billing, and usage tracking.

Exporting billing metrics

Use the Fireworks CLI to export a billing CSV that includes all usage:
# Authenticate (once)
firectl auth login

# Export billing metrics to CSV
firectl export billing-metrics

Examples

Export all billing metrics for an account:
firectl export billing-metrics
Export metrics for a specific date range and filename:
firectl export billing-metrics \
  --start-time "2025-01-01" \
  --end-time "2025-01-31" \
  --filename january_metrics.csv

Output format

The exported CSV includes the following columns:
  • email: Account email
  • start_time: Request start timestamp
  • end_time: Request end timestamp
  • usage_type: Type of usage (e.g., TEXT_COMPLETION_INFERENCE_USAGE)
  • accelerator_type: GPU/hardware type used
  • accelerator_seconds: Compute time in seconds
  • base_model_name: The model used
  • model_bucket: Model category
  • parameter_count: Model size
  • prompt_tokens: Input tokens
  • completion_tokens: Output tokens

Sample row

email,start_time,end_time,usage_type,accelerator_type,accelerator_seconds,base_model_name,model_bucket,parameter_count,prompt_tokens,completion_tokens
[email protected],2025-10-20 17:16:48 UTC,2025-10-20 17:16:48 UTC,TEXT_COMPLETION_INFERENCE_USAGE,,,accounts/fireworks/models/llama4-maverick-instruct-basic,Llama 4 Maverick Basic,401583781376,803,109

Automation

You can automate exports in cron jobs and load the CSV into your internal systems:
# Example: Daily export with dated filename
firectl export billing-metrics \
  --start-time "$(date -v-1d '+%Y-%m-%d')" \
  --end-time "$(date '+%Y-%m-%d')" \
  --filename "billing_$(date '+%Y%m%d').csv"
Run firectl export billing-metrics --help to see all available flags and options.

Coverage

This export includes:
  • Serverless inference: All serverless API usage
  • On-demand deployments: Deployment usage (see also Exporting deployment metrics for real-time Prometheus metrics)
  • Fine-tuning jobs: Fine-tuning compute usage
  • Other services: All billable Fireworks services
For real-time monitoring of on-demand deployment performance metrics (latency, throughput, etc.), use the Prometheus metrics endpoint instead.

See also