← BlogAI Product Development

LLM Batch APIs Explained: How to Cut AI Processing Costs 50% on Work That Does Not Need an Instant Answer

By Aditya JhaNovember 23, 20269 min read

LLM Batch APIs Explained: How to Cut AI Processing Costs 50% on Work That Does Not Need an Instant Answer

A finance lead at a Melbourne logistics firm opens the monthly AI invoice and finds that 70 percent of the spend is a nightly job: an LLM reads yesterday's supplier invoices, extracts fields and tags exceptions, and writes the result to a table that nobody looks at until 9am. The job runs through the same real-time endpoint as the customer-facing chatbot, at the same price per token. Nobody was waiting for those answers at 2am, yet the firm paid the premium for instant ones. Both major providers sell the alternative: an asynchronous batch interface that trades latency for a lower price. OpenAI's Batch API advertises 50% lower costs with a 24-hour turnaround, and Anthropic's Message Batches API reduces costs by 50 percent for work that does not need an immediate response. This post explains how the mechanism works, how to design the pipeline around it, and where batching quietly backfires.

What is an LLM batch API, and why is it cheaper?

A batch API lets you submit a large file of independent requests, walk away, and collect all the results later at roughly half the per-token price. The discount exists because the provider can schedule your work into idle GPU capacity instead of reserving low-latency capacity for you. You are selling flexibility on timing, and they pay you for it.

The two vendors frame it slightly differently. OpenAI describes asynchronous groups of requests with a queued-token limit separate from per-minute limits and a 24-hour turnaround. Anthropic documents that most batches finish in under an hour, but a batch can expire if it is not completed within 24 hours, and caps a single batch at 100,000 requests or 256 MB, whichever is reached first. Treat the 24-hour figure as the contract and the one-hour figure as typical behaviour you must never depend on.

How much does batching actually save? The cost math

Batching halves the token cost of the work it covers, so the saving on your total bill equals the share of your tokens that are batch-eligible, times 50 percent. The arithmetic below is illustrative: it uses round placeholder prices of $3 per million input tokens and $15 per million output tokens, not any specific model's list price. Check your provider's current price sheet before you forecast.

Take a nightly job that processes 10,000 documents at roughly 6,000 input tokens and 500 output tokens each. That is 60 million input and 5 million output tokens. Real-time: 60 x $3 + 5 x $15 = $255 per run. Batched at half price: $127.50 per run. Run it every night and the difference is about $46,000 a year on one workflow, before you count any other batch-eligible job in the stack.

The more useful number is eligibility. Audit a week of your API logs and tag every call by whether a human or system was blocking on the response. The eligible share is often larger than teams expect, because anything triggered by a schedule, a file drop or a backlog is a candidate.

Which AI workloads belong in a batch queue?

  • **Bulk document extraction:** invoices, contracts, KYC files, claims. The input is already sitting in storage and the output is read later. See our walkthrough on automating invoice and expense processing.
  • **Classification and tagging backfills:** re-labelling a CRM, support archive or product catalogue after you change the taxonomy.
  • **Embedding and enrichment jobs:** generating summaries, metadata or synthetic questions for every chunk in a knowledge base before indexing. If you are mid-way through a re-embedding migration, this is exactly the shape of work you want.
  • **Evaluation runs:** scoring a golden dataset of a few thousand cases against a new prompt or model, as in a RAG evaluation harness. Nobody is waiting at the keyboard.
  • **Synthetic data and distillation labels:** generating teacher outputs to train a smaller model, the first step in model distillation.
  • **Not eligible:** chat, voice agents, anything inside a user session, and agent loops where step N+1 needs step N's answer within seconds.

What does a production batch pipeline look like?

A reliable batch pipeline has five parts: a queue of pending items, a packer that builds batch files, a submitter, a poller, and a reconciler that matches results back to source records. The structure is simple, but the failure handling is where teams get hurt.

Every request in a batch carries a custom identifier you choose, and results are returned keyed by that identifier, not in submission order. Use your own primary key (document ID plus prompt version) as that identifier so reconciliation is a join, not a guess. Make the write idempotent: if a batch result is processed twice, the second write must be a no-op.

