Batches.

Updated November 22, 2026.

A batch runs many requests asynchronously from one uploaded file and returns its results as files when it finishes, through the batches API at https://api.uncensoredllm.ai/v1. Every route takes a key. You upload the input file first (see the files API), submit the batch, poll its status, and read the output when it completes.

Get a key

Create a batch

POST /v1/batches accepts:

FieldNotes
input_file_idAn uploaded batch input file.
endpointThe route each line calls.
completion_windowHow long the batch may take; 24h is the one value.
metadataYour own key and value pairs.

The response is the batch in progress. GET /v1/batches lists the organization’s batches, and GET /v1/batches/{batch_id} returns one with its request_counts.

The batch object

A batch carries id, object, endpoint, input_file_id, and a status that moves through validating, in_progress, finalizing and then one of completed, failed, expired or cancelled. When it finishes, output_file_id is set if any line answered with a success and error_file_id if any line failed or expired; read both through the files API. Lifecycle timestamps (in_progress_at, finalizing_at, completed_at, cancelled_at and the rest) and request_counts track progress, and errors holds any validation problems found at submission.

Cancel

POST /v1/batches/{batch_id}/cancel stops a batch that is still running; it moves to cancelling and then cancelled. A batch that has already finished cannot be cancelled.

Example

shell
1curl https://api.uncensoredllm.ai/v1/batches \
2 -H "Content-Type: application/json" \
3 -H "Authorization: Bearer sk-ullm-live-…" \
4 -d '{"input_file_id": "file_...", "endpoint": "/v1/chat/completions", "completion_window": "24h"}'

The response is the new batch with its id and starting status.

Status codes

200 on create, list, read and cancel. An unknown endpoint or a completion_window other than 24h is 400 invalid_request. An absent or invalid key is 401 invalid_api_key. No such input file, or no such batch in this organization, is 404 not_found. Cancelling a batch that already finished is 409 batch_not_cancellable.

Batches: questions

How do I submit a batch?

Upload a JSONL input file through the files API, then POST /v1/batches with its input_file_id and the endpoint each line should call. The batch runs asynchronously and reports progress in request_counts.

Where do the results go?

Into files: output_file_id collects the lines that succeeded and error_file_id the lines that failed or expired, each set once the batch finishes if it has any lines. Read them through the files API.

Can I stop a batch after it starts?

Yes, with POST /v1/batches/{batch_id}/cancel, as long as it has not already finished; a finished batch returns 409 batch_not_cancellable.

Read next

Join on TelegramHelp