Batch API
In shortA batch API takes many AI requests at once, processes them later and returns the results at a lower price than live calls.
In plain words
A normal API call is live: you send one request and wait for the answer. A batch API works like a mail order. You upload many requests in one go, the provider runs them when it has spare capacity, and you collect the results later. In return, you pay less.
All three big providers offer this. Anthropic's Message Batches API states a cost reduction of 50 percent, and says most batches finish in under an hour. OpenAI's Batch API gives 50 percent off synchronous calls with a completion window of 24 hours. Google's Gemini Batch API prices usage at 50 percent of the standard interactive cost, with a target turnaround of 24 hours. Terms and model lists change, so check the current docs and the table of AI API prices.
Why it matters
- Cost: For work that can wait, half price on the same tokens is the biggest saving you can get without changing the model. Try the numbers in the cost calculator.
- Limits: Batches usually have their own limits. OpenAI states that batch limits are separate from per-model rate limits, so a big batch does not eat your live capacity.
- Trade-off: No instant answers. Chat, live assistants and anything a person waits for need the normal API.
- Combine with caching: If every request shares a long start, prompt caching can cut cost further. Check each provider's rules for combining the two.
Example
A shop has 40,000 product descriptions to classify into categories and to rewrite in a standard tone. Nobody needs the results this minute. The team writes one request per product into a file, submits it as a batch, and checks back later. They pay the lower batch price, and the live shop assistant keeps its full rate limit.
Common misconceptions
- "Batch means a worse model." It is the same model. Only timing and price change.
- "Results come back in seconds." Often they take minutes to hours, and the provider promises only an upper bound such as 24 hours.
- "One failed request ruins the batch." Each request is handled on its own, and you can check which ones failed and resend only those.
Questions and answers
What is the Batch API discount?
Anthropic, OpenAI and Google each document 50 percent off standard prices for batch use, with results returned later. Check the current terms before you plan around it.
How long does a batch take?
The providers give an upper bound, commonly 24 hours. Anthropic says most batches finish in under an hour.
When should I not use a batch API?
When a person waits for the answer, such as in chat or live support. Use the normal API for those.
Read next
- Price per million tokens
Price per million tokens is the usual way AI APIs state their rates: what you pay for each million tokens sent in or generated.
- Rate limit
A rate limit caps how many requests or tokens you may send to an AI API in a set time; going over returns an error, usually HTTP 429.
- Prompt caching
Prompt caching lets an AI provider reuse the already processed start of your prompt, so repeated parts are cheaper and faster.
- AI API prices compared: cost per 1 million tokens
A table of AI API list prices per 1 million tokens, with source and check date for every row.
- AI cost calculator: estimate API cost per call and month
A free calculator that turns token counts and list prices into a cost per call and per month.