Skip to main content
GET
Retrieve a Message Batch
Use ?beta=true with anthropic-beta: message-batches-2024-09-24 for the beta request and response shapes shown here.

Authorizations

X-Api-Key
string
header
default:sk-ant-local-default
required

OMA workspace API key.

Headers

anthropic-beta
string
required

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.

anthropic-version
string

The version of the OMA API you want to use.

Read more about versioning and our version history here.

Path Parameters

message_batch_id
string
required

ID of the Message Batch.

Query Parameters

beta
enum<boolean>
required

Selects the beta API contract for this endpoint. Must be true.

Available options:
true

Response

Successful Response

archived_at
string<date-time> | null
required

RFC 3339 datetime string representing the time at which the Message Batch was archived and its results became unavailable.

Example:

"2024-08-20T18:37:24.100435Z"

cancel_initiated_at
string<date-time> | null
required

RFC 3339 datetime string representing the time at which cancellation was initiated for the Message Batch. Specified only if cancellation was initiated.

Example:

"2024-08-20T18:37:24.100435Z"

created_at
string<date-time>
required

RFC 3339 datetime string representing the time at which the Message Batch was created.

Example:

"2024-08-20T18:37:24.100435Z"

ended_at
string<date-time> | null
required

RFC 3339 datetime string representing the time at which processing for the Message Batch ended. Specified only once processing ends.

Processing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired.

Example:

"2024-08-20T18:37:24.100435Z"

expires_at
string<date-time>
required

RFC 3339 datetime string representing the time at which the Message Batch will expire and end processing, which is 24 hours after creation.

Example:

"2024-08-20T18:37:24.100435Z"

id
string
required

Unique object identifier.

The format and length of IDs may change over time.

Example:

"msgbatch_013Zva2CMHLNnXjNJJKqJ2EF"

processing_status
enum<string>
required

Processing status of the Message Batch.

Available options:
in_progress,
canceling,
ended
Example:

"in_progress"

request_counts
RequestCounts · object
required

Tallies requests within the Message Batch, categorized by their status.

Requests start as processing and move to one of the other statuses only once processing of the entire batch ends. The sum of all values always matches the total number of requests in the batch.

results_url
string | null
required

URL to a .jsonl file containing the results of the Message Batch requests. Specified only once processing ends.

Results in the file are not guaranteed to be in the same order as requests. Use the custom_id field to match results to requests.

Example:

"https://oma.example.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results"

type
string
default:message_batch
required

Object type.

For Message Batches, this is always "message_batch".

Allowed value: "message_batch"