Batch or now?
The Message Batches API halves the price, and that makes it a trap in both directions. Wrong answers put a job someone is waiting on into a batch that can take a day. Or they pay full price for an overnight report nobody reads until Monday. Ask who is waiting, and the choice is easy.
D4 Prompt Engineering & Structured OutputExam guide 4.5About 15 minutes
Start here: the dry cleaner
A dry cleaner offers two services.
Claude works the same way. A synchronous call to the Messages API is express: the reply comes back in seconds, and you can go back and forth, so Claude can ask for a tool, your code runs it and sends the result back. The Message Batches API is the bulk service: about half the cost, results within 24 hours, no promise on how fast. Each request gets one reply, with no back and forth, so a batch request can't run a tool loop. Each request has a custom_id, the ticket that matches every result to its request.
One more saving works for both services: don't send the whole wardrobe when one shirt is dirty. If a request carries far more than the job reads, trimming it cuts the cost on either API.
- Yes, a person or a pipeline step is blocked (a pre-merge review, a live chat): call Claude synchronously.
- No, the result is used hours or days later (an overnight report, a weekly audit, a backfill due next week): use the Message Batches API at half the cost.
- The job needs tool calls part-way through: a batch request can't loop. Keep it synchronous, or fetch the data in code first so each request needs no tool.
- Either way, the request carries far more than the job reads: trim it. That saves on both APIs.
Words in the question that tell you which side you're on
Now (synchronous)
- blocking, must pass before merge
- developers wait, the customer is waiting, live
- tool calls, agent loop, looks up then decides
- “within seconds”, “before replying”
Batch
- overnight, weekly, nightly, quarterly
- “read on Monday”, “due next week”
- archive, backfill, re-extract thousands
- one call each, no tools, “cut the cost”
Try it: run the job both ways
Pick a job, an API and what each request carries. The simulator shows the cost, when the results arrive against when they are needed, and whether the job works at all.
The prices, token counts and batch times are illustrative, chosen to show the shape (input tokens only, at an example $3 per million standard and half that in a batch). They are not quotes. The batch time is a fixed example for each job, so it repeats when you record; real batches have no latency promise and can take up to 24 hours.
Things to try: PR review + batch, then PR review + synchronous, then switch on trim. Then weekly report + synchronous to see the trap in reverse. Last, support agent + batch: half price, and nothing gets done.
The three traps
| Trap | What the wrong option looks like | Why it's wrong |
|---|---|---|
| Batch for a job someone waits on | “Move the pre-merge review to batch for the 50% saving”, “poll the batch every minute”, “batch with a timeout fallback” | A batch has no latency promise: up to 24 hours. Polling doesn't speed it up, and a fallback pays twice. |
| Full price for work nobody waits on | Running a weekly report, a nightly tagging job or a big backfill one live call at a time, or in parallel to finish sooner | Half the cost was available, and the speed you paid for is never used. |
| Batch for a tool loop | Moving an agent that calls tools mid-task into a batch as it is | A batch request returns one reply. Claude can't get a tool result back within it. Keep it synchronous, or fetch the data in code first. |
And the saving the wrong answers often miss: trimming the request. When most of the tokens are content the job never reads, cutting them saves money on either API without dropping any work.
Practice: three exam-style questions
Answer first, then open “Think it through”.
Rule to remember
Exam guide 4.5: “Message Batches API: 50% cost savings, up to 24-hour window, no latency SLA.” “Good for non-blocking/latency-tolerant (overnight reports, weekly audits); bad for blocking (pre-merge).” “Batch API does not support multi-turn tool calling in a single request.” “custom_id correlates request/response; resubmit only failed docs by custom_id.”