Skip to main content

Your AI Workload Has a Nighttime: The Batch Discount Is an Architecture Test

· 9 min read
Tian Pan
Software Engineer

Every major model provider will sell you the same tokens for half price. OpenAI, Anthropic, and Google all run batch APIs that charge 50% of the synchronous rate — same models, same prompts, same outputs — in exchange for one concession: you accept a 24-hour completion window instead of an answer in seconds. For a team spending $50,000 a month on inference, that is $25,000 sitting on the table, claimable without changing a single prompt.

Most teams never claim it. Not because the discount is hidden — it's on every pricing page — but because claiming it requires answering a question nobody in the org has asked: which of our inference calls actually need an answer now? That question turns out to be an architecture question, and the honest answer at most companies is "we never classified them, so everything runs in the interactive lane by default." The batch discount isn't a pricing footnote. It's a test of whether your system knows its own latency requirements — and most systems fail it.

The Mainframe Day/Night Split Is Back

Computing has been here before. In the mainframe era, machine time was the scarce resource, so shops split their work into two regimes: interactive jobs during the day, when operators and users needed responses, and batch jobs overnight — payroll runs, report generation, ledger reconciliation — queued up to soak the idle hours. The day/night split wasn't a stylistic choice. It was the economically rational response to expensive, capacity-constrained compute.

Then compute got cheap, and the discipline dissolved. For two decades, the marginal cost of a web request was close enough to zero that nobody bothered sorting requests by urgency. Everything became "real-time" because real-time was free.

LLM inference broke that assumption. A single agentic workflow can burn millions of tokens; GPU capacity is genuinely scarce; and the cost per request is high enough to show up as a line item the CFO asks about. So the old split has quietly returned, dressed in new clothes: the synchronous API is daytime, the batch API is nighttime, and the 2x price gap between them is the same signal mainframe operators responded to fifty years ago. The difference is that this time, most engineering teams haven't noticed the signal — they inherited a "everything is an API call" mental model from the era when urgency was free.

Sort Every Call into a Latency Lane

The unlock is a classification exercise, not a technology migration. Every inference call in your system belongs to one of three lanes:

  • Interactive: a human or an agent is blocked waiting on the answer. Chat turns, autocomplete, an agent mid-task deciding its next tool call. Latency budget is measured in seconds. This lane pays full price, and it should.
  • Deferrable: the work must happen, but nobody is waiting. Embedding backfills after a schema change, document classification for tomorrow's dashboard, evaluation suites against a new model version, summarization of yesterday's support tickets, content moderation sweeps over historical data. Latency budget is measured in hours. This is the batch lane.
  • Periodic: work that recurs on a schedule and whose deadline is the next run, not "now." Nightly report generation, weekly re-ranking of a recommendation corpus, monthly data-quality audits. This lane is batch by construction — it already has a cron-shaped rhythm; teams just habitually run it through the sync API because that's the client library they had open.

Run this audit against a real traffic log and the result is usually surprising. Teams assume their workload is dominated by interactive chat because that's the product surface they think about. Then they look at token counts and discover that embeddings generation, evals, enrichment pipelines, and offline classification account for 40–70% of total spend — all of it deferrable, all of it paying a 2x premium for a latency guarantee nobody is using. The interactive lane is the minority of tokens at most companies; it's just the majority of attention.

There's a corollary worth stating plainly: if you cannot sort your calls into these lanes, that itself is the finding. It means latency requirements live in engineers' heads rather than in the system, and you're one incident away from discovering them the hard way.

Batch Is Not "Sync but Slower" — It Demands Re-Architecture

The reason the discount goes unclaimed isn't laziness. It's that the batch APIs genuinely demand a different program shape, and retrofitting that shape onto a codebase built around request/response takes real work. Three requirements do most of the damage.

Jobs must be idempotent. A batch of 10,000 requests will not complete uniformly. Some items fail with rate limits or server errors; occasionally a whole batch expires at the 24-hour mark with a partial result set. Your pipeline has to be able to re-submit the failures — and only the failures — without double-processing the successes. That means stable request IDs, content-hashed inputs, and result writes that are safe to replay. If your current pipeline appends to a table on every response, you don't have a batch-ready pipeline; you have a duplicate-generation machine.

