Message Batches API changedbuild-with-claude/batch-processing
Nearest release: v2.1.304, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+8added
Lines−28removed
From line
457
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits22to this page, all time
The whole hunk
from line 457, old and new numbered
/
from line 457
457457
458458<CodeGroup>
459459 ```bash cURL
460 #!/bin/sh
461 # ...
462460 # Check the status; repeat until processing_status is "ended"
463 curl -s "https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID" \
461 curl "https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID" \
464462 --header "x-api-key: $ANTHROPIC_API_KEY" \
465 --header "anthropic-version: 2023-06-01" \
466 | jq -r '.processing_status'
463 --header "anthropic-version: 2023-06-01"
467464 ```
468465
469466 ```bash CLI
470 #!/bin/bash
471 # ...
472467 # Check the status; repeat until processing_status is "ended"
473468 ant messages:batches retrieve \
474 --message-batch-id "$MESSAGE_BATCH_ID" \
475 --transform processing_status --raw-output
469 --message-batch-id "$MESSAGE_BATCH_ID"
476470 ```
477471
478472 ```python Python
from line 605
611605
612606<CodeGroup>
613607 ```bash cURL
614 #!/bin/sh
615608 # Fetches one page. While the response's has_more is true, pass its
616609 # last_id as after_id to fetch the next page. (The SDKs and the CLI
617610 # perform automatic pagination.)
from line 720
727720
728721<CodeGroup>
729722 ```bash cURL
730 #!/bin/sh
731 # Fetch the batch's results_url, then stream the .jsonl results it
732 # points to. For per-result handling (retries, validation errors),
733 # use the SDK examples in the other tabs.
734 RESULTS_URL=$(curl -s "https://api.anthropic.com/v1/messages/batches/msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d" \
723 # Streams the batch's .jsonl results, one result per line.
724 # For per-result handling (retries, validation errors), use the Claude SDK.
725 curl "https://api.anthropic.com/v1/messages/batches/msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d/results" \
735726 --header "anthropic-version: 2023-06-01" \
736 --header "x-api-key: $ANTHROPIC_API_KEY" \
737 | jq -r '.results_url')
738
739 curl -s "$RESULTS_URL" \
740 --header "anthropic-version: 2023-06-01" \
741 --header "x-api-key: $ANTHROPIC_API_KEY" \
742 | jq -r '"\(.result.type): \(.custom_id)"'
727 --header "x-api-key: $ANTHROPIC_API_KEY"
743728 ```
744729
745730 ```bash CLI
746 # Prints one line per result, e.g. `{"custom_id":"test-1","type":"succeeded",…}`.
731 # Prints one result per line, e.g. `{"custom_id":"test-1","result":{"type":"succeeded",…}}`.
747732 # For per-result handling (retries, validation errors), use the SDK
748733 # examples in the other tabs.
749734 ant messages:batches results \
750735 --message-batch-id msgbatch_01HkcTjaV5uDC8jWR4ZsDV8d \
751 --transform '{custom_id,"type":result.type,"error":result.error.error.type}' \
752736 --format jsonl
753737 ```
754738
from line 941
957941
958942<CodeGroup>
959943 ```bash cURL
960 #!/bin/sh
961 # ...
962944 curl --request POST https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/cancel \
963945 --header "x-api-key: $ANTHROPIC_API_KEY" \
964946 --header "anthropic-version: 2023-06-01"
from line 947
965947 ```
966948
967949 ```bash CLI
968 #!/bin/bash
969 # ...
970950 ant messages:batches cancel --message-batch-id "$MESSAGE_BATCH_ID"
971951 ```
972952
No line in this hunk matches that.