List Message Batches
beta().messages().batches().list(BatchListParamsparams = BatchListParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : BatchListPage
/v1/messages/batches?beta=true
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
Parameters
Returns
List Message Batches
Kotlin
package com.anthropic.example
import com.anthropic.client.AnthropicClient
import com.anthropic.client.okhttp.AnthropicOkHttpClient
import com.anthropic.models.beta.messages.batches.BatchListPage
import com.anthropic.models.beta.messages.batches.BatchListParams
fun main() {
val client: AnthropicClient = AnthropicOkHttpClient.fromEnv()
val page: BatchListPage = client.beta().messages().batches().list()
}{
"data": [
{
"id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
"archived_at": "2024-08-20T18:37:24.100435Z",
"cancel_initiated_at": "2024-08-20T18:37:24.100435Z",
"created_at": "2024-08-20T18:37:24.100435Z",
"ended_at": "2024-08-20T18:37:24.100435Z",
"expires_at": "2024-08-20T18:37:24.100435Z",
"processing_status": "in_progress",
"request_counts": {
"canceled": 10,
"errored": 30,
"expired": 10,
"processing": 100,
"succeeded": 50
},
"results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",
"type": "message_batch"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}Returns Examples
{
"data": [
{
"id": "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
"archived_at": "2024-08-20T18:37:24.100435Z",
"cancel_initiated_at": "2024-08-20T18:37:24.100435Z",
"created_at": "2024-08-20T18:37:24.100435Z",
"ended_at": "2024-08-20T18:37:24.100435Z",
"expires_at": "2024-08-20T18:37:24.100435Z",
"processing_status": "in_progress",
"request_counts": {
"canceled": 10,
"errored": 30,
"expired": 10,
"processing": 100,
"succeeded": 50
},
"results_url": "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results",
"type": "message_batch"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}