v27

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2193427579.9 KB
Messages

Create a Message Batch.

Send a batch of message creation requests.

post/v1/messages/batches

Request body

Response

Successful Response

idstring required

Unique object identifier (msgbatch_ prefix).

type'message_batch'
processing_status'in_progress' | 'canceling' | 'ended' required

Processing status of the Message Batch.

created_atstring required

RFC 3339 datetime when the batch was created.

expires_atstring required

RFC 3339 datetime when processing will expire.

cancel_initiated_atstring nullable

RFC 3339 datetime when cancellation was initiated.

ended_atstring nullable

RFC 3339 datetime when all processing ended.

archived_atstring nullable

RFC 3339 datetime when the batch was archived.

results_urlstring nullable

URL to a .jsonl file containing the results.