AI for developers
OpenAI Batch API Limits Compared With Claude and Gemini: Sizes, Windows and How Long Results Last
In short
OpenAI Batch API limits are 50,000 requests and a 200 MB input file per batch. Claude allows 100,000 requests or 256 MB, whichever comes first, and Gemini accepts an input file of up to 2 GB. The windows differ as well: OpenAI and Claude expire a batch after 24 hours, Gemini after 48, and results are kept for 29 or 30 days on two of the three.
What is the largest batch each API accepts?
The ceilings use three different units, which is the first trap when a job is moved. OpenAI counts requests and file size together: a batch may hold up to 50,000 requests, and its input file can be up to 200 MB. Embedding batches add a third ceiling of 50,000 embedding inputs across all requests.
Claude states one rule for both: a Message Batch is limited to 100,000 requests or 256 MB, whichever is reached first.
Gemini separates the submission method. Inline requests suit small batches whose total request size stays under 20 MB. A JSONL input file, uploaded through the File API, can be up to 2 GB.
How long can a batch take before it fails?
OpenAI currently lets you set only a 24h completion window. A batch that cannot finish inside that window gets the status expired.
Claude expects most batches to finish within an hour. A batch expires if processing does not complete within 24 hours, and the docs say requests may expire more often when demand or your request volume slows processing.
Gemini calls its target turnaround 24 hours, yet its job state becomes EXPIRED only after a job has been running or pending for more than 48 hours. An expired Gemini job has no results to retrieve, and the page suggests resubmitting or splitting the requests into smaller batches.
What happens to the requests that did finish?
Claude's guide says results can be read once every request has completed or after 24 hours, whichever comes first. OpenAI's status list defines expired as not completed within the 24-hour window and does not say, in the text I read, what is returned for the finished part.
How long do the results stay downloadable?
OpenAI keeps batch output and error files for 30 days after file creation by default. A request can set output_expires_after to choose any period from 1 hour to 30 days.
Claude keeps results for 29 days after the batch was created. After that you can still view the batch, but the results can no longer be downloaded.
The Gemini page I read states the 48-hour job expiry but gives no retention period for results, so plan to copy outputs out promptly.
Which limits sit outside the batch itself?
OpenAI's batch jobs use a queued input tokens limit per model. Those jobs share the Batch and Background rate limit with Background mode requests that use 2h or 8h completion windows, and input tokens are counted at submission. Queued tokens, not per-minute tokens, are what a big submission uses up.
Claude applies rate limits to the HTTP requests sent to the Batch API and to the number of requests waiting to be processed. Its docs add that batches may run slightly over the spend limit set for the workspace, and that batches belong to the workspace where they were created.
What can you not put into a batch?
Claude rejects batch requests that set stream true, fast mode, server-side fallbacks or max_tokens 0 with a validation error. Its reasons for the first three are that batch results come back as one file, that fast mode tunes synchronous latency and that fallbacks do not apply to batches. The other two pages I read do not list comparable validation rules, so test a small sample batch before you submit a large one.
Checked against: source 2
How should a large job be split?
Cut by the strictest unit in play rather than by one vendor's number.
- Keep each OpenAI file below 200 MB and 50,000 requests, and below the queued token limit of the model.
- Keep each Claude batch below 100,000 requests and 256 MB, which is the better fit for many short requests.
- Keep each Gemini batch small enough to finish in 24 hours, so a 48-hour expiry is never the plan.
- Download or copy results inside the shortest retention window, which is 29 days on Claude.
What else do people ask?
Can I cancel a running batch?
OpenAI documents cancellation: the status becomes cancelling until in-flight requests finish, which can take up to 10 minutes, then cancelled. Claude's batch object carries a canceled count and a cancel_initiated_at field. The Gemini job states include a cancelled state for jobs stopped by the user.
Are results in the same order as the requests?
The OpenAI and Gemini pages I read match results to requests by identifier, a unique custom_id on OpenAI and a key on each Gemini request line, so do not rely on position.
Sources
- OpenAI API docs, Batch API, fetched 2026-11-20
- Claude Platform docs, Batch processing, fetched 2026-11-20
- Gemini API docs, Batch API, fetched 2026-11-20
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. This page compares the three vendors' documentation, which I read on 20 Nov 2026. I did not submit batches to any of the APIs, so it reports documented limits, not observed behaviour. It leaves out prices and discount rates. Found a mistake? Tell me.