curl https://api.anthropic.com/v1/messages/batches \
--header "x-api-key: $ANTHROPIC_API_KEY" \
--header "anthropic-version: 2023-06-01"{
"data": [
{
"archived_at": "2024-08-20T18:37:24.100435Z",
"cancel_initiated_at": "2024-08-20T18:37:24.100435Z",
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2024-08-20T18:37:24.100435Z",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"request_counts": {
"canceled": 0,
"errored": 0,
"expired": 0,
"processing": 0,
"succeeded": 0
},
"results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",
"type": "message_batch"
}
],
"first_id": "<string>",
"has_more": true,
"last_id": "<string>"
}List Message Batches
List all Message Batches within a Workspace. Most recently created batches are returned first.
Learn more about the Message Batches API in our user guide
curl https://api.anthropic.com/v1/messages/batches \
--header "x-api-key: $ANTHROPIC_API_KEY" \
--header "anthropic-version: 2023-06-01"{
"data": [
{
"archived_at": "2024-08-20T18:37:24.100435Z",
"cancel_initiated_at": "2024-08-20T18:37:24.100435Z",
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2024-08-20T18:37:24.100435Z",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"request_counts": {
"canceled": 0,
"errored": 0,
"expired": 0,
"processing": 0,
"succeeded": 0
},
"results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",
"type": "message_batch"
}
],
"first_id": "<string>",
"has_more": true,
"last_id": "<string>"
}Headers
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.
Query Parameters
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
Number of items to return per page.
Defaults to 20. Ranges from 1 to 1000.
1 <= x <= 1000Response
Successful Response
Show child attributes
Show child attributes
First ID in the data list. Can be used as the before_id for the previous page.
Indicates if there are more results in the requested page direction.
Last ID in the data list. Can be used as the after_id for the next page.
Was this page helpful?