EN

Language

Our editions

Written for each audience, not translated word for word.

Batch APIs: how to pay half for model requests that can wait

ExplainerBy Lucas Matías García TorresUpdated Data checked 4 min read

Reviewed by Lucas Matías García Torres on . How we work.

Leer en español

A data center aisle with streams of small orange data packets flowing between server racks

Short answer

A batch API, on October 23, 2026, lets you submit many model requests as one asynchronous job and pay 50% of the standard price at OpenAI, Anthropic, Google and Mistral. The trade-off is time: OpenAI and Google target 24 hours, Anthropic says most batches finish in under an hour and expire after 24 hours. Limits differ: 50,000 requests per OpenAI batch, 100,000 at Anthropic and up to 1 million at Mistral, and results are kept between 29 days and 6 weeks.

Prices and limits change often: check the vendor's page before you pay. How we make money.

A batch API lets you send a large set of model requests in one job, wait for the results instead of getting them in real time, and pay about half the normal price. On October 23, 2026, OpenAI, Anthropic, Google and Mistral all document a 50% discount for batch jobs, in exchange for asynchronous processing that can take up to 24 hours. This guide explains how batch processing works in each API, what it costs, what the limits are and when it is the wrong tool, based on each vendor's documentation read on October 23, 2026.

How a batch job works

The flow is almost identical everywhere. You prepare a list of ordinary requests, each with your own identifier, usually as a JSONL file where every line is one request. You submit the batch, the provider queues it and processes it when it has capacity, and you poll the job (or wait for a notification) until it ends. Then you download the results and match each one to its request through your identifier.

That identifier matters more than it looks. OpenAI warns that the output order may not match the input order, so you have to join results on custom_id, and Anthropic requires a custom_id of 1 to 64 characters for the same reason. Nothing in a batch is a conversation: each line is an independent request with its full prompt, so if you want the discount on a long shared system prompt, combine batches with prompt caching.

Batch processing in four APIs

Table: batch processing by vendor (official documentation, checked October 23, 2026)

Item OpenAI Anthropic (Claude) Google (Gemini) Mistral
Discount 50% 50% 50% 50%
Completion window 24 hours, often faster most finish in under 1 hour; expire after 24 hours target 24 hours; expire after 48 hours running or pending expire after timeout_hours: 24 by default, under 7 days
Size per batch 50,000 requests, file up to 200 MB 100,000 requests or 256 MB inline under 20 MB; JSONL file up to 2 GB up to 1 million requests; inline under 10,000
Models per batch one model per file all active models, mixed one model per job one model per batch
Results kept output file deleted after 30 days 29 days 6 weeks not stated on the page we read

Two differences change the design of a pipeline. Anthropic lets one batch mix request types and models, while OpenAI and Mistral want a single model per batch. And the retention periods differ, so download results as soon as a job ends instead of treating the provider as storage.

What it costs

Batch pricing is the standard per-token price cut in half. Anthropic publishes the batch rates in its documentation: Claude Sonnet 5.5 costs $1 per million input tokens and $5 per million output tokens in batch mode, against $2 and $10 at standard rates, and Claude Opus 5.5 costs $2 and $10 in batch. Claude Haiku 5.5 is listed at $0.05 per million input tokens and $0.25 per million output tokens in batch for prompts up to 100,000 tokens.

The same arithmetic applies to the others: whatever you pay per token at standard rates, a batch request costs half. Our LLM API cost calculator gives the standard figures to start from, and the vendor pages on OpenAI API pricing, Claude API pricing and Gemini API pricing list the rates by model. Batches are a strong fit for reasoning models, whose output tokens make up most of the bill: Anthropic even recommends batch processing for thinking budgets above 32,000 tokens.

Failed work is not charged the same way everywhere. OpenAI says that when a batch expires you are charged only for the requests that completed. Anthropic does not bill requests that end as errored, canceled or expired.

Limits and gotchas

  • Not every feature is available. Gemini's batch mode only supports generateContent, and Anthropic excludes streaming, among other options, from batch requests. OpenAI lists the endpoints it accepts in a batch file.
  • Separate rate limits. OpenAI runs batches on their own rate limits, so a large batch does not eat into your real-time quota. Anthropic scopes batches to the workspace that created them.
  • Caching still helps, but it is best effort. Anthropic suggests the 1-hour cache duration for batches that share context, and notes that cache hits inside a batch are not guaranteed. Gemini supports context caching in batch mode too.
  • Expiry is real. A batch that does not finish inside its window ends as expired, and you get back only what completed. Plan to resubmit the rest.
  • Validate before you submit. A malformed line can fail a request or the whole file. Test with a small batch of a few requests first.

When a batch is the wrong choice