Results need a staleness budget. The moment you accept a 24-hour window, you've accepted that outputs describe the world as it was up to a day ago. For most deferrable work this is fine — a support-ticket summary doesn't rot overnight. But the budget has to be explicit. The classic failure: a team moves product-catalog enrichment to batch, a merchandiser edits a product mid-window, and the batch result — computed against the old description — overwrites the new one twelve hours later. Every batch consumer needs a rule for what happens when the input changed after submission, even if the rule is just "last-write-wins is acceptable here, and here's why."

Queues need monitoring, and a pressure-relief valve. Synchronous calls fail loudly and immediately; batch jobs fail quietly, tomorrow. That inversion means you need observability you probably don't have yet: queue depth, batch completion rates, time-in-queue percentiles, and alerts for the batch that's been sitting at 90% complete for six hours. You also need an escalation path — when a deferrable job suddenly becomes urgent (the dashboard the VP is presenting from is empty), there must be a sanctioned way to re-route those items through the sync API and eat the full price, rather than an engineer hand-rolling a bypass at midnight.

The honest cost metric falls out of that relief valve: not the batch invoice, but (batch cost + sync-retry cost) divided by completed, validated outputs. Cost-per-useful-output is always higher than the sticker discount suggests. Usually it's still far below sync pricing — but you should know the real number.

None of this is exotic. It's the same discipline data engineering teams apply to any asynchronous pipeline. What's new is applying it to inference, which most teams still treat as a function call rather than a job.

The Discount Is the Provider Paying You to Smooth Their Load Curve

It's worth understanding why the discount exists, because the reason tells you whether it will last.

Inference demand is diurnal and spiky. Interactive traffic peaks during working hours and craters overnight, but the GPUs don't go anywhere — a provider's fleet is sized for peak, which means enormous capacity sits underutilized in the troughs. Industry estimates put average GPU utilization across AI data centers at 60–70%, and the gap between peak and trough is the expensive part: power infrastructure, cooling, and the capital cost of accelerators are all paid whether or not tokens are flowing. Recent research on AI data-center power dynamics makes the complementary point — mixed batch-plus-interactive workloads produce measurably smoother aggregate demand than either alone, precisely because batch jobs can wait while interactive demand takes capacity the instant it arrives.

Batch queues are how providers arbitrage their own trough. Your deferrable jobs become schedulable filler that soaks idle capacity at 3 a.m., raising fleet utilization on hardware that was already bought and powered. The 50% discount is the provider splitting that arbitrage with you: they'd rather earn half price on a GPU-hour that would otherwise earn nothing. This is exactly the economics behind electricity time-of-use pricing and spot instances — a capacity-constrained utility paying customers to move load off the peak.

Two practical implications follow. First, the "24-hour" SLA is a worst case, not a typical case — batches usually clear in one to six hours because providers drain the queue whenever capacity frees up, though you must architect for the worst case anyway. Second, this discount is structural, not promotional. As long as interactive demand is diurnal and GPUs are capacity-constrained, providers will pay for schedulable load. If anything, the incentive deepens as fleets grow: every new peak-sized cluster creates a bigger trough to fill. Architecture you build for batch today is aligned with the physics of the business, not with a coupon that expires.

Run the Audit Before the Next Bill

The batch discount is the rare cost optimization that requires no negotiation, no vendor migration, and no model quality trade-off. What it requires is self-knowledge: a truthful inventory of which calls need answers now and which merely need answers eventually.

The concrete version fits in a week. Pull one month of inference logs and tag every call site — not every call, every call site — as interactive, deferrable, or periodic. Sum tokens per lane. In most systems this yields a double-digit percentage of spend sitting in the deferrable and periodic lanes, and a shortlist of two or three pipelines (evals and embeddings are almost always first) that can move to batch with modest re-plumbing. Move those first, instrument the queues, adopt cost-per-useful-output as the metric, and let the harder migrations earn their way onto the roadmap with the savings from the easy ones.

The deeper shift is treating latency as a declared property of every inference call rather than an accident of which API the first engineer happened to import. Systems that know their own urgency can ride the price curve down as providers keep widening the gap between "now" and "whenever." Systems that don't will keep paying daytime prices for work nobody is awake to read.

References:Let's stay in touch and Follow me for more thoughts and updates