Your product sends its weekly digest at 9am sharp. Every user gets an AI-written summary of their week, generated that morning in one huge burst of requests through the realtime API (the standard way to call a model, where the provider answers right away), at realtime prices. Your logs of when users open the digest show the other half of the story: most users read it after lunch, and plenty read it the next day. If you had submitted the same job to your provider's batch tier (a cheaper option where the provider runs your requests within hours) the night before, it would have finished hours before anyone woke up, cost on the order of half as much, and no user would have noticed any difference.
The realtime line: ask who is waiting
For every AI job your product runs, ask one question before you choose a model or work on a prompt, because the answer sets the lowest price you can pay for that job: who is waiting for the result? If a person is watching the screen, you have to pay for realtime inference (inference means running the model to produce an answer), which is the most expensive way to buy tokens, because the provider reserves capacity to answer immediately. Every other job could move to a cheaper tier.
Decide how to pay for every job by who is waiting for it: pay realtime rates when a person is watching, and let everything else wait in a queue for a discounted rate.
Asking that one question sorts your product's AI work into three lanes.
- Realtime: a person is watching. Examples are chat replies, inline writing suggestions, code completions and a support bot in the middle of a conversation. The user is looking at the screen and notices every second, so these jobs run on the realtime API at the full rate.
- Background: a person asked and walked away. Examples are a research report that takes minutes to put together, a meeting summary generated after the call ends and a long document translated overnight. The user needs a notification when the result is ready, not a spinner while the job runs, and Latency: design how fast it feels covers how that wait should feel.
- Batch: no user is waiting at a particular moment. Examples are weekly digests, re-tagging a support archive, refreshing embeddings (lists of numbers that represent what a text is about, which search uses) after a catalog update, and regenerating summaries across a set of documents. The deadline is measured in hours, which is exactly the time window the batch tier offers.
The realtime line separates jobs where a person is watching the screen for the result from all other jobs. In the diagram, titled THE REALTIME LINE, the side above the line is labeled SOMEONE IS WAITING, meaning someone is at the screen, and jobs on that side pay the full rate (marked 1x). You place new jobs where no one is waiting at the screen below the line, in the background and batch zones, and batch costs on the order of half as much (marked 0.5x).
The digest in the opening scene is a batch job running in the realtime lane. Nothing about the digest needed an answer immediately, yet your company paid extra for an immediate answer, every week, for every user.
The batch tier: a discount for a deadline measured in hours
The batch tier is the simplest trade-off in this part. You submit a pile of requests in a single upload, the provider runs them when it has spare capacity, and you get the results back within a stated window, typically hours and commonly capped at about a day. In exchange, your provider charges on the order of half its realtime rates, because you are buying the provider's idle capacity instead of capacity it reserves for you. Batch queues also usually have their own, much larger rate limits (caps on how many requests or tokens you can send in a given time), so a bulk job no longer competes with your live traffic for throughput (how many requests you can get through in a given time).
The current windows, discounts and limits change often, so you will find them on your provider's pricing page and in this part's dated Price Sheet, not in this chapter. The test for whether a job can use batch stays the same: a job qualifies whenever its deadline is later than the longest time the batch tier may take to return results. The discount applies to the job's whole bill of materials, meaning every call in the task you costed in The bill of materials: cost the task, not the call, which is why moving one large job across the realtime line often saves more than a month of trimming prompts.
Queues and backpressure: what background work needs to run safely
Background and batch work does not just run later. It needs a place to wait and rules for what happens while it waits. These are ordinary infrastructure decisions, not anything specific to AI, and your engineers will recognize every one of them.
- A queue. Jobs wait in a line, and workers (processes that take jobs off the line and run them) work through it. With a queue, a thousand requests can arrive in one minute and finish over one hour without anything crashing.
- A retry policy. Some calls will fail on rate limits, timeouts or malformed outputs. Decide how many retries a job gets, how long to wait between them, and where a job goes when it keeps failing, so a bad input cannot be retried forever at your expense.
- A plan for a full queue. Backpressure is what the system does when jobs arrive faster than they finish: delay new work, drop the least important work, or switch to a cheaper model until the line clears. Pick one before launch, because otherwise whatever the system does by default will happen on your busiest traffic day.
A newer, expensive mistake in background work is the always-on agent. An agent that checks its inbox for new work every minute all night (this is called polling) is making realtime calls while your users are elsewhere, which is the digest mistake running nonstop instead of weekly. Work that is idle most of the time should start only when an event happens (a new email arrived, a document changed) or on a schedule that fits the job. The same rule applies to the fleets of agents you run to build products, and Economics: what a fleet costs and when it pays works out their costs in detail.
Launch math: plan for the day you cannot move work to batch
The realtime line matters most on the days when you cannot move work across it. A launch, a press mention or a viral moment multiplies the traffic in exactly the realtime part of your workload, because the spike is made of people watching screens, and a batch tier cannot help with a chat reply. So start capacity planning for AI features with the realtime work: estimate the peak number of users at the same moment, multiply by the tokens in a typical session, and check the total against your provider's realtime rate limits well before launch day, because raising limits usually means asking the provider and waiting.
Then make the spike smaller before it arrives by computing in advance everything you can. You can generate starter suggestions, onboarding examples, summaries of your existing catalog and embeddings of your documents on the batch tier in the quiet week before launch, so a user on launch day gets a stored result instead of a new model call. Also move every scheduled job out of the launch window, so your own digest run does not compete with your customers for the same rate limit. By launch day, only the jobs you cannot move should still be in the realtime lane.
Try it now
This drill costs no tokens, and it works on any product whose AI features you can list, yours or one you know well.
List the jobs. Write down every AI job the product runs: each user-facing feature, each scheduled job, each agent or automation, one line apiece with roughly how often it runs.
Sort them by who is waiting. Mark each job realtime, background or batch using one test, who is waiting for it: a person watching, a person who asked and walked away, or no user at a particular moment. Be suspicious of anything marked realtime that runs on a schedule, because a schedule means its users are elsewhere.
Find the biggest job in the wrong lane. Pick the largest job running on the wrong side of the realtime line, measured by monthly tokens, or by how often it runs times its size if you have no dashboard.
Price the move. Using the batch figures in the Price Sheet, estimate what that job costs today at realtime rates and what it would cost on the batch tier, keeping both numbers to an order of magnitude.
Write the queue-and-notify design. In one short paragraph, describe a move that no user would ever notice: when the job is submitted, which queue holds it, the retry policy, what happens when the queue is full, and what (if anything) tells the user when the job finishes. If the paragraph is easy to write, the move is a small ticket rather than a project, and you save money every time the job runs.
Chapter Summary
- The lowest price you can pay for an AI job depends on one question: who is waiting for the result?
- If a person is watching the screen, the job needs realtime inference at the full rate; if the person asked and walked away, it runs in the background and sends a notification; if no user is waiting at a particular moment, it is batch work.
- On the batch tier you accept a deadline measured in hours in exchange for a discount on the order of half; the current windows and rates are on provider pricing pages and in the dated Price Sheet.
- A job qualifies for batch when its deadline is later than the longest time the batch tier may take, and the discount applies to the task's entire bill of materials.
- Background work needs a queue, a retry policy and a plan for a full queue, all decided before launch.
- An always-on agent that keeps checking for work costs you realtime rates while your users are elsewhere; start idle work on events, or on a schedule that matches how often real work arrives.
- Launch spikes land on your realtime work, which you cannot move to batch, so check rate limits early and use the batch tier to prepare everything you can in advance.
- Cutting what each answer costs is half of unit economics; what you charge for each answer is the other half, which Pricing: charge in a currency your costs track covers next.
Sources
- Anthropic Message Batches API documentation and pricing (last verified July 2026).
- OpenAI Batch API documentation and pricing (last verified July 2026).
- Microsoft Azure Architecture Center. Queue-Based Load Leveling pattern (last verified July 2026).
- This part's dated Price Sheet for current batch windows, discounts, and rate limits.