Batch JSONL builder
Turn a CSV, JSON or JSON Lines file and one request template into Anthropic Message Batches requests, checked, split at the limits and priced.
What it does
Give it rows and one request template. For each row, it fills the template's {{column}} placeholders and writes a request for Anthropic's Message Batches API. The rows can be a CSV file, a JSON array or JSON Lines. It then:
- gives each request a unique, repeatable
custom_id: numbered (review-000001), or taken from a column; - checks every request against the rules Anthropic's pages state, and lists each refused row with the reason;
- splits the requests into several batches when they pass 100,000 requests or 256 MB;
- estimates the cost at Anthropic's stated batch discount;
- lets you download the files.
The rows never leave your browser. A file is read in a background thread, as it streams, so a file of tens of megabytes does not freeze the page. A shared link holds the template and the settings, never the rows. "Share settings only" leaves the template out too.
Salyro does not offer a Batch API. The files are for Anthropic's own, and the tool helps you prepare them.
The template
The template is one request, written as Anthropic Messages, or as OpenAI Chat Completions, OpenAI Responses or Gemini. A template in another format is converted row by row, and anything that does not carry over is listed.
{{column}}works inside any string:"content": "Review: {{review}}". The value is written in as text, so quotes and new lines in a cell cannot break the JSON.- A string that is only
{{column | json}}takes the cell as JSON, for a number or a list:"max_tokens": "{{max | json}}". - To write a literal
{{, put\\{{in the template's JSON. JSON reads\\as one backslash, and the template reads\{{as a literal{{. - Every row after the first with a given
custom_idis refused, even when the first one was refused too. Otherwise a later row with that id would be sent, and its result joined back to the wrong row. custom_ids are unique across all the batches a file is split into, not only within each one as Anthropic requires. The merger joins every batch's results back to one set of rows, and that join needs one row per id.- A template converted from another format keeps its
model. When that is not a Claude model, the tool says so, because Anthropic's batch API would refuse the requests. - A placeholder that names a column the rows do not have refuses the row, and says which column is missing.
What it checks
From Anthropic's batch-processing page and its API reference:
- custom_id: it must match
^[a-zA-Z0-9_-]{1,64}$and be unique within the batch. - Limits: a batch holds at most 100,000 requests or 256 MB, whichever comes first. The tool counts a megabyte as 1,000,000 bytes, the stricter reading, and measures the JSON it writes.
- Refused parameters:
stream: true,speed(fast mode) andmax_tokens: 0are refused in a batch. Every request needs amodel,messagesand amax_tokensof at least 1.
The file
Anthropic creates a batch from one JSON body, {"requests": [{"custom_id": …, "params": {…}}]}, sent to POST /v1/messages/batches, not from an uploaded JSONL file. The download is that body. The results come back as a .jsonl file, which the Batch results merger joins back to your rows.
What it does not know
- OpenAI's Batch API and Gemini's batch mode. Their pages could not be read when this tool was built, so their line format and limits are unknown and not guessed. Only Anthropic's batches are built.
- Exact input tokens. Claude's tokenizer does not run in the browser, so input is estimated at about 4 characters a token. Output is each request's
max_tokens, the most it can be. - A model outside Salyro's catalogue is not priced. The request is still built.
FAQ
Why a JSON body, when the tool is called a JSONL builder?
Anthropic's Message Batches API takes the requests in one JSON body, and returns the results as JSONL. The body is what its API accepts, so it is what the tool writes.
Will the same file give the same custom_ids again?
Yes. Numbered ids come from each row's position, so the merger can form the same ids from the same file and join the results back.
Sources
The limits, the custom_id rule and the refused parameters quote Anthropic's batch-processing page and its Message Batches API reference, on platform.claude.com. They are recorded as Reference Data with the date they were read, and listed in the data freshness report. The batch discount and the prices come from Salyro's catalogue and Reference Data.
Where the numbers come from
- Model and pricing data is a snapshot of the catalogue Salyro itself uses, taken when this site was built.
- Facts about models and providers that are not in that catalogue carry their own source and the date they were checked, and are shown as unknown where no reliable source exists.
