Retrieve Message Batch results
messages.batches.results(message_batch_id) -> MessageBatchIndividualResponseGET/v1/messages/batches/{message_batch_id}/results
Streams the results of a Message Batch as a .jsonl file.
Each line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the custom_id field to match results to requests.
Learn more about the Message Batches API in our user guide
Retrieve Message Batch results
require "anthropic"
anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")
message_batch_individual_response = anthropic.messages.batches.results("message_batch_id")
puts(message_batch_individual_response)