Batch and async jobs
For engineers
Running large offline workloads through provider batch APIs: building requests, picking workloads, estimating savings and collecting results
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
A batch returns 500 results for 500 requests. Which field should you use to match each result to its input?
Check yourself · 2 of 5
Which job is the best fit for a batch API?
Check yourself · 3 of 5
Which part of a request can be cached for a large batch job?
Check yourself · 4 of 5
A batch ends with 39,000 successes and 1,000 failures. What is the cheapest correct next step?
Check yourself · 5 of 5
A team submits 150,000 short requests in one Claude batch and the call is rejected. What is the most likely reason?
Topics
- How provider batch APIs work4 min read · Request files with custom ids, submission, status polling, the completion window and results that come back unordered
- Choosing workloads that suit batching4 min read · Evaluations, backfills, bulk classification and document processing versus anything a user is waiting for
- Estimating batch discounts with caching5 min read · How the batch discount combines with prompt caching, and the limits on batch size and request count
- Submitting, polling and collecting batch results5 min read · Idempotent result handling, partial failures, expired requests and resubmitting only what failed
Start here
- Batch processing (Claude) (opens in a new tab)DocsFree
Request format, custom_id, the 24-hour window, size limits, result handling and the batch discount.
- Batch API (OpenAI) (opens in a new tab)DocsFree
The same pattern with a JSONL input file, a status object and separate output and error files.
- Batch API (Gemini) (opens in a new tab)DocsFree
Gemini's asynchronous batch mode for large jobs, with its own submission and result steps.
Scenarios
Helps to know first
110 questions · last verified 2026-12