Own Weights

Batch API vs real-time LLM calls: when the discount pays

Batch API vs real-time LLM calls: how much the batch discount saves, which jobs can wait for it, and when real-time is the only option for your product.

Updated

A batch API takes a set of requests, runs them later as one queued job, and charges less for the tokens. A real-time call returns each answer inside the request and bills at the full rate. The discount is worth taking whenever nobody is waiting on the answer. It is the wrong choice for anything a user sends and then watches.

The decision is about timing, not model quality. Batch and real-time calls can use the same model and the same prompt, so the question to ask is how long the answer is allowed to take.

What the discount actually changes

A batch job is a set of requests you submit together. The provider works through them on its own schedule, and you collect results when the job finishes. The answers do not change. You trade speed for price. Each job reports which items succeeded and which failed, so your code has to store finished results and retry only the failed items. Otherwise a retry pays again for work you already have.

A real-time call works the other way. Each request waits for its own reply, so you can show it to a user, feed it into the next step, or return it in an API response. You pay the full rate for that speed on every call, including calls whose answers nobody reads right away.

Worked example: a team runs one prompt over each night’s invoices. The same run in real time costs 100 units. In batch, on the same model, it costs about 50 units and finishes overnight. A check that runs on each invoice as it is entered has to stay real-time, so it costs 100 units per invoice no matter what the nightly job does. The discount applies to the nightly job only. To estimate what your own volumes would save, run the numbers through the LLM cost calculator.

Jobs that can wait

Much high-volume AI work is not urgent. These fit a batch queue well:

  • A nightly pass that extracts party names, governing law and renewal dates from the day’s new contracts.
  • A backfill that runs a revised prompt over years of stored invoices to flag duplicate line items.
  • An evaluation run that scores a model against a fixed test set and writes a number into a report someone reads on Monday.
  • Catalog or CRM enrichment, where the output lands in a database and a person reviews it later.

Ask one question about each job. Does a person or another system need this answer within seconds? If not, batch is the default, and real-time needs a stated reason.

Jobs that need real-time

Some work cannot wait at all:

  • A chat reply, an autocomplete suggestion or a search result.
  • A check during checkout, sign-in or form submission, such as a format or fraud check that decides whether the page accepts the input.
  • An agent loop, where each model call depends on the result of the last one. Each step would wait for a batch window, so a five-step task takes five windows.
  • Any service where a customer is promised a response time.

Some jobs sit between the two. A user uploads a contract and expects a summary soon, though not in the same second. Use real-time calls with a short queue of your own, or a batch run on a tight schedule. Choose the design that matches the wait your users will actually accept.

Splitting one product across both paths

Most products end up with both. Keep real-time for the step a user waits on. Send everything else to a queue that runs on a schedule or once enough items pile up. In the contract example, the summary the user asked for runs in real time, while clause tagging, date extraction and search index updates go to the overnight batch. The user sees the summary now and the tags the next morning.

Store every job ID with the record it belongs to. Check status on a timer, write finished results back to that record, and show “pending” in the interface rather than an empty field. Treat late and partial results as normal events, not errors. Prompt caching is a separate lever. It can be combined with either path, but its savings depend on how often your prompts repeat, so measure it on its own.

Mistakes and a checklist

The most common mistakes are predictable:

  • Batching the step a user waits on, then wondering why the feature feels broken.
  • Retrying the whole job after a partial failure, which pays twice for items that already succeeded.
  • Quoting a turnaround time from memory instead of from the provider’s current documentation.
  • Changing the model or prompt between the test run and production. Your approved numbers no longer apply once either changes.
  • Chasing the batch rate while ignoring call volume. A cheap rate on a prompt sent more often than it needs to be still adds up. The bigger picture is in how to lower your Claude API bill.

Before you move any call to batch:

  1. Confirm the turnaround window and what happens to jobs that miss it, in the provider’s current docs.
  2. Confirm how failed items are reported, and key every retry on the item ID so nothing runs twice.
  3. Decide whether the output must stay consistent over time. If it must, pin the model version and keep the test set you used to approve it.
  4. Remove duplicate and unneeded calls first, then apply the batch rate to what is left.
  5. Run the batch path on a small sample and compare its results with the real-time path before you switch the full load.

Not sure which of your calls can wait? The free AI cost audit reads a repository and lists every AI call with its model and estimated cost. Run it from the Own Weights homepage or book a call below to go through the list with us.

Questions

Is a batch API cheaper than a real-time API?

Anthropic prices its batch tier at half the real-time rate for the same models. The saving only applies to work that can wait for results. A job that must finish before a page loads pays the full rate either way.

How long does a batch job take to return results?

The window depends on the provider and on job size, so read the current batch documentation before you promise anyone a deadline. Build the pipeline to poll for finished jobs and to handle results that arrive late.

Can I use batch and real-time calls in the same product?

Yes, and many products do. Keep real-time for the step a user waits on, and send the rest to a queue that runs in batch.