Skip to main content
Reference for managing live batch jobs: checking status, downloading outputs and error files, cancelling, and listing. For an end-to-end walkthrough, see Run a batch job.
Python examples require together>=2.0.0

Check batch status

batches.retrieve() returns the batch object directly (no .job wrapper, unlike create()).
Poll every 30 to 60 seconds. Tighter loops will hit rate limits without giving the server time to make progress.

Retrieve results

When the batch reaches COMPLETED, download the output file referenced by output_file_id. Per-request failures are stored separately in error_file_id. Always download both: a COMPLETED batch can still contain individual request failures.
Output and error lines are both keyed by the custom_id from your input, so you can reconcile them with a single pass over each file. Line order does not match input order.

Cancel a batch

You can cancel a batch while it is VALIDATING or IN_PROGRESS. Requests that have already completed before the cancellation are still billed, and their responses are still returned in the output file.

List batches

Errors

Error codes

Error file format

Each line in the error file pairs a custom_id from your input with the failure reason:
batch_errors.jsonl