AITraining2U

Programs

Resources

Case Studies

Quick Links

Enquire Now
Domain 3 · 20%% of exam

Message Batches: economics and limits

Numbers worth memorising, and the one workload Batches must never serve.

5 min read · Lesson 6 of 12 in this domain

The Batch API trades latency for money: half price, in exchange for asynchronous processing that may take up to 24 hours. Understanding it as a trade rather than a discount tells you immediately where it must not go — anything a user is waiting on. The numbers here are unusually concrete for this exam, so they are worth memorising: 50% off, most batches inside an hour, 24-hour maximum, results retained 29 days, up to 100,000 requests or 256MB, and results returned in arbitrary order keyed by custom_id.

Key points
  • 50% off standard pricing on all token usage, in exchange for asynchronous processing.
  • Most batches complete within 1 hour; the maximum is 24 hours. Results remain available for 29 days.
  • Up to 100,000 requests or 256 MB per batch.
  • Results arrive in any order — key them by custom_id, never by position. Each carries a type of succeeded, errored, canceled or expired.
  • Never route a blocking, user-facing path through Batches. The discount is compensation for latency, and this is a named anti-pattern.
  • SLA arithmetic: worst case = submission interval + 24h processing. For a 30-hour SLA, a 6-hour interval is the longest that qualifies (and therefore the fewest submissions).
  • Batches stacks with prompt caching — a shared cached prefix compounds with the 50% discount.
Worked example

SLA arithmetic the exam actually asks. You have a 30-hour SLA and want the fewest submissions. Worst case for any item is the wait until the next submission window plus the full 24-hour processing ceiling. A 6-hour cadence gives 6 + 24 = 30 hours exactly — it fits. A 12-hour cadence gives 36 and breaches. A 4-hour cadence gives 28, which fits but submits 50% more batches for no benefit. The answer is the longest interval that still satisfies the SLA.

Exam trap

"Submit everything immediately and resubmit failures" destroys the cost efficiency. Refine on a representative sample first.

Check your understanding

What does the Batch API trade for its 50% discount?

Correct answer: B — Asynchronous processing up to 24 hours
Most batches finish within an hour, but the ceiling is 24 hours — never put a user-facing path through it.

How do you match batch results to inputs?

Correct answer: B — By custom_id
Results arrive in arbitrary order; indexing positionally silently mis-associates them.

Practise this domain with 20%%-weighted questions in the study app.

Open in study app

Source: Claude Docs — Batch processing · Independent study aid, not affiliated with or endorsed by Anthropic.