Anthropic Batch API: 50% Off, Limits and Result Storage
Anthropic batch API: 50% off Claude tokens, 100,000 requests per batch, results kept 29 days. See prices.
On this page
- Key Takeaways
- What is the Anthropic batch API?
- When should you use the Anthropic batch API instead of real-time requests?
- How do you create a batch with the Anthropic batch API?
- What are the Anthropic batch API limits?
- How much does the Anthropic batch API cost?
- How long does Anthropic keep batch API results?
- How do you handle errors and retries in Anthropic batch processing?
- Which features does the Anthropic batch API not support?
- How do you run Anthropic batch jobs inside a workflow automation?
- FAQs: Anthropic Batch API
The Anthropic batch API processes Claude requests asynchronously at 50% off standard input and output token prices. One batch holds up to 100,000 requests or 256 MB, most batches finish in under one hour, and results stay available for 29 days (Anthropic batch processing docs, 2026). Use it for work that does not need an instant answer, such as bulk classification, summaries and evaluations.
Key Takeaways
- The Anthropic batch API charges 50% less than the standard Messages API for both input and output tokens.
- One batch accepts up to 100,000 requests or 256 MB, whichever limit comes first.
- A batch expires if it is not finished within 24 hours, and results are kept for 29 days from the creation time.
- Errored, canceled and expired requests are not billed.
- Batch usage has its own rate limits and does not reduce your Messages API capacity.
What is the Anthropic batch API?
The Anthropic batch API, officially called the Message Batches API, is an endpoint that accepts many Claude requests in one call and processes them asynchronously at half the standard token price. You submit the batch, wait until processing ends, then download all results together (Anthropic batch processing docs, 2026).
Each request inside a batch has a unique custom_id and a params object with the same fields as a normal Messages API call. Results can return in any order, so match them to your inputs with custom_id, not by position.
When should you use the Anthropic batch API instead of real-time requests?
Use the Anthropic batch API when no person waits for the answer and the work can finish within 24 hours. Use real-time requests when a user needs a response in seconds. The trade is simple: batch gives a 50% lower price in exchange for a delay of up to 24 hours (Anthropic docs, 2026).
| Job | Better choice | Reason |
|---|---|---|
| Classify 50,000 support tickets overnight | Batch | Nobody waits; half the cost |
| Summarize a document archive | Batch | Large volume, no deadline |
| Run an evaluation suite on a new prompt | Batch | Many independent requests |
| Chat reply inside a product | Real-time | The user waits for the answer |
| Agent loop that needs each result before the next step | Real-time | Each step depends on the last |
Batch also keeps bulk jobs away from your interactive traffic, because batch usage does not affect Messages API rate limits (Anthropic rate limits docs, 2026).
How do you create a batch with the Anthropic batch API?
You create a batch by sending a list of requests, each with a custom_id and params, to the batches endpoint, then polling the batch until its status is ended. The Anthropic SDK handles the HTTP calls, so a working batch takes about ten lines of Python.
import anthropic
client = anthropic.Anthropic()
batch = client.messages.batches.create(
requests=[
{
"custom_id": "ticket-001",
"params": {
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Classify this ticket: ..."}
],
},
},
]
)
print(batch.id)
How do you check batch status and read results?
You check batch status by retrieving the batch and reading processing_status, which is in_progress, canceling or ended. When the status is ended, stream the results one at a time and match each result to its input by custom_id (Anthropic batch processing docs, 2026).
batch = client.messages.batches.retrieve(batch.id)
if batch.processing_status == "ended":
for item in client.messages.batches.results(batch.id):
print(item.custom_id, item.result.type)
Poll at an interval of a minute or more. Most batches finish in under one hour, so polling every few seconds adds requests without returning results sooner.
What are the Anthropic batch API limits?
The Anthropic batch API limits one batch to 100,000 requests or 256 MB, whichever comes first, and gives each batch 24 hours to finish. Separate rate limits apply to the batch endpoints and to the number of requests waiting in the queue (Anthropic rate limits docs, 2026).
| Limit | Value |
|---|---|
| Requests per batch | 100,000 |
| Size per batch | 256 MB |
| Processing window | 24 hours |
| Result storage | 29 days from creation |
How large can one batch be, and how do you split a bigger job?
One batch can hold 100,000 requests or 256 MB of request data, whichever limit comes first. Long prompts reach 256 MB before they reach 100,000 requests. Split a larger job into several batches and give every request a custom_id that is unique across all of them, such as chunk-07-row-1204.
What are the batch rate limits for each usage tier?
The batch rate limits depend on your usage tier. Each tier sets a cap on requests per minute to batch endpoints and a cap on requests waiting in the processing queue. Higher tiers receive higher caps (Anthropic rate limits docs, 2026).
| Tier | Batch endpoint requests per minute | Requests in queue |
|---|---|---|
| Start | 1,000 | 200,000 |
| Build | 2,000 | 300,000 |
| Scale | 4,000 | 500,000 |
Every tier keeps the same maximum of 100,000 requests per batch. For comparison with another provider, see OpenAI API rate limits.
How much does the Anthropic batch API cost?
The Anthropic batch API costs half the standard price of each model for both input and output tokens. For Claude Sonnet 5.5, batch pricing is $1 per million input tokens and $5 per million output tokens (Anthropic pricing, 2026).
| Model | Batch input (per million tokens) | Batch output (per million tokens) |
|---|---|---|
| Claude Opus 5.5 | $2 | $10 |
| Claude Sonnet 5.5 | $1 | $5 |
| Claude Haiku 5.5, prompts up to 100k tokens | $0.05 | $0.25 |
| Claude Haiku 5.5, prompts above 100k tokens | $0.25 | $1.25 |
| Claude Sonnet 4.x | $1.50 | $7.50 |
| Claude Haiku 4.5 | $0.50 | $2.50 |
What does a batch job cost in practice?
A batch of 1,000 requests with 2,000 input tokens and 1,000 output tokens each, run on Claude Sonnet 5.5, costs $7: $2 for 2 million input tokens and $5 for 1 million output tokens. The same job through the standard API costs $14, twice the batch price, because the batch discount is 50%.
Prices change often, so confirm the current numbers on the Anthropic pricing page before you budget a large job.
Do errored, canceled or expired batch requests cost money?
No, errored, canceled and expired requests are not billed. You pay only for requests that return a succeeded result (Anthropic batch processing docs, 2026). A batch that reaches the 24-hour limit therefore charges you for the finished requests and nothing for the rest.
Can you combine prompt caching with the batch discount?
Yes, prompt caching and the batch discount can be combined, and the savings add up. Caching works on a best-effort basis inside a batch, so a cache hit is not guaranteed, and Anthropic reports hit rates between 30% and 98% depending on traffic (Anthropic batch processing docs, 2026).
To raise the hit rate, put the shared content, such as instructions and reference documents, at the start of every request and keep it identical. Details of cache pricing are in the Anthropic prompt caching docs.
How long does Anthropic keep batch API results?
Anthropic keeps batch API results for 29 days from the batch creation time, and a batch expires if it does not finish within 24 hours. Download results and store them in your own system within that period, because the results cannot be fetched after 29 days (Anthropic batch processing docs, 2026).
Batches are not eligible for zero data retention (ZDR) or HIPAA workloads, so regulated data needs the standard Messages API under the right agreement.
How do you handle errors and retries in Anthropic batch processing?
Handle errors in the Anthropic batch API by reading the result type of each request: succeeded, errored, canceled or expired. A failed request does not fail the batch, so collect every request that is not succeeded and submit those again in a new batch (Anthropic batch processing docs, 2026).
| Result type | Meaning | Billed | Action |
|---|---|---|---|
succeeded | The request returned a message | Yes | Store the result |
errored | The request was invalid or hit a server error | No | Fix the input if invalid, then resubmit |
canceled | You canceled the batch before this request ran | No | Resubmit if still needed |
expired | The 24-hour window ended first | No | Resubmit in a new batch |
Validate your request shape with one small test batch before you submit 100,000 requests. A malformed params object returns errored for that request, and the same mistake repeated across the whole batch wastes a full day.
Which features does the Anthropic batch API not support?
The Anthropic batch API does not support streaming, so the stream parameter is rejected. The speed and fallbacks parameters and max_tokens: 0 are also unsupported (Anthropic batch processing docs, 2026). Zero data retention and HIPAA workloads are not eligible either.
For long outputs, the output-300k-2026-03-24 beta header raises max_tokens to 300,000 for batch requests on supported models. A single generation of that length can take over an hour, so plan around the 24-hour window.
How do you run Anthropic batch jobs inside a workflow automation?
You run Anthropic batch jobs inside a workflow automation by splitting the job into three steps: submit the batch, check processing_status on a schedule, and send the results to the tools that use them. In CodeWords, you describe the job and Cody builds it, connects your tools and keeps it running, on a schedule or a trigger.
Cody connects the finished results to other apps through 3,000+ integrations, so classified tickets can update a help desk or a spreadsheet without extra code. Browse the CodeWords integrations and templates to see which tools you can connect. For wider context, read the guide to AI workflow automation and the list of workflow automation tools.
Ready to run bulk Claude jobs without writing the polling and delivery code? Start building batch workflows on CodeWords.
FAQs: Anthropic Batch API
When to use batch vs stream processing?
Use batch processing when the work can wait up to 24 hours and the volume is large. Use streaming when a person reads the answer as it arrives. Batch halves the token price (Anthropic docs, 2026), while streaming gives the first words in seconds. Streaming is not available inside a batch.
How many API requests are too many?
A single batch holds at most 100,000 requests or 256 MB, whichever limit comes first (Anthropic docs, 2026). On the Start tier, the queue allows 200,000 waiting requests. A job larger than these limits is too large for one batch. Split it into several batches, each with unique custom IDs.