Batches

Replace a batch's metadata

Replace the batch's metadata map with the one you send; the whole map is overwritten, so include every pair you want to keep and send an empty object to clear it. Metadata is opaque customer data, not lifecycle state, so it is editable at any time including after the batch is terminal. Returns the updated batch.

post/v1/batches/{id}/metadata

Path parameters

idstring required

Request body

metadataobject required

At most 32 pairs; each key is 1-64 characters and each value is at most 512 characters (counted in Unicode code points). An empty object clears all metadata.

Response

OK

cancelled_atinteger
completed_atinteger
completion_window'24h' required
created_atinteger required

Unix timestamp (seconds).

endpointstring required

The API family every record in the batch calls.

error_file_idstring

Present once results are written; fetch its content for failed records.

expired_atinteger
expires_atinteger

When the completion window closes (created_at + 24h).

failed_atinteger
idstring required

Batch id (batch_…).

input_file_idstring required
metadataobject

Your key-value pairs, echoed back unchanged.

modelstring

Model id, settled from the input file during validation.

object'batch' required
output_file_idstring

Present once results are written; fetch its content for successful records.

priority'standard' | 'expedited' required

The scheduling tier this batch runs and is billed at. Batches created before the tier existed read as standard.

status'validating' | 'in_progress' | 'finalizing' | 'completed' | 'failed' | 'expired' | 'cancelling' | 'cancelled' required

Lifecycle state. validating → in_progress → finalizing → completed | failed | expired; cancelling → cancelled.

Changes

Changed in 1 of the 36 revisions of this API.1