Batch API
An async API endpoint that processes many message requests in parallel at a 50% discount on both input and output tokens. Trades latency (seconds → minutes) for cost.
The Anthropic Batch API accepts up to thousands of message requests in one submission, processes them asynchronously, and returns results when the whole batch is done. Anthropic's stated SLA: most batches complete in under an hour; hard limit is 24 hours.
The pricing win is a straight 50% discount on both input and output tokens versus the synchronous Messages API. That stacks with prompt caching, so a cache-heavy workload run via batch can approach 60-70% total savings vs naive synchronous requests.
Batch is designed for background/asynchronous work: content moderation over large corpora, evaluation runs, offline classification jobs, or scheduled tasks whose output doesn't need to arrive within human-conversation latency. It's a bad fit for anything the user is waiting on — the async round-trip breaks interactive UX.
Practical shape: submit a batch (POST with an array of requests, each with a custom_id), receive a batch_id, poll the batch status endpoint until it reports "ended," then fetch results as JSONL where each row is keyed by the custom_id.