Cost optimization
Batch API Pricing: OpenAI, Claude & Gemini Costs
Compare standard and Batch API costs with a calculator using official model prices. Understand turnaround time, caching, retries, and budget assumptions.
Read articleFree developer tool
Turn a workload into a token budget. Compare standard API costs across four providers using the same request volume, input, output, and cache assumptions.
Standard text API rates, without Batch or free allowances. Output should include billed reasoning tokens. Cache percentages split the input; their sum cannot exceed 100%.
| Model / rate tier | Estimated total (USD) | Prices checked |
|---|---|---|
| Claude Sonnet 5.5 | $30.00 | |
| Claude Haiku 5.5 · Input ≤100K | $1.50 | |
| Claude Haiku 5.5 · Input >100K | Choose the matching input tier | |
| gpt-6.1-sol | $30.00 | |
| gpt-6-luna | $1.50 | |
| deepseek-flash · Peak | $4.20 | |
| deepseek-flash · Off-peak | $2.10 | |
| deepseek-v4-pro · Peak | $17.16 | |
| deepseek-v4-pro · Off-peak | $8.58 | |
| gemini-4-argon | $30.00 | |
| gemini-3.8-flash | $11.25 | |
| gemini-3.5-flash-lite | $5.50 |
Excludes cache storage, search/tools, media, taxes, regional uplifts, and custom discounts. Rate tiers are not guarantees of model context capacity. Check the linked pricing page for limits and promotion dates. Totals are rounded to cents after calculation; positive amounts below half a cent display as $0.00.
For each request, split the total input into uncached input, cache reads, and cache writes. Multiply each part by its own price per million tokens. Add the output cost, then multiply by the request count.
A cache hit percentage is a share of input tokens, not a share of requests. Use measured cache-token counts from your API responses when available. Writing a cache and reading it are separate charges; a cold request does not qualify as a hit.
Choose a request count for the period you want to budget, such as one day or one month. Every request in this estimate uses the same token counts. For mixed workloads, estimate each group separately and add the totals.
Example: 1,000 requests with 10,000 input and 1,000 output tokens each = 10 million input and 1 million output tokens. Changing the request count scales the full workload, including cache writes.
Use the vendor pages for rate details, then follow the setup guide to compare estimates with reported costs or balances.
Cost optimization
Compare standard and Batch API costs with a calculator using official model prices. Understand turnaround time, caching, retries, and budget assumptions.
Read articleCost optimization
Calculate cache reads, writes, and break-even reuse. A worked Claude example and a checklist for comparing prompt caching costs across providers.
Read articleUsage and billing
Separate Claude Code subscription limits, API charges, and local ccusage estimates. Learn what to measure and how to reconcile a real bill.
Read articleModel comparison
Compare Haiku 5.5 and Sonnet 5.5 token costs for short prompts, long prompts, output-heavy tasks, and cache reuse using shared pricing data.
Read article