Create Batch, Poll, and Retrieve Results
A 3-step recipe with Anthropic. We can help you get access.
Recipe · 3 steps
Create Batch, Poll, and Retrieve Results
with Anthropic
Create a message batch, wait for it to finish, and pull the results.
- Create a new message batch from the supplied individual requests. The batch begins processing immediately.
- Retrieve the current status of the batch. Branch back to poll again while it is still in progress, or continue once processing has ended.
- Download the JSONL results stream for the completed batch. Each line is a JSON object holding one request's result, keyed by custom_id.
What you'll need to have ready
- apiKey: A valid Anthropic API key sent in the x-api-key header.
- model: Default model id referenced by the documentation for the batch requests.
- requests: The array of individual batch requests, each with a custom_id and a params object (model, max_tokens, messages).
For your developer
Arazzo workflow anthropic:create-poll-retrieve-batch, 3 operations: createMessageBatch → retrieveMessageBatch → retrieveMessageBatchResults. Specs on APIs.io.