Retrieve Batch
Poll a batch at /v1/batches/
Overview
Returns the batch with liverequest_counts. Once status is completed, failed, expired, or cancelled, download output_file_id and error_file_id from the content endpoint. Poll every 30 to 60 seconds; there is no webhook.Authorizations
Morph API key, passed as Authorization: Bearer sk-.... Create keys at https://www.morphllm.com/dashboard/api-keys.
Path Parameters
Identifies the batch to read.
The batch_ prefixed id returned when the batch was created.
"batch_5f4e3d2c-1b0a-4f9e-8d7c-6b5a4f3e2d1c"
Response
The batch.
A batch and where it is in its lifecycle.
Batch identifier, batch_ prefixed.
"batch_5f4e3d2c-1b0a-4f9e-8d7c-6b5a4f3e2d1c"
Object type, always batch.
"batch"
The endpoint every line targets. Always /v1/chat/completions.
"/v1/chat/completions"
The file the batch reads its requests from.
"file_9c2c1c3e-5b6a-4f0e-8d0f-2a1b3c4d5e6f"
Always 24h. Requests still queued when the window closes are written to the error file as batch_expired.
"24h"
The key-value pairs you attached at creation, or null.
Unix timestamp (seconds) for when the batch was created.
1780000000
Lifecycle state. completed, failed, expired, and cancelled are terminal. expired and cancelled batches still expose partial output.
validating, in_progress, finalizing, completed, failed, expired, cancelling, cancelled "in_progress"
File holding one BatchOutputLine per request the model answered. Set once the batch is terminal; null before that and when nothing completed.
null
File holding one BatchErrorLine per request that never got a model response. Set once the batch is terminal; null before that and when nothing failed.
null
Unix timestamp (seconds) for when processing started. null until it happens.
1780000012
Unix timestamp (seconds) for when output files started being written. null until it happens.
null
Unix timestamp (seconds) for when the batch completed. null until it happens.
null
Unix timestamp (seconds) for when the batch failed. null until it happens.
null
Unix timestamp (seconds) for when the batch expired. null until it happens.
null
Unix timestamp (seconds) for when the completion window closes. null until it happens.
1780086400
Unix timestamp (seconds) for when cancellation was requested. null until it happens.
null
Unix timestamp (seconds) for when cancellation finished. null until it happens.
null
Progress counters. Advance while the batch is in_progress; final once it is terminal.
Why the batch failed validation, or null.
null
Token totals so far, or null before any request has completed.
The model the batch runs on, once validation has read it from the input file.
"morph-glm53flash"