LLM Batch Request File Builder (JSONL)
Prepare large AI jobs for batch APIs: map CSV columns into a prompt template, generate valid request lines, split files that are too big and join results back to your data.
Berjalan di browser Anda. File Anda tidak pernah keluar dari perangkat. Lihat cara memeriksa
…
Cara melakukannya
- 1Load your data
Drop or paste a CSV with a header row on the Data tab.
- 2Write the template
Choose the provider and model, then build the prompt with column placeholders.
- 3Set IDs and options
Pick an ID column or pattern, max tokens, temperature and JSON mode.
- 4Validate
Fix every error on the JSONL tab and check size and file count.
- 5Download and submit
Download the file or files and start the batch with your provider.
- 6Read results
Drop the results file, review failures and download the joined CSV.
Tentang alat ini
Batch APIs let you send thousands of model requests at once and collect the answers within a day, usually at about half the normal price. They are ideal for classifying reviews, translating product catalogues, summarising documents or generating descriptions. The catch is the file format. Each provider expects JSON Lines, one request per line, with its own envelope: OpenAI wants a custom_id, method, url and body; Anthropic wants a custom_id and params, sent as a JSON list; Gemini wants a key and a request. IDs must be unique and match provider rules, files have size and count limits, and one malformed line can fail an upload after a long wait. This builder starts from the spreadsheet you already have. You write a prompt template with column placeholders, choose the provider, model and settings, and the page builds every request line, validates it, warns about duplicates and empty prompts, splits large jobs into several files within the limits, and later reads the results file and joins each answer back to its original row.
From CSV to requests
Drop or paste a CSV or TSV with a header row. The template uses double-brace placeholders with column names, plus a special n placeholder for the row number, and buttons insert columns for you. A system prompt can be the same for all rows or come from a column. The custom ID comes from an ID column, or from a pattern with a zero-padded row number, which produces IDs like req-00001. Settings cover the model, maximum output tokens, temperature, a JSON output switch and any extra parameters as a JSON object merged into every request.
Provider formats
OpenAI requests target /v1/chat/completions with messages or /v1/responses with instructions and input. Anthropic requests carry params with model, max_tokens, an optional system prompt and messages, and are exported as the requests JSON body for the Message Batches endpoint. Gemini lines carry a key and a request with contents, an optional system instruction and generation config.
Validation and limits
The validation tab lists template columns that do not exist, empty prompts, empty or duplicate IDs, IDs that break Anthropic's 64 character alphabet rule, invalid extra parameters and rows likely to exceed a long context window. The size panel shows request count, total megabytes and an estimate of input tokens. When a job exceeds the documented per-batch limits, 50,000 requests or 200 MB for OpenAI and 100,000 requests or 256 MB for Anthropic, the output is split into numbered files automatically. A separate tab checks any JSONL file line by line, including files edited by hand.
Reading results
Drop the results file and the page recognises OpenAI, Anthropic and Gemini result lines, showing status, response text, token usage and stop reason for each ID. Download a CSV that joins every answer onto the original rows by custom ID, with missing results marked, and a list of failed IDs to resubmit.
Limits
The page does not send anything to any provider; you upload the file and start the batch in your provider's console or API. Token figures are estimates. Limits and endpoints change, so check the provider's current documentation before a very large run.
Contoh perhitungan
A shop wants sentiment labels for four product reviews, as a test before running 40,000. The CSV has columns id, product and review. The template reads: Classify the sentiment of this (product column) review as positive, negative or mixed, then give a one-line reason, followed by the review text. With custom_id taken from the id column, OpenAI Chat Completions and 512 max tokens, the page builds four valid lines of about 1.6 KB in total. The first line has custom_id r001 and a user message that begins Classify the sentiment of this Kettle review. After the batch finishes, they drop the results file: four succeeded, with answers such as mixed: fast boiling but a stiff lid. The joined CSV adds status, response and token columns to each review. For the full run the same settings produce one file within the 50,000 request limit.
Fakta singkat
- Kategori: Pengembang & data
- Berfungsi di browser Anda, tanpa daftar, tanpa unggah.
- Masukan Anda tetap di perangkat Anda.
- Tersedia dalam bahasa Inggris.
- Konten terakhir ditinjau:
- Sumber resmi: OpenAI Batch API, Anthropic Message Batches and Gemini batch mode documentation
Pertanyaan yang sering diajukan
Why use a batch API instead of normal requests?
Batches cost less, usually about half price, and do not count against normal rate limits. The trade-off is waiting, typically up to 24 hours, which suits jobs that are not interactive.
Which providers are supported?
OpenAI Batch with the Chat Completions or Responses endpoint, Anthropic Message Batches and Gemini batch mode. Each gets its own request envelope and result reader.
What is custom_id for?
Results can come back in any order. The custom ID ties each answer to its request, so it must be unique. Using the ID column from your data makes the final join reliable.
What happens if my job is too large?
The builder splits it into numbered files that each stay within the provider's request and size limits. Submit each file as its own batch.
Does the page send my data to an AI provider?
No. It only builds and reads files in your browser. You upload the request file yourself through the provider's dashboard or API with your own key.
Can I add parameters the form does not show?
Yes. Put them in Extra parameters as a JSON object, for example top_p set to 0.9. They are merged into every request in the right place for the provider.
