Get the results of a message batch
/v1/messages/batches/{batchId}/resultsGet the results of a message batch.
Compatible with Anthropic's Retrieve Message Batch Results API: the ended batch's results as JSONL (application/x-jsonl), one line per request with its custom_id and result, as Anthropic sends them. Reading results bills nothing (the batch is billed once it ends, whether or not the results are read). With a virtual key, only a batch that key created is found; any other id is a 404.
Errors are in Anthropic's shape: 400 for a non-Anthropic or PLATFORM key or x-config; 401 for a missing or invalid credential; 403 for a disabled or expired key; 404 for an unknown batch.
Authorization
AuthorizationBearer <slug>.<secret>A virtual key's API key (
vk-....<secret>), asAuthorization: Bearer. What the OpenAI SDK sends from itsapi_key. Used by the inference endpoints.- or
x-virtual-keyheaderA virtual key's API key in the
x-virtual-keyheader, for clients that keepAuthorizationfor something else. - or
x-api-keyheaderDirect credentials: the provider's own API key in
x-api-key, with the provider named inx-provider(for exampleopenai). On/v1/messagesa virtual key is accepted inx-api-keytoo, which is what the Claude SDK sends.
Path parameters
batchIdstringrequiredthe batch id (
msgbatch_...)
Headers
x-providerstringWith direct credentials: the provider
x-api-keybelongs to, for exampleopenaioranthropic(case and dashes are normalised). Not used with a virtual key.anthropic-betastringAnthropic beta features, comma-separated (for example
context-management-2025-06-27). Forwarded to Anthropic and Claude on Vertex only; at most 32 names of lower-case letters, digits and dashes.