API Billing Mismatch Checklist
Quick Answer
Billing mismatches happen when local usage estimates don't match provider charges. Common causes include retries, caching, pricing changes, and missing cost factors. This checklist helps you investigate discrepancies.
Summary
When your API costs don't match expectations, systematically compare local logs, usage records, and provider dashboards to identify the cause.
Scaffold content to expand later.
Investigation Checklist
- Compare total requests in logs vs. dashboard
- Check for duplicate requests or retries
- Verify token counts in logs vs. billed usage
- Check for pricing changes by provider
- Review failed requests and their billing treatment
- Check for cache hits that should reduce costs
- Verify spend limits didn't cause partial charges
Common Causes
- Retries — Each retry may incur charges
- Hidden tokens — System prompts, context, or metadata
- Pricing updates — Provider changed rates mid-period
- Failed request billing — Some providers charge for failures
- Rate limit handling — Backoff retries add to usage
Request ID Tracking
Always save these for every request:
- request_id — Unique request identifier
- tokens_in and tokens_out
- model and timestamp
- estimated_cost based on your calculations
Related Guides
OpenAI API Billing
Learn more about this topic
OpenAI API Usage
Learn more about this topic
Failed Generation Cost
Learn more about this topic
API billing mismatch occurs when local usage estimates don't match provider charges. Common causes include retries, hidden tokens, pricing changes, and failed request billing. Track request_id, tokens_in, tokens_out, and compare against the provider dashboard. This is scaffold content for future expansion.
Frequently Asked Questions
Why is my API bill higher than expected?
Possible causes include: more tokens than estimated, retries adding charges, pricing changes, failed requests being billed, or hidden context from system prompts.
How do I dispute a billing discrepancy?
Contact the provider support with your request_id, logs, and estimated costs. Provide evidence from your local tracking to support your case.
Ready to start?
Create an API key with $1 trial credit and explore live model pricing.