Skip to main content

Batch LLM processing: which AI workloads can wait for results

How to decide which AI work belongs on a provider's batch API: which workloads can wait, which can't, and how to design for partial failures and expiry.

Share -
An engineer with a tablet beside a laptop showing code, in a large data hall lined with racks of servers lit by green status panels

Batch LLM processing suits work where nobody is waiting on the answer: overnight document classification, eval runs, backfills, report drafts and data enrichment. Providers price batch requests below real-time calls in exchange for a longer completion window. Keep anything a user or a downstream system needs now on the real-time path, and design batch jobs for partial failure.

What a batch API changes

A real-time call sends one request and waits for one answer. A batch API takes a file of many requests, queues them, and returns a results file once the provider has worked through them. Major providers, including OpenAI's Batch API, offer a lower per-token rate and separate, higher rate limits in return for that delay.

The trade is time for cost and capacity. The provider schedules your requests when it has spare capacity, so you give up control over when each answer arrives. Most batches finish well inside the window, but you can only rely on the window itself, not the typical case.

That makes batch a scheduling decision, not a model decision. The same model, prompt and output schema run either way. What changes is when the answer arrives and how your system has to handle it.

Workloads that can wait

A useful test is simple: if the result landed tomorrow morning instead of in a few seconds, would anyone notice? If not, the work is a batch candidate. Common examples:

  • Evaluation runs. Re-scoring a test set after a prompt or model change. Nobody needs the scores mid-request, and eval sets are large. See what AI agent evals catch.
  • Backfills and re-processing. Re-classifying an archive of tickets, re-extracting fields from past documents, or regenerating summaries after a schema change.
  • Enrichment. Tagging product catalogues, adding categories to CRM records or translating content that is published later.
  • Scheduled reports. Weekly account summaries or overnight exception reports that someone reads the next working day.
  • Synthetic data and test generation. Building test cases for an agent before a release.

Workloads that must stay real-time

Anything in a user's path stays real-time: chat, an agent mid-task, a support reply, a coding assistant. A delayed answer there is a failed answer, however cheap it was.

Also keep work real-time when a downstream step is waiting on it. An invoice that has to post before a payment run, or a fraud check before an order ships, has a deadline your business sets, not the provider. If the batch window could miss that deadline, the saving is not worth it. For extraction flows like AI document extraction into ERP, split the work: urgent documents go real-time, the bulk of routine ones can go to batch.

Design for partial results and expiry

A batch is not one result. It is many independent requests, and some will fail while others succeed. Plan for that from the start:

  • Give every request a stable ID that maps back to your own record, so you can match results and retry only the failures.
  • Validate every output against the same schema and checks you use in real time. Batch output is not more reliable because nobody watched it. Validating AI agent output covers the checks.
  • Treat expiry as a normal outcome. Requests not finished in the window may be returned as expired. Your job should pick those up and resubmit them, or fall back to real-time if a deadline is close.
  • Make writes idempotent. If a results file is processed twice, the second pass should change nothing.
  • Keep the input file until results are reconciled, with the prompt version and model recorded alongside, so you can explain any output later.

Fit batch into cost and governance controls

Batch spend is easy to lose track of because it arrives in large, irregular jobs. Tag each job with the team and use case so it shows up in team-level cost reports and your wider AI running cost controls.

Check data handling too. A batch job uploads a file of inputs to the provider and stores results there until you download them. Confirm the retention terms, delete files once you have reconciled them, and apply the same rules on personal data that govern your real-time calls.

Where to start

Pick one recurring job that runs on a schedule today, move it to batch behind a flag, and compare output quality, completion time and cost against the real-time version for a few runs. If the results match and the deadline is safe, switch it over and move to the next. If you want help deciding which of your AI workloads can move, talk to us.

Frequently asked questions

Does batch processing change the quality of model output?

No. A batch request runs the same model with the same prompt and parameters as a real-time call, so the output should match in quality. What differs is timing and price. Still, run your normal validation on batch results, because nobody reviews them as they arrive and an error in a large job can affect many records before anyone notices it.

How do you know if a workload is a good fit for batch?

Ask whether anyone would notice if the result arrived the next morning instead of within seconds. If no user is waiting and no downstream deadline falls inside the provider's completion window, it is a candidate. Large, repeatable jobs such as evals, backfills, enrichment and scheduled reports usually fit. Anything inside a conversation or an agent's live task does not.

What happens to requests that do not finish in time?

Depending on the provider, unfinished requests are returned as expired or failed while completed ones come back normally. Your job should read the results file, match each entry to its own request ID, retry the unfinished ones in a new batch, and switch them to real-time calls if a business deadline is getting close. Never assume a whole batch either succeeded or failed.

Can AI agents use batch APIs?

Not for steps a user is waiting on, because an agent needs each answer before choosing its next action. Agents can still hand batch work off: an agent might queue a large re-classification job, then report back when the results are ready. Batch is also a good fit for the evaluation and test-generation work that sits around an agent rather than inside it.

Share this post

Contact us to build the right product

Talk to our engineers about your application, the systems it connects to, and what you want to build next.

Get in touch
Two people discussing work with a laptop