Running uncensored models through the batch API.

Updated November 23, 2026.

Upload a JSONL file of chat requests, create a batch, and every line runs within the 24-hour window at half the catalog rate, held against your balance line by line; an uncensored or abliterated id behaves no differently in a batch than in a direct call to https://api.uncensoredllm.ai/v1/chat/completions. For synthetic data, eval sets and bulk rewrites it is the lowest-priced route this API offers, and the whole flow is four calls.

Get a key

What the discount applies to

The create-batch route describes the price as “the catalog rates less the batch discount of 50% on every line”, with the receipt and the usage log showing the discounted charge. The discount is per line, so a file that mixes ids is discounted at each id’s own list rate. Nothing in that description depends on the model’s tag: a line naming deepseek-v4.1-flash-1017-abliterated is priced from that id’s catalog row the same way as any other chat id.

Per-call fees for server tools, where a line declares them, are held before the batch and refused with a 402 when the balance cannot cover them, as the chat route description states; keep tools out of batch lines unless you have priced them.

The line format

A batch input file is JSONL: one request per line, each with a unique custom_id, method set to POST, a url, and the body you would have sent directly. Every line’s url must match the batch’s endpoint, which is one of /v1/chat/completions, /v1/completions, /v1/embeddings, /v1/responses or /v1/moderations.

json
1{"custom_id": "row-0001", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "deepseek-v4.1-flash-1017-abliterated", "messages": [{"role": "system", "content": "You label support tickets for a moderation dataset. Reply with one word: abusive, threatening, spam or clean."}, {"role": "user", "content": "<ticket text>"}], "max_tokens": 5}}
2{"custom_id": "row-0002", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "deepseek-v4.1-flash-1017-abliterated", "messages": [{"role": "system", "content": "You label support tickets for a moderation dataset. Reply with one word: abusive, threatening, spam or clean."}, {"role": "user", "content": "<ticket text>"}], "max_tokens": 5}}

Limits from the upload route: at most 50 MB and 50,000 lines per file, every line checked on upload with the first bad one named by number, and the file kept 30 days. A response_format in the body works the same as it does on a direct request, so the schema-locked approach on /uncensored-structured-outputs carries over line for line.

The curl flow

Four calls: upload, create, poll, download.

shell
1# 1. upload the file with purpose batch
2curl https://api.uncensoredllm.ai/v1/files \
3 -H "Authorization: Bearer sk-ullm-live-…" \
4 -F purpose=batch -F file=@tickets.jsonl
5# -> {"id": "file-…", "object": "file", "purpose": "batch", "status": "processed", ...}
6
7# 2. create the batch; completion_window is always 24h
8curl https://api.uncensoredllm.ai/v1/batches \
9 -H "Authorization: Bearer sk-ullm-live-…" \
10 -H "Content-Type: application/json" \
11 -d '{"input_file_id": "file-…", "endpoint": "/v1/chat/completions",
12 "completion_window": "24h", "metadata": {"job": "tickets-2026-11"}}'
13# -> {"id": "batch_…", "status": "validating", "request_counts": {"total": 0, "completed": 0, "failed": 0}, ...}
14
15# 3. poll until status is completed, expired, failed or cancelled
16curl https://api.uncensoredllm.ai/v1/batches/batch_… \
17 -H "Authorization: Bearer sk-ullm-live-…"
18
19# 4. download the output file (and the error file if error_file_id is set)
20curl https://api.uncensoredllm.ai/v1/files/file-…/content \
21 -H "Authorization: Bearer sk-ullm-live-…" -o answers.jsonl

The batch object moves through validating, in_progress, finalizing and then completed, expired, failed or cancelled; request_counts reports total, completed and failed as it goes. Each output line is {id, custom_id, response: {status_code, request_id, body}, error}, so you join answers back to your input on custom_id.

Where the lines end up

Answers with a 2xx go to the output file, everything else to the error file, and a line still unrun when the window closes lands in the error file with code batch_expired. Lines run through the same routes as a direct request; a refused line needs a different prompt or id on the next run. Lines run a few at a time per organization, which is why a large file is a batch job and not a loop of direct calls.

Cancelling

POST /v1/batches/{batch_id}/cancel leaves out every line not yet started and keeps every line already answered in the output file; the batch sits at cancelling until running lines finish, then cancelled. A batch that already finished answers 409 batch_not_cancellable. You still pay for the lines that ran.

Picking an id for bulk work

Any chat id with /v1/chat/completions in its catalog endpoints can head a line; 302 rows list it (availability ok). For batch work the useful columns are the list price, since the discount is taken from it, and the context window, which bounds how much you can put in one line.

Model idInput / output per 1MContext
deepseek-v4.1-flash-1017-abliterated$0.7275 / $3.03131,000,000 tokens
abliterated-model-large-flash$2.50 / $5.001,048,576 tokens
glm-5.3-flash-apex-abliterated$0.80 / $3.201,048,576 tokens
qwen3.8-27b-abliterated$1.0037 / $4.5326262,000 tokens
apex-flash-1-abliterated$0.68 / $2.32262,144 tokens

List prices per million tokens on 2026-11-23; a batch line is charged at that rate less the batch discount.

To size a file before uploading it, POST /v1/estimate prices one request on every model without a key, or with your key at your organization’s own prices; multiply by your line count and apply the discount. One direct-price line of 500 input and 300 output tokens on deepseek-v4.1-flash-1017-abliterated is $0.0013 before the discount.

When a batch is the right tool

The use case page at /synthetic-data-generation covers what teams generate and how to keep a set balanced; this page is only about the pipe. In short: anything where you have the prompts up front and can wait up to a day, including labeling, rewriting, translation of a corpus, eval sets, and preference pairs. Anything interactive stays on the direct route. The acceptable-use boundary applies to every line: a line that sexualises minors is rejected before it reaches any model.

Batch API: questions

What does the batch discount apply to?

To every line of a chat, completion, embedding, responses or moderation batch: the route description prices lines at the catalog rate less the batch discount of 50%, per line, and the receipt and usage log show the discounted figure. Server-tool fees inside a line are charged per call.

How long does a batch take, and can I cancel one?

The only completion window is 24h; lines run a few at a time per organization, and any line still unrun at the deadline expires into the error file. Cancel with POST /v1/batches/{batch_id}/cancel: unstarted lines are dropped, answered lines stay in the output file, and a finished batch returns 409.

Which uncensored ids can run in a batch?

Any id whose catalog endpoints include the batch’s endpoint, which for chat is every id with /v1/chat/completions, 302 rows on the live catalog. Each line names its own model, so one file can mix abliterated, uncensored and plain ids, each priced from its own row.

Read next

Join on TelegramHelp