Skip to main content

Batch APIs, the cache and what a run costs

How batch APIs halve the price of a big run and make it slower, what Inspect’s cache saves, and how a run’s cost is worked out from its log.
Author
Last updated

December 2, 2026

A benchmark run calls a model thousands of times, and with a judge grading every rubric item, it adds up. Two things kept my first note affordable: batch APIs and Inspect’s cache.

Anthropic and OpenAI both have a Batch API. You send a big pile of requests at once, and they come back within a day, usually within an hour, at half the normal price. Inspect can send a run’s calls this way and bundles them into batches for you.

The catch is time. When one step depends on another, you wait for a whole batch at each step. In HealthBench the model has to answer before the judge can grade the answer, so there are at least two waits, which I think of as rounds. A round can take an hour or more, so batching is cheap and slow. Running the answers and the grading as two separate runs meant the model on my laptop never sat waiting on the judge’s batches.

Inspect’s cache keeps each reply on your computer. If the exact same call comes up again (same model, same input, same settings), Inspect hands back the saved reply without calling the API, and the log marks it as read from the cache (a cache hit). When I had to stop and restart a run, the answers it had already finished weren’t paid for twice.

The cost comes straight from the log. Models read and write text in tokens, small chunks of a word or so, and vendors charge per token, with output tokens usually costing more than input. Every call in the log records its tokens, so the cost is the tokens times the vendor’s price per token. Prices change, so each note keeps the prices it used and the day I read them. A cached answer counts once, and a model on a laptop costs nothing in API fees.

A batched run, its rounds and its cost First, the answers: every conversation goes in one batch to the model being tested, at half the usual price. The run waits for the batch to come back. Then, the grading: each answer against each criterion, in batches, to the judge, and the run waits again. The log records the tokens each call used; those tokens times each vendor's price on the day give the cost. Inspect's cache serves a call that was made before, and that call is counted once. First, the answers every conversation, in one batch, to the tested model, at half the price wait for the batch to come back Then, the grading each answer against each criterion, in batches, to the judge wait again The log the tokens each call used, × the price that day = the cost Inspect's cache a call made before is served from the cache, counted once

Where I learned it

A frontier model and a small open-weight model on a laptop, compared on HealthBench’s expertise-tailored communication

  • How do I make a big run affordable? Use the vendors’ Batch APIs at half price, and count each answer and judgment once, including the ones reused from the cache after a restart.
  • Why didn’t the judge’s calls use the Batch API at first? A setting given to the run only reaches the model being tested. The judge uses the Batch API only when you create it as its own model with that setting.

Read more