Batch API Discount 2026: OpenAI vs Claude vs Gemini Table
OpenAI, Anthropic (Claude) and Google (Gemini) all give the same batch API discount: batch requests cost 50% of standard input and output token prices, and the target turnaround is 24 hours (OpenAI, Anthropic, Google). Since the percentage is the same everywhere, the useful differences are batch size, how long results stay available, and how each discount combines with prompt caching. The table below shows where to start, and the sections after it give exact numbers and steps for each provider (as of October 2026).
Which option is right for you?
Batch first with the provider that already handles most of your token spend, because a 50% cut on your largest line item saves the most money.
| Your situation | What to batch first | First page to open |
|---|---|---|
| Beginner, never used batch before | OpenAI Batch API, which uses a simple JSONL upload and has one completion_window value | OpenAI Batch guide |
| Daily work use with long shared system prompts (evals, classification) | Claude Message Batches with prompt caching, because the two discounts stack | Claude batch processing |
| Tight budget, high volume of simple tasks | Gemini 2.5 Flash or Flash-Lite in batch at $0.05–$0.15 per 1M input tokens | Gemini pricing |
| Very large single jobs (multi-GB inputs) | Gemini Batch API, which accepts input files up to 2GB | Gemini Batch API |
| Jobs needing more than 50,000 requests in one batch | Claude, which allows up to 100,000 requests per batch | Create a Message Batch |
If you haven't picked a model yet, compare base prices before you compare batch rules. Our LLM API pricing comparison for 2026 covers the standard rates that the 50% is taken from.
What Is a Batch API and Why Does It Cost Less?
A batch API takes many requests at once and processes them asynchronously within a time window, usually 24 hours, at half the standard token price. You don't get an answer for each call right away. You send a file or list of requests, the provider runs them when it has spare capacity, and you collect the results later.
Each provider states the trade in its docs. OpenAI says the Batch API offers a "50% cost discount compared to synchronous APIs" and that each batch "completes within 24 hours (and often more quickly)" (OpenAI Batch guide). Anthropic says the Message Batches API reduces costs by 50% and that most batches finish in under an hour (Anthropic batch processing). Google prices batch usage "at 50% of the standard interactive API cost" with a 24-hour target (Gemini Batch API).
The discount exists because you let the provider choose when to run your work. Interactive traffic has peaks and quiet periods, and batch jobs can fill the quiet periods. There is a second benefit: batch traffic has its own rate limits. OpenAI describes a separate pool with "substantially higher capacity" than the standard endpoints (OpenAI Batch guide), so a large batch job won't use up the limits your live product depends on.
Here is a worked example using official list prices (as of October 2026; check the official pages). Say you summarize 10,000 support tickets each night, at about 2,000 input tokens and 300 output tokens per ticket. That's 20M input tokens and 3M output tokens per run.
| Model | Standard cost per run | Batch cost per run |
|---|---|---|
| Claude Sonnet 5.5 ($2 / $10 per MTok) | $40 + $30 = $70 | $35 |
| OpenAI gpt-5 ($1.25 / $10 per MTok) | $25 + $30 = $55 | $27.50 |
| Gemini 2.5 Flash ($0.30 / $2.50 per MTok) | $6 + $7.50 = $13.50 | $6.75 |
Prices come from Claude pricing, OpenAI pricing and Gemini pricing. Run that job 30 times a month and batching Sonnet 5.5 saves $1,050 a month. The output quality is the same because the model is the same. The only cost is waiting.
OpenAI Batch API Discount: How Much Do You Save?
OpenAI charges 50% less for Batch API input and output tokens, and results come back within a 24-hour window. The discount also covers cached input. On the official pricing page, gpt-5 is $1.25 input / $0.125 cached input / $10.00 output per 1M tokens at standard rates and $0.625 / $0.0625 / $5.00 in batch (OpenAI pricing, as of October 2026; check the official page).
Selected batch prices per 1M tokens (as of October 2026):
| Model | Batch input | Batch cached input | Batch output |
|---|---|---|---|
| gpt-5.2 | $0.875 | $0.0875 | $7.00 |
| gpt-5 | $0.625 | $0.0625 | $5.00 |
| gpt-5.4-mini | $0.375 | $0.0375 | $2.25 |
| gpt-5-mini | $0.125 | $0.0125 | $1.00 |
| gpt-5-nano | $0.025 | $0.0025 | $0.20 |
| gpt-4.1-mini | $0.20 | — | $0.80 |
Source: OpenAI pricing.
Conditions that apply (OpenAI Batch guide):
completion_windowonly accepts"24h". You can't pay more for a 1-hour batch.- Supported endpoints are
/v1/responses,/v1/chat/completions,/v1/embeddings,/v1/completions,/v1/moderations,/v1/images/generationsand/v1/images/edits. - A request that hasn't run when the 24 hours are up fails with the error code
batch_expired. - The output file is deleted automatically 30 days after the batch completes.
Pitfall: results don't come back in input order. The fix is to give every line a unique custom_id and join on it, not on line number.
Pitfall: the per-model limit on queued prompt tokens is listed in your organization's limits settings, not in the guide. If a large batch is rejected, check that page and split the job into smaller files.
Who it's not for: chat or agent loops where each step depends on the previous answer. Those need synchronous calls. The pricing page also lists a Flex tier priced at batch rates for some models (OpenAI pricing). Check which models support it before relying on it.
Claude Batch API Discount: How Much Do You Save?
Anthropic's Message Batches API charges 50% less for input and output tokens, and most batches finish in under an hour, well within the 24-hour limit (Anthropic batch processing). Claude's pricing page says "Save 50% with batch processing" for all current models (Claude pricing).
Standard and batch prices per 1M tokens (as of October 2026; check the official page):
| Model | Standard input / output | Batch input / output |
|---|---|---|
| Claude Opus 5.5 | $4 / $20 | $2 / $10 |
| Claude Sonnet 5.5 | $2 / $10 | $1 / $5 |
| Claude Haiku 5.5 | $0.10–$0.50 / $0.50–$2.50 (depends on prompt length) | half of the matching standard rate |
Standard rates come from Claude pricing. Batch rates are 50% of standard, as stated on the same page and in the batch processing docs.
Conditions (Create a Message Batch reference, batch processing guide):
- One batch can hold up to 100,000 requests or 256 MB, whichever limit you hit first. Going over the size limit returns a
413 request_too_largeerror. - Processing can take up to 24 hours. Requests that haven't run by then come back with the result type
expired. - Results can be downloaded for 29 days after the batch completes.
- Each request needs a
custom_id(1–64 characters, letters, digits,-and_) and aparamsobject that takes the same fields as a normal Messages call, including tools and system prompts.
Pitfall: processing_status: "ended" only means the batch has finished. It doesn't mean every request succeeded. Each result has its own type (succeeded, errored, canceled, expired), so filter for errors and resubmit those lines.
Who it's not for: if you want Claude through a flat monthly subscription instead of per-token billing, batching doesn't apply. See Claude API pricing vs Max plan to work out which billing model suits your volume.
Gemini Batch API Discount: How Much Do You Save?
Google's Gemini Batch API charges 50% of standard interactive pricing, with a 24-hour target turnaround. Google says many jobs finish much faster (Gemini Batch API).
Selected prices per 1M tokens (as of October 2026; check the official page):
| Model | Standard input / output | Batch input / output |
|---|---|---|
| Gemini 2.5 Pro (≤200k prompt) | $1.25 / $10.00 | $0.625 / $5.00 |
| Gemini 2.5 Pro (>200k prompt) | $2.50 / $15.00 | $1.25 / $7.50 |
| Gemini 2.5 Flash | $0.30 / $2.50 | $0.15 / $1.25 |
| Gemini 2.5 Flash-Lite | $0.10 / $0.40 | $0.05 / $0.20 |
| Gemini 3.8 Flash (through ) | $0.75 / $3.75 | $0.375 / $1.875 |
| Gemini 3.8 Flash (from ) | $1.50 / $7.50 | $0.75 / $3.75 |
Source: Gemini pricing. The Gemini 3.8 Flash rates are introductory, so a budget built on them will need updating in January 2027.
Conditions (Gemini Batch API, Gemini rate limits):
- You can send requests inline (up to 20MB per batch request) or as a JSONL input file (up to 2GB per file).
- Jobs that are still pending or running after 48 hours expire.
- Results stay available for 6 weeks before they are permanently deleted.
- You can run up to 100 batch jobs at once, with a 20GB file storage limit.
- Batch enqueued token limits depend on your usage tier. On Tier 1, they range from 500,000 tokens for Gemini Embedding to 10,000,000 for Gemini 2.0 Flash Lite.
Pitfall: on Tier 1, the enqueued-token limit can block a large job before it starts. To fix it, split the job into smaller files or move up a usage tier as your billing history grows.
Who it's not for: teams that need tight data-residency controls or a cloud procurement contract. Those teams usually go through Vertex AI on Google Cloud, which has separate docs and pricing. Gemini 2.5 Pro also charges more once a prompt goes over 200k tokens, and batch doesn't remove that step-up.
OpenAI vs Claude vs Gemini: Batch Discount and Turnaround Compared
All three charge 50% of standard rates with a 24-hour window. They differ in batch size, how long results are kept, and how caching is billed. Here is the full comparison (as of October 2026; check each official page):
| OpenAI Batch API | Claude Message Batches | Gemini Batch API | |
|---|---|---|---|
| Discount | 50% on input, output and cached input | 50% on input and output | 50% vs interactive |
| Turnaround | Within 24h | Most under 1 hour, max 24h | 24h target, expires at 48h |
| Max requests per batch | 50,000 | 100,000 | Limited by file size and enqueued tokens |
| Max batch size | 200 MB file | 256 MB | 20MB inline, 2GB file |
| Input format | JSONL file upload | JSON request body | Inline list or JSONL file |
| Result retention | 30 days | 29 days | 6 weeks |
| Concurrency cap | 2,000 batches created per hour | Separate batch rate limits | 100 concurrent batch jobs |
| Caching | Batch cached-input price listed | Discounts stack with prompt caching | Cache hits billed at standard caching rates |
Sources: OpenAI Batch guide, OpenAI pricing, Anthropic batch processing, Claude batch create reference, Gemini Batch API, Gemini rate limits.
How to choose: when the discount is identical, the base price decides the bill. For the 20M input / 3M output example above, Gemini 2.5 Flash in batch costs $6.75 per run and Claude Sonnet 5.5 in batch costs $35. That gap exists before batching and stays after it. Pick the cheapest model that passes your quality check, then batch it. For a model-by-model cost table, see cheapest LLM API in 2026.
How to Submit a Batch Job on OpenAI, Claude, and Gemini
Every batch job follows the same pattern: build the requests, submit them, poll the status, and download the results matched by ID. OpenAI requires a JSONL file. Claude takes the requests directly in the API call. Gemini accepts either.
OpenAI (Python SDK)
Based on the OpenAI Batch guide:
- Write
batch_input.jsonlwith one request per line. Example line:
{"custom_id": "ticket-0001", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-5-mini", "messages": [{"role": "user", "content": "Summarize: ..."}]}}
- Upload it with
client.files.create(file=open("batch_input.jsonl","rb"), purpose="batch"). - Create the batch with
client.batches.create(input_file_id=file.id, endpoint="/v1/chat/completions", completion_window="24h"). - Poll
client.batches.retrieve(batch.id). The status moves throughvalidating→in_progress→finalizing→completed. It can also end asfailed,expiredorcancelled. - Download
client.files.content(batch.output_file_id). Also checkerror_file_id, which holds the failed lines.
Common mistake: the url in each line doesn't match the endpoint you passed to batches.create. Use the same endpoint everywhere.
Claude (Python SDK)
Based on Anthropic's batch processing guide and the API reference:
- Build a list of requests. Example:
{"custom_id": "ticket-0001", "params": {"model": "claude-sonnet-5-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Summarize: ..."}]}}. Treat the model string as an example and copy the exact ID from the models page. - Submit with
client.messages.batches.create(requests=[...]), which callsPOST /v1/messages/batches. - Poll
client.messages.batches.retrieve(batch_id)untilprocessing_statusisended. - Loop over
client.messages.batches.results(batch_id)and check eachresult.type.
Common mistake: a duplicate custom_id. IDs must be unique within a batch, so generate them from your database primary key.
Gemini (google-genai Python SDK)
Based on the Gemini Batch API docs:
- For small jobs (under 20MB), pass a list of
GenerateContentRequestobjects inline. For larger jobs, write a JSONL file where each line has akeyand arequest, for example{"key": "ticket-0001", "request": {"contents": [{"parts": [{"text": "Summarize: ..."}]}]}}. - Upload the file with
client.files.upload(...), setting the MIME type tojsonl. - Create the job with
client.batches.create(model="gemini-2.5-flash", src=uploaded_file.name, config={"display_name": "nightly-tickets"}). - Poll
client.batches.get(name=job.name). Job states are pending, running, succeeded, failed, cancelled and expired. - When the job succeeds, download the result file, or read the inline responses if you sent the requests inline.
Common mistake: assuming results come back in input order. Join on key.
What Are the Token and File Size Limits for Batch Requests?
A single batch can hold 50,000 requests or 200 MB on OpenAI, 100,000 requests or 256 MB on Claude, and a 2GB input file on Gemini. Separate token-queue limits also cap how much work you can have waiting at one time.
| Limit type | OpenAI | Claude | Gemini |
|---|---|---|---|
| Requests per batch | 50,000 | 100,000 | No fixed count; bounded by size |
| Size per batch | 200 MB | 256 MB | 20MB inline / 2GB file |
| Queued tokens | Per model, shown in your limits settings | Separate batch rate limits (rate limits page) | Per model and tier (e.g. 500K–10M on Tier 1) |
| Job throughput | 2,000 batches/hour | See rate limits page | 100 concurrent jobs, 20GB storage |
Sources: OpenAI Batch guide, Claude batch create reference, Gemini rate limits.
These limits decide how you split a job. As an example, take 120,000 ticket summaries. On OpenAI that's at least three batches (50,000 + 50,000 + 20,000). On Claude it's two. On Gemini it could be one file if the total fits under 2GB and your tier's enqueued-token limit.
Watch the queued-token limit more closely than the request count. A batch that fits the 200 MB or 256 MB size limit can still be refused if its total prompt tokens push your queue over the per-model limit. If that happens, submit chunks in sequence and start the next one when the previous one completes.
Large documents bring their own problem. Each request inside a batch still has to fit the model's context window and output limits. Batching changes how requests are scheduled and billed. It doesn't change how much one request can contain.
When Should You Use Batch API Instead of Real-Time API?
Use the batch API when nobody is waiting for the answer and the work can wait up to a day. Good fits are evaluations, data labeling, bulk summarization, embedding backfills and nightly reports. Anthropic lists large-scale evaluations, content moderation, data analysis and bulk content generation as typical uses (Anthropic batch processing).
A quick test: if the result goes to a person or system that can wait until tomorrow morning, batch it. If it goes to a user who is looking at a loading spinner, don't.
Workloads that usually suit batch, with examples:
- Running a regression eval of 5,000 prompts before each model upgrade.
- Classifying last month's support tickets by topic for a dashboard.
- Generating product descriptions for a catalog import.
- Re-embedding a document store after you switch embedding models (OpenAI supports
/v1/embeddingsin batch).
Workloads that don't suit batch:
- Chatbots, copilots and anything a user waits on.
- Multi-step agents whose next call depends on the last result. Each round trip could take hours.
- Jobs with a hard deadline shorter than 24 hours. "Most finish in under an hour" on Claude describes typical behavior, not a guarantee.
Pitfall: treating batch as faster bulk processing for a deadline. Fix: if a 9 a.m. report needs data, submit the batch the previous afternoon so a full 24-hour run still finishes in time. On Gemini, plan around the 24-hour target and keep in mind that jobs only expire at 48 hours.
A predictable bill comes from moving whole categories of work to batch, not individual calls. List your monthly token spend by feature, mark each feature as interactive or deferrable, and batch the largest deferrable one first.
Can You Combine Batch Discounts with Prompt Caching?
Yes on Claude, where the batch discount and prompt caching stack. OpenAI lists a separate batch cached-input price. On Gemini, a cache hit inside a batch is billed at standard context caching rates instead of getting a further batch discount.
Claude: discounts stack, but cache hits are best-effort
Anthropic's docs say the batch and prompt caching discounts can be combined (Anthropic batch processing). At standard rates on Claude Sonnet 5.5, cache reads cost $0.10 per MTok against $2 for base input (Claude pricing). Requests in a batch run concurrently, though, so cache hits are best-effort. Don't put an assumed hit rate in your budget.
Two practical rules:
- Put the shared content (system prompt, rubric, reference document) first and make it identical byte for byte across every request. Use the same
cache_controlblock in each request. - Batches can run longer than the default 5-minute cache lifetime, so consider the 1-hour cache duration. A 1-hour cache write costs 2x base input versus 1.25x for the 5-minute write (Claude pricing page), so it only pays off when many requests share the prefix.
Example: an eval with a 10,000-token rubric shared by 5,000 requests. Without caching, the rubric alone is 50M input tokens, which costs $50 at Sonnet 5.5's $1 batch input rate. Every cache hit on the rubric is billed at the cache-read rate, which is far lower. Plan for the uncached cost and count any cache hits as extra savings.
OpenAI: cached input has a batch price
The OpenAI pricing page lists a batch cached-input rate for GPT-5-family models, for example $0.0625 per 1M tokens for gpt-5 compared with $0.125 at standard rates (OpenAI pricing). OpenAI's caching applies to repeated prompt prefixes automatically, so the prompt-ordering rule from the Claude section applies here too. GPT-4.1 models show no batch cached-input price on that page.
Gemini: caching and batch are billed separately
Gemini batches support context caching. You reference a cached_content resource in individual requests, and when a request hits the cache, you pay the standard context caching rates (Gemini Batch API). Implicit caching is on by default for Gemini 2.5 and newer models, with no storage fee. Explicit caches add an hourly storage charge, for example $0.50 per 1M tokens per hour for Gemini 3.8 Flash (Gemini pricing; Gemini optimization guide).
Pitfall: keeping an explicit cache alive through a long batch queue. Storage is billed hourly while the job waits, so for small shared prefixes, batch pricing without an explicit cache may cost less.
Next steps
Start with one deferrable job that already costs you money and move it to batch this week.
DIY actions for today:
- Export last month's usage from your provider dashboard and mark each feature as "user waits" or "can wait 24h." Your first batch candidate is the largest "can wait" item.
- Turn 100 real requests from that feature into a test batch, using the commands in the submit section above. Compare the output with your live results and check how long it took.
- Add
custom_id(orkey) joins and an error-file check to your pipeline before you scale the job up.
If you'd rather not build it yourself: Google Cloud's Vertex AI and Amazon Bedrock both offer managed batch inference inside their cloud consoles, with billing, IAM and storage handled by the cloud account. Costs follow each platform's model pricing page (as of October 2026; check the official pages), plus storage fees. This suits teams that already run on GCP or AWS and want procurement, logging and access control in one place. It doesn't suit a two-person startup with no cloud setup, because configuring buckets and permissions is extra work, and model availability and prices can differ from the direct APIs. If you spend heavily, the OpenAI, Anthropic and Google sales teams can also discuss committed-use terms. Ask them directly. Don't assume a discount exists.
Related guides on this site:
- LLM API Pricing Comparison 2026: 5 Providers, Real Costs
- Cheapest LLM API in 2026: Real Cost per 1M Tokens Table
- Claude API Pricing vs Max Plan: Break-Even Table for 2026
FAQ
What is the Claude batch API discount?
The Claude Message Batches API charges 50% less for input and output tokens on every current model. On Claude Sonnet 5.5, that's $1 input and $5 output per million tokens instead of $2 and $10 (as of October 2026). Most batches finish in under an hour, and the maximum is 24 hours (Anthropic docs).
What is the OpenAI batch API discount?
OpenAI gives 50% off compared with synchronous APIs, covering input, output and cached input tokens. Each batch completes within 24 hours, and "24h" is the only completion window available. One batch can hold up to 50,000 requests or a 200 MB file (OpenAI Batch guide).
Is the Anthropic batch API discount combined with prompt caching?
Yes. Anthropic says the batch discount and prompt caching discounts can be combined. Because batch requests run concurrently, cache hits are best-effort, so plan your budget on uncached batch prices. For long batches, consider the 1-hour cache duration (Anthropic docs).
What is the Gemini batch API discount?
Google prices Gemini Batch API usage at 50% of the standard interactive cost, with a 24-hour target turnaround. For example, Gemini 2.5 Flash drops from $0.30/$2.50 to $0.15/$1.25 per million input/output tokens (as of October 2026). Requests that hit a context cache are billed at standard caching rates (Gemini Batch API, pricing).
Sources
- OpenAI — Batch API guide
- OpenAI — API pricing
- Anthropic — Batch processing (Message Batches API)
- Anthropic — Create a Message Batch API reference
- Anthropic — Pricing (docs)
- Anthropic — Rate limits
- Claude — Pricing
- Google — Gemini Batch API
- Google — Gemini API pricing
- Google — Gemini API rate limits
- Google — Gemini API optimization and inference
Spotted something out of date or wrong? Tell us at shigoto.ai.note@gmail.com. We check every guide against its official sources.