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.This export reports metered quantities — tokens and accelerator-seconds — not dollars. For a
CSV of rated serverless costs grouped by model, model tier, user, or API key, use
Exporting Usage Costs.
Exporting billing metrics
Use the Fireworks CLI to export a billing CSV that includes all usage:Examples
Export all billing metrics for an account: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
- cached_prompt_tokens: Prompt tokens served from cache (text inference only). Subset of
prompt_tokens. - uncached_prompt_tokens: Prompt tokens not served from cache (text inference only).
prompt_tokens - cached_prompt_tokens.
Older usage records and non-text usage types may not have a cached/uncached split
in the underlying data. Exports normalize these rows to
cached_prompt_tokens=0
and uncached_prompt_tokens=prompt_tokens, so prompt_tokens = cached_prompt_tokens + uncached_prompt_tokens always holds.Sample row
Automation
Eachfirectl billing export-metrics call supports a maximum 31-day time range.
To export longer historical ranges, run the command in multiple 31-day chunks and
combine the CSV files in your downstream pipeline.
You can automate exports in cron jobs and load the CSV into your internal systems:
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
- firectl CLI overview
- Exporting Usage Costs - Rated serverless cost CSV grouped by model, model tier, user, or API key
- Exporting deployment metrics - Real-time Prometheus metrics for on-demand deployments
- Account quotas - Spending tiers, monthly spend limits, and account-wide request limits
- Serverless rate limits - Adaptive serverless TPM bounds