Build Batch API Requests from JSONL
You have ten thousand prompts and a batch endpoint that wants a very particular file. This wraps each record in the request envelope the provider expects — custom_id, method, URL and body for OpenAI; custom_id and params for Anthropic — pulling the prompt out of whatever field it happens to live in. Batch endpoints are roughly half the price of the synchronous ones, and the file format is the only thing standing between you and that.
Build requests
What it reads, and what it writes
Records already in chat shape — with a messages array — are passed through as the message list, so a
fine-tuning file can become a batch file without reshaping. Otherwise the first of prompt,
input, text, question or instruction becomes a single user
message, or you name the field yourself. The status bar says how many records came from each route, which is the
quickest way to spot that half your file used a field you didn't expect.
OpenAI lines are {"custom_id", "method": "POST", "url", "body"} with the model,
messages and limits inside the body. Anthropic lines are
{"custom_id", "params"} with the model, max_tokens and messages inside params,
and any system message hoisted to a top-level system string, which is where that provider expects it.
Choosing the embeddings endpoint changes the body to an input string instead of a message list.
custom_id is the part that fails
Every request needs one, they must be unique within the file, and they are how you match results back to inputs —
batch responses come back in no guaranteed order. Point custom_id from at your own identifier field so
the mapping is meaningful; without one you get req-1 upward by position, which works only as long as
you keep the input file. Duplicates are suffixed rather than dropped, and counted in the status bar, because a
duplicate is usually a sign the field you picked isn't a key.
Providers cap batch size and file size — the exact numbers change, so check the current docs before submitting. If you need to split the file, Splitter cuts by line count and Token counter tells you the input tokens you are about to pay for.
Privacy
Nothing is uploaded. The whole thing runs in this tab, in your own browser — this page has no API key and makes no network calls. You upload the file to your provider yourself.
Frequently asked questions
Does it send anything to OpenAI or Anthropic?
No. It builds a file. Submitting it is a separate step you do with your own credentials, which is also why no key is asked for here.
Can I set per-record models or parameters?
Not from this page — one model and one set of parameters apply to the whole file. For per-record control, build the file here and then rewrite the varying field with Query, or generate the whole envelope with Template render.
How do I check the file before uploading?
Run it through the Batch API validator, which checks the per-line shape and the constraints the upload enforces. It is worth doing: a batch rejected on line 9,000 costs you the whole submission.
What comes back, and how do I use it?
A JSONL file of results, one line per request, keyed by custom_id. Join it back to your inputs with Join two files on that field.