Developer and Text Tools

Batch AI Jobs from a Spreadsheet: Building JSONL Request Files

How to turn a CSV into batch request files for OpenAI, Anthropic and Gemini, avoid common upload errors, and join the results back to your data.

Saizul Amin
Saizul Amin3 Nov 2026 · 4 min read
Batch AI Jobs from a Spreadsheet: Building JSONL Request Files

Some AI jobs are not conversations at all. Labelling forty thousand customer reviews, translating a product catalogue, summarising a year of support tickets or writing descriptions for every item in a shop are all the same pattern: one prompt template, many rows of data. Sending those one request at a time is slow and runs into rate limits. Batch APIs are built for exactly this. You upload a file of requests, the provider works through it within a day, usually at around half the normal price, and you download the answers. The hard part is preparing a file the provider accepts and matching the answers back to your data. This guide covers both.

What a batch file looks like

Batch files use JSON Lines: plain text with one complete JSON object per line. Each line is one request and carries an identifier you choose, so results can be matched even though they may come back in any order.

The envelope differs by provider. OpenAI lines contain a custom_id, the HTTP method, the endpoint path and a body that looks like a normal API request. Anthropic batch requests contain a custom_id and a params object with the model, the maximum tokens and the messages; they are submitted as a JSON list in the body of a single API call. Gemini lines contain a key and a request with the conversation contents and generation settings.

From spreadsheet to requests

Open the LLM Batch Request File Builder. Drop your CSV on the data tab or paste it; the first row must hold column names. A preview table shows the rows so you can confirm the file was read correctly, including quoted cells that contain commas.

On the request tab, choose the provider and endpoint and type the exact model identifier from your provider's documentation. Then write the prompt template. Placeholders in double braces insert values from a column; buttons add each column for you, and a special placeholder inserts the row number. A system prompt can be the same for every row or come from a column, which is handy when different rows need different instructions.

Identifiers deserve care. If your data already has a unique ID column, use it; that makes the final join trivial. Otherwise use a pattern such as req followed by a zero-padded row number. Anthropic only accepts letters, digits, hyphens and underscores up to 64 characters, and the builder checks that rule.

Set the maximum output tokens, an optional temperature and JSON output if you want machine-readable answers. Anything else the API supports can go into the extra parameters box as a JSON object; it is merged into every request in the right place.

Validate before you upload

A rejected upload after a long wait is frustrating, so the builder validates every line first. It reports template placeholders that do not match any column, rows whose prompt is empty after filling, missing or duplicate identifiers, identifiers that break provider rules, invalid extra parameters and rows so long they might exceed a context window. The summary shows the number of requests, the total size and an estimate of input tokens, which helps with budgeting.

Providers also limit each batch. OpenAI accepts up to 50,000 requests and 200 MB per file, and Anthropic up to 100,000 requests or 256 MB per batch. When your job is bigger, the builder splits it into numbered files automatically; submit each as its own batch.

If you have edited a file by hand or produced it with a script, the check tab validates any JSONL file line by line against the chosen provider's format.

Reading the results

When a batch completes, download its results file and drop it on the results tab. The builder recognises OpenAI, Anthropic and Gemini result formats and shows each identifier with its status, the response text, token usage and stop reason. Totals at the top show how many requests succeeded and failed and how many tokens were used.

The most useful button joins the answers back onto your original CSV by identifier, adding status, response, error and token columns. Rows without a result are marked as missing. A second button downloads the failed identifiers so you can build a small retry batch.

Start small

Before running tens of thousands of rows, build a batch from the first twenty, submit it and read the results. Adjust the template until the answers look right, then run the full file with the same settings. The cost of a small test is trivial compared with discovering a prompt problem after the whole job has finished.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages