01What is OpenAI Batch JSONL Builder?
OpenAI Batch JSONL Builder writes the input file for OpenAI's Batch API and checks it before you upload. OpenAI's batch guide says each line of the .jsonl file is one request with custom_id, method, url and body. The body holds the same parameters as the endpoint you are calling. Getting one line wrong can fail the whole batch, so it pays to check first. To build a file, pick an endpoint, enter one prompt per line and edit the body template. Every {{prompt}} in a string value is replaced with the prompt, and {{n}} with the line number. The prompt is inserted as JSON data, so quotes and backslashes are escaped correctly. Each line gets a custom_id made from your prefix and a zero-padded number, method POST, and the chosen url. Blank prompt lines are skipped. If the template is not a JSON object, or has no {{prompt}} placeholder, you get an error instead of a file. You can also paste or edit any JSONL file in the right-hand box to validate it. Each line must parse as a JSON object with a non-empty custom_id that no other line uses. Fields other than custom_id, method, url and body get a warning. The method must be POST. The url must be one of the endpoints the guide lists: /v1/responses, /v1/chat/completions, /v1/embeddings, /v1/completions, /v1/moderations, /v1/images/generations and /v1/images/edits. The guide says an input file can only include requests to a single model, so mixed models are an error. Mixed endpoints are also an error, because a batch is created with one endpoint. File-level checks use the documented limits: 50,000 requests, 200 MB, and 50,000 embedding inputs across an embeddings batch. Moderation lines need an input and cannot set stream: true. A worked example: enter two prompts, First "quoted" and Second, with the prefix req- and the template {"model":"gpt-4.1-mini","input":"Summarize: {{prompt}}"}. You get two lines with custom_id req-1 and req-2, url /v1/responses, and input "Summarize: First \"quoted\"" with the quotes escaped. The validator then reports no issues, 2 requests, 249 bytes and the single model gpt-4.1-mini. There are limits. The tool does not check the body against each endpoint's full parameter list, so a misspelled parameter will pass here and fail at OpenAI. It does not upload anything or create the batch for you. Copy the result or download it as a .jsonl file, then upload it with the Files API.
Developers and data teams who run large, non-urgent jobs through OpenAI's Batch API and want the input file right the first time. The tool runs entirely in your browser, so your data never leaves your device.
02How to use OpenAI Batch JSONL Builder
- Pick the endpoint the batch will call
- Enter one prompt per line and set a custom_id prefix
- Edit the body template, keeping {{prompt}} where each prompt should go
- Click Generate and read the validation results under the JSONL
- Copy the JSONL or download it as a .jsonl file
03Worked examples
- Input:
Prompts: First "quoted" / Second. Template: {"model":"gpt-4.1-mini","input":"Summarize: {{prompt}}"}, endpoint /v1/responses, prefix req- - Result:
{"custom_id":"req-1","method":"POST","url":"/v1/responses","body":{"model":"gpt-4.1-mini","input":"Summarize: First \"quoted\""}} {"custom_id":"req-2","method":"POST","url":"/v1/responses","body":{"model":"gpt-4.1-mini","input":"Summarize: Second"}} - Validation: no issues, 2 requests, 249 bytes, model gpt-4.1-mini.
- Input:
Ten prompts text 1 to text 10, template {"model":"text-embedding-3-small","input":"{{prompt}}"}, endpoint /v1/embeddings, prefix doc- - Result:
{"custom_id":"doc-01","method":"POST","url":"/v1/embeddings","body":{"model":"text-embedding-3-small","input":"text 1"}} {"custom_id":"doc-02","method":"POST","url":"/v1/embeddings","body":{"model":"text-embedding-3-small","input":"text 2"}} - First two of ten lines shown. Ids are zero-padded to two digits because there are ten prompts. Validation: no issues, 10 requests, 1210 bytes.
- Input:
Line 1: custom_id a, POST, /v1/chat/completions, model m1. Line 2: custom_id a, GET, /v1/embeddings, model m2. Line 3: not json - Result:
Line 2: custom_id "a" is already used on line 1. Each custom_id must be unique. Line 2: method should be "POST" (got "GET"). Line 3: Not valid JSON. The file mixes endpoints (/v1/chat/completions, /v1/embeddings). The file uses 2 models (m1, m2). - Validation only. The JSON parser message on line 3 is shortened.
- Input:
Two /v1/moderations lines: mod-1 with input "hello"; mod-2 with no input and stream: true - Result:
Line 2: Moderation requests need an input field in body. Line 2: Moderation requests with stream: true are rejected. - Line 1 passes.
- Input:
Template {"model":"m","input":"hi"} with no placeholder - Result:
Body template needs a {{prompt}} placeholder inside a string value. - The builder refuses to produce a file.
04Common use cases
- Turning a spreadsheet column of prompts into a batch file for overnight processing
- Generating embeddings for a document set at batch prices
- Finding the duplicate custom_id that made results hard to match back to inputs
- Checking a script-generated batch file before uploading it
- Splitting work after spotting that one file mixes two models or two endpoints
- Catching a moderation batch line that is missing its input or sets stream: true
05Tips
- Results can come back in a different order from your input, so give each custom_id a meaning you can map back, such as a row ID
- Keep one model per file; the guide says each input file can only include requests to a single model
- Large jobs over 50,000 requests or 200 MB need to be split into several files and batches
- Paste a file produced by your own script into the right-hand box to check it without using the builder
- Use {{n}} in the template when you want the line number inside the request too, for example in metadata
06Related concepts
Batch API, JSONL, custom_id, Chat Completions, Responses API, embeddings.
Frequently Asked Questions
What is OpenAI Batch JSONL Builder?
OpenAI Batch JSONL Builder is a free, browser-based developer tool on AIDToolStack. Turn a list of prompts into an OpenAI Batch API JSONL file and check it for duplicate custom_ids, mixed endpoints or models, and size limits. It requires no installation or sign-up and works entirely in your browser.
Is OpenAI Batch JSONL Builder free to use?
Yes. No sign-up, no fees and no usage cap.
Does OpenAI Batch JSONL Builder store my data?
No. It runs in your browser; nothing is uploaded.