Home › OpenAI API lesson 3: Batch API

OpenAI API lesson 3: Batch API

Last checked

When you don't need answers right away (tagging thousands of reviews, overnight reports, evaluations), the Batch API runs the requests for you at a 50% discount.

Step by step

  1. Write one request per line in a .jsonl file, each with a custom_id so you can match results later.
  2. Upload the file with purpose "batch".
  3. Create the batch with the file ID, the endpoint (for example /v1/responses) and completion_window "24h".
  4. Check the batch status until it is completed.
  5. Download the output file and match each result to its custom_id.

Try it: examples

Good to know

Sources (official pages, read Nov 8, 2026)

Written from OpenAI's official documentation and product pages; we don't run hands-on tests. Features and limits vary by plan and country.

Report an error on this page