AnthropicClaude Certified Architect – Foundations2026-104.5 Design efficient batch processing strategies
Batch Processing with Message Batches API
Completed by opening the official lab
Why it matters
Section 4.5 decides when work can wait for a batch. This notebook shows the batch lifecycle end to end, so you can see what you give up compared with a synchronous call.
What to practise
Submit a batch where each request carries a custom_id and its own params, poll the batch until processing_status is ended, and read the request counts. Then iterate over the results and handle each result.type: succeeded, errored, canceled and expired. The second example mixes a plain question, a system prompt, a multi-turn conversation and an image in one batch. The notebook calls client.beta.messages.batches; the generally available SDK exposes the same calls as client.messages.batches.
How it fits
Results come back keyed by custom_id, which is what 4.5.4’s recovery joins on. The four result types and the discount are 4.5.2. Polling with no deadline is where 4.5.3 adds a cutoff, and a small first batch like this one is the sample run of 4.5.5. Compare the whole flow with 4.5.1’s synchronous Messages call.