Blog7 min read
OpenAI Batch API: half-price calls for work that can wait
The OpenAI Batch API runs requests within 24 hours at half the price. See the file format, the limits and a worked saving, then check yours in the calculator.
By Ali Hassan, Senior engineer for SaaS and AI products
The OpenAI Batch API runs your requests asynchronously, at half the price of the normal synchronous API, in exchange for a completion window of up to 24 hours. It suits work that can wait: overnight classification, embeddings over a backlog, bulk summaries, offline evaluations. You send one file of requests, come back later, and download the answers. This post covers the discount, the JSONL file format, the limits, the supported endpoints, how to retrieve results, how failures are handled, and how OpenAI compares with Anthropic and Gemini batches.
What is the OpenAI Batch API?
The OpenAI Batch API is an asynchronous endpoint. Instead of sending one request and waiting for the reply, you upload a file of many requests and collect the answers within 24 hours. In return, OpenAI bills input and output tokens at 50% of the standard rate. OpenAI's Batch API guide states that each batch completes within 24 hours, and often sooner.
The trade is latency for price. Anything a user waits on stays on the synchronous API; anything that can run overnight belongs in a batch. The discount is flat and needs no change to your prompts, so an $800 synchronous job becomes a $400 batch job for the same work.
How much does OpenAI Batch API pricing save?
OpenAI Batch API pricing is simple: take the standard per-token rate and halve it, on input and output alike. The discount does not depend on the model or the volume. Here are the current GPT-6 rates next to their batch equivalents, in US dollars per million tokens.
| Model | Input | Output | Batch input | Batch output |
|---|---|---|---|---|
| GPT-6 Luna | $0.10 | $0.50 | $0.05 | $0.25 |
| GPT-6.1 Sol | $2.00 | $10.00 | $1.00 | $5.00 |
| GPT-6 Astra | $10.00 | $50.00 | $5.00 | $25.00 |
These rates hold for prompts up to 272,000 tokens; above that the rate steps up. Take a job that sends 2,000 input and 400 output tokens across 100,000 requests a month on GPT-6.1 Sol: 200 million input and 40 million output tokens. At standard rates that is $800 a month. On the Batch API it is $400, a flat $400 saved for work that can wait a few hours. The OpenAI API pricing post lists the synchronous rates in full, and you can model your own volume in the API pricing calculator.
How does a batch job work?
A batch job is four steps built around one file format. You describe every request in a JSONL file, upload it, create the batch, then collect the results within 24 hours at the 50% discount. Nothing about the individual requests changes; you are moving them from live, one-at-a-time calls to a single bulk submission. The steps are:
- Write a JSONL file, one request per line. Each line carries a
custom_idyou choose, amethodof POST, aurlsuch as/v1/chat/completions, and abodythat is the request you would send synchronously. One file targets one model. - Upload the file to the Files API with
purposeset tobatch. - Create the batch from the uploaded
input_file_id, the endpoint, andcompletion_window, which must be24h. OpenAI's Batch API guide walks through the calls. - Check the batch object until its status is
completed, then download the file atoutput_file_id. Match answers to requests bycustom_id, because the output order can differ from the input.
Each JSONL line is a normal request wrapped with an id:
{"custom_id": "ticket-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "<model-id>", "messages": [{"role": "user", "content": "Summarise ticket 1"}]}}
What are the limits and supported endpoints?
A single batch holds up to 50,000 requests, and the input file can be up to 200 MB. You can create up to 2,000 batches an hour. Queued batch tokens count against a separate per-model limit rather than your standard rate limits, so a backlog does not throttle your live traffic, and every request still bills at 50% off. Most batches finish well inside their 24 hours. Several endpoints accept batched requests:
/v1/responses/v1/chat/completions/v1/embeddings/v1/completions/v1/moderations/v1/images/generationsand/v1/images/edits
Embeddings are a common fit, since a backlog of documents to index has no user waiting on it. The one file to one model rule means a mixed workload needs one batch per model.
How do you handle failures and expiry?
A batch moves through validating, in_progress, finalizing and completed. It can also end failed, expired, cancelling or cancelled. Individual failed requests are written to a separate file at error_file_id, one error per line, so a few bad rows do not sink the whole job. You read that file the same way you read the output, by custom_id.
Expiry is the case to plan for. If a batch does not finish inside the 24 hours, its unfinished requests are cancelled and marked with the code batch_expired, while the requests that did complete stay in the output file and are billed. Output and error files are kept for 30 days by default. Cancelling a batch yourself moves it to cancelling for up to 10 minutes, then cancelled. Treat retrieval as a step that can return partial results, not a certainty.
How does it compare with Anthropic and Gemini batches?
All three large vendors run a batch tier at the same headline discount of 50%, with a target of 24 hours. The limits, the retrieval details and the file formats differ, so the right choice usually follows whichever model you already use rather than the batch terms. The table sums up where they diverge.
| Feature | OpenAI Batch | Anthropic Message Batches | Gemini batch |
|---|---|---|---|
| Discount | 50% | 50% | 50% |
| Window | Within 24h | Within 24h, most under 1h | 24h target |
| Per-batch limit | 50,000 requests, 200 MB | 100,000 requests, 256 MB | 2 GB input file |
| Results kept | 30 days | 29 days | Download after the job |
Anthropic's Message Batches finish most jobs in under an hour and keep results for 29 days; batch is 50% off on every Claude model, so on Anthropic's pricing page on 30 November 2026, Claude Fable 5.2 at $8 and $40 per million tokens runs at $4 and $20 on batch. Gemini batch mode charges 50% of the standard cost and expires a job after 48 hours; from 1 December 2026 Gemini 4 Carbon and Argon list at $4 and $20 per million, about $2 and $10 on batch. Claude API pricing and Gemini API pricing carry the per-model rates.
When should you bring in help?
The Batch API is the rare saving with no catch beyond latency: half price for work that can wait. The real question is which parts of your workload tolerate a few hours' delay, and whether the engineering to split them off is worth the money, whether that is $400 a month or $4,000.
I move the asynchronous parts of a product, the embeddings, the bulk classification, the nightly reports, onto the batch tier, and keep the synchronous path for anything a user waits on. On an AI audit reviewer I built for a CPA firm, logging tokens put a review at a measured $0.24 to $0.28, the kind of number that tells you whether batching is worth the work. If your OpenAI bill is climbing faster than your usage, an LLM cost and RAG quality audit measures cost per request on your real traffic and ranks the changes by what they save.