Anything a person is waiting for does not belong in a batch: chat, support replies, autocomplete or an agent loop that needs the answer of one step before the next. Those need the real-time API. Batches pay off for work that can wait: classifying or tagging a backlog of documents, running evaluations across a test set, generating summaries or embeddings for a whole archive, translating a catalog or filling a database overnight.

A simple rule: if the result is needed in less than a day and nobody is staring at a spinner, price the job both ways. At 50% off, a nightly batch often costs less than optimizing the prompt, and you can combine both. If you are new to the unit these prices are quoted in, start with our guide to what a token is.

What we checked

  • OpenAI Batch API: 50% cost discount compared to synchronous APIs; 24-hour completion window, often faster; separate pool of higher rate limits; input is a JSONL file of up to 50,000 requests and 200 MB, one model per file; the output order may not match the input order, so results are matched by custom_id; when a batch expires, only completed requests are charged; output files are deleted after 30 days. (OpenAI, )
  • Anthropic Message Batches: 50% of standard prices; most batches finish in under 1 hour and expire after 24 hours; up to 100,000 requests or 256 MB per batch; results available for 29 days; batches are scoped to a workspace; all active models supported and requests can be mixed; streaming is not supported in batch requests; the 1-hour cache duration is recommended for shared context and cache hits are best effort; errored, canceled and expired requests are not billed; custom_id of 1 to 64 characters; batch prices per million tokens: Sonnet 5.5 $1 input and $5 output (standard $2 and $10), Opus 5.5 $2 and $10, Haiku 5.5 $0.05 and $0.25 for prompts up to 100K tokens. (Anthropic, )
  • Gemini Batch Mode: 50% of the standard cost; target turnaround of 24 hours; inline requests under 20 MB or a JSONL input file up to 2 GB; jobs expire after 48 hours running or pending; context caching supported; only generateContent is supported; results kept for 6 weeks. (Google, )
  • Mistral batch inference: 50% discount; up to 1 million requests per batch; inline batches for under 10,000 requests; one model per batch; jobs expire after timeout_hours, 24 hours by default and under 7 days; job statuses QUEUED, RUNNING, SUCCESS, FAILED, TIMEOUT_EXCEEDED, CANCELLATION_REQUESTED and CANCELLED. (Mistral, )
  • Anthropic recommends batch processing for manual thinking budgets above 32,000 tokens. (Anthropic, )

What may change

  • Batch limits, windows and retention periods are set by each provider and can change without notice. This page is reviewed quarterly.
  • Batch prices follow the standard per-token prices, which change more often than the 50% rule itself.

Frequently asked questions

How much cheaper is a batch API?

Half price. OpenAI, Anthropic, Google and Mistral all document a 50% discount on batch requests compared with standard real-time requests. For example, Claude Sonnet 5.5 drops from $2 to $1 per million input tokens and from $10 to $5 per million output tokens.

How long does a batch take?

Up to a day. OpenAI uses a 24-hour completion window and says batches often finish faster, Anthropic says most batches finish in under an hour and expire after 24 hours, and Google targets 24 hours and expires jobs after 48 hours running or pending.

How many requests fit in one batch?

It depends on the provider: up to 50,000 requests and 200 MB per OpenAI batch file, 100,000 requests or 256 MB per Anthropic batch, inline requests under 20 MB or a JSONL file up to 2 GB at Gemini, and up to 1 million requests per Mistral batch.

Do I pay for requests that fail or expire?

Generally not. OpenAI charges only for the requests that completed when a batch expires, and Anthropic does not bill requests that end as errored, canceled or expired. Check each result line, because a job can finish with some requests failed.

Can I combine batches with prompt caching?

Yes. Anthropic recommends the 1-hour cache duration for batches that share context, but cache hits inside a batch are best effort, not guaranteed. Gemini also supports context caching in batch mode.

Sources

  1. Batch API (OpenAI API guide): 50% discount, 24-hour window, JSONL input limits, statuses and output retention, OpenAI. Accessed October 23, 2026.
  2. Batch processing with the Message Batches API: limits, supported features, pricing and result retention, Anthropic. Accessed October 23, 2026.
  3. Gemini Batch Mode: inline and file input, 24-hour target, expiry, context caching and pricing, Google. Accessed October 23, 2026.
  4. Batch inference (Mistral documentation): request limits, timeout_hours, job statuses and discount, Mistral. Accessed October 23, 2026.
  5. Extended thinking (manual mode): budget_tokens, model support, deprecation and usage reporting, Anthropic. Accessed October 23, 2026.

Spotted an error or an outdated price? Tell us and we will fix it.

Change history

  • : First published. Checked against the OpenAI Batch API guide, Anthropic's batch processing page, Google's Gemini Batch Mode guide and Mistral's batch inference page on October 23, 2026.

Next review: .

Part of our LLM APIs & Costs guide.

Other topics