Expect partial failure. In a 10,000-request batch, some requests will error or expire while the rest succeed. The reconciler should split results into succeeded, errored and expired, write the successes immediately, and push the remainder into a retry queue with a counter. Cap retries, then route stragglers either to the real-time endpoint or to a human review list. Alert on the batch age: a job still running past your own deadline needs a person, not another poll.

Size batches by risk, not by maximum. One 100,000-request batch that fails on a prompt bug wastes the whole run. Ship a 200-request canary batch first, validate output shape against a schema, then fan out. Pair this with structured outputs so malformed results are caught by validation instead of silently landing in your database.

Can you combine batch pricing with prompt caching?

Yes, and the combination matters when every request in the batch begins with the same long instruction block or reference document. Anthropic's batch documentation has a dedicated section on using prompt caching with Message Batches, and its docs describe caching as a way to reduce cost and latency by caching prompt prefixes shared across requests in a batch. Because batches are processed concurrently and in no guaranteed order, cache hits are best-effort rather than guaranteed, so do not bake a precise hit rate into your forecast.

The design rule that follows: put the stable material (system prompt, schema, few-shot examples, policy text) at the front of every request and the variable document at the end, so the shared prefix is identical across the batch. We cover the mechanics in how prompt caching works. Measure the realised discount from your own invoices after a week instead of trusting a headline percentage.

When does batching backfire?

Batching backfires when the 24-hour window collides with a business deadline, when the work is not truly independent, or when governance forbids the data leaving your tenancy for a queued store. Three cases deserve a hard look before you move a workflow.

First, deadlines. If finance needs the extraction by 8am and your batch has a 24-hour worst case, the cheap path has an unacceptable tail. Either submit earlier, split into smaller batches to improve completion odds, or keep a real-time fallback for urgent items. Second, dependencies: agent workflows where each step reads the previous output cannot be flattened into one file; batch the independent fan-out stages only. Third, data handling: check each provider's retention terms for batch inputs and outputs against your obligations under GDPR or local privacy law, and redact personal data before it leaves your boundary where the contract demands it.

Finally, do not batch to avoid fixing a bad architecture. If a job costs $255 a run because you are sending 6,000 tokens where 1,500 would do, trimming the prompt saves more than the discount and compounds with it.

How AIBOOTSTRAPPER helps

We do not have a published case study where batch inference was the headline technique, so we will not claim one. What we can point to is the class of system where it applies: document-heavy AI pipelines. For ComplyNexus, a Hong Kong compliance platform, we built a RAG engine that cut regulatory change turnaround from 3 weeks to 2 hours with 100% audit-ready traceability, and workloads like continuous regulatory ingestion are the kind of non-interactive processing where we review every call for batch eligibility. See the details in our case studies.

If your AI invoice is climbing, send us a week of API logs. We will tag each call by latency requirement, estimate the batch-eligible share, and tell you what moving it would save. Our AI product development team works to international delivery standards with India-based economics.

Want this done for you?

Book a free strategy call and we'll show you how to build and market your business with AI.

FAQ

Questions, answered

Everything you might want to know before we hop on a call.

Both providers document a 50 percent cost reduction versus their standard real-time endpoints for batch-eligible requests. The trade-off is latency: results are delivered within a 24-hour window instead of immediately.

Anthropic states most batches complete within one hour, but a batch can expire if processing is not complete within 24 hours. OpenAI quotes a 24-hour turnaround. Plan around the 24-hour worst case.

Anthropic limits a Message Batch to 100,000 requests or 256 MB, whichever comes first. Check each provider's current documentation, as limits and supported models change.

Anything where a person or downstream system is waiting in real time: chatbots, voice agents, and multi-step agent loops where each step depends on the previous answer. Batch the scheduled, independent, backlog-style work.

Keep reading

Let's talk

Ready to build and sell with AI?

Book a free 30 minute strategy call. We'll map the highest ROI AI move for your business, no pitch, just value.