Prompt CachingOpenAIResponses APIAPI costNbility

When a Long Prompt Runs a Few Times a Day, Is 12-Hour Caching Worth It?

OpenAI's Responses API added 12-hour prompt caching, with writes billed at 2.5x input. Work out the break-even point against the default 30-minute cache and no cache, then mix breakpoints and read the billing fields.

When a Long Prompt Runs a Few Times a Day, Is 12-Hour Caching Worth It?

Some applications send long prompts but not often. An internal knowledge assistant carries 20,000 tokens of policy documents and gets three to five questions a day. A reporting job runs once in the morning and once in the afternoon with the same instructions and schema each time. The default cache lasts 30 minutes, so with hours between calls it has expired and has to be written again every time.

On October 20, 2026, OpenAI added a 12-hour cache option to the Responses API. Its writes cost more, so it's worth working out how many uses a day make it pay off.

This article checks OpenAI's changelog and prompt caching guide as of November 15, 2026. The calculations use "the ordinary input cost of processing the full prefix once" as the unit. No real requests were made, and no specific model prices are involved.

The rules

For GPT-5.6 and later:

Item"30m" (default)"12h"
Minimum lifetime30 minutes12 hours
Write rate1.25x ordinary input2.5x ordinary input
Read rate0.1x ordinary inputSame
How to enableDefault, nothing to setSet it in the Responses API

On GPT-6.1 Sol and GPT-6.1 Terra, reads cost 0.05x. Both write rates are totals, not surcharges on top of ordinary input. A cacheable prefix needs at least 1,024 tokens.

Rules that are easy to misread:

  • 12 hours is a minimum lifetime. It governs eligibility for read pricing during that window. It doesn't guarantee reuse or lower latency on every request, and it doesn't change the maximum data-retention policy.
  • Reads extend a 30-minute entry. Each hit pushes expiry to at least 30 minutes after the read. If your calls are always less than 30 minutes apart, the default is enough.
  • Upgrading from 30 minutes to 12 hours costs a full new write, with no credit for the earlier 30-minute write.

Calls at 9:00, 13:00 and 17:00: the 30-minute cache is rewritten each time, the 12-hour cache is written once and read twice

Break-even in multiples

Let processing the full prefix at the ordinary input rate cost 1. With every gap longer than 30 minutes but inside 12 hours, cumulative cost after N uses:

Uses that dayNo cacheDefault 30m (rewritten each time)12h (write once, then read)
111.252.5
222.52.6
333.752.7
4452.8

The 12-hour column is 2.5 + 0.1 × (N − 1). For models with 0.05x reads it is 2.5 + 0.05 × (N − 1), and the conclusion is the same:

  • At one or two uses, the 12-hour cache costs more than no cache.
  • From the third use it beats no cache, and by the fourth it costs 70% of the uncached total.
  • With gaps over 30 minutes, the default 30-minute cache is rewritten at 1.25x every time and ends up costing more than no cache.

Cumulative cost by number of uses: no cache, 30 minutes, 12 hours

The table covers only the cacheable prefix; the changing question and the output are extra. It also assumes the prefix never changes. Editing one character or reordering the tool list breaks matching for everything after it; see the three-vendor caching bill comparison.

Two lifetimes in one request

Give instructions used all day a 12-hour lifetime, give session content reused over a few minutes 30 minutes, and keep the current question out of the cache. OpenAI's example uses explicit mode:

{
  "model": "YOUR_MODEL",
  "prompt_cache_options": {"mode": "explicit", "ttl": "30m"},
  "input": [
    {
      "role": "developer",
      "content": [{
        "type": "input_text",
        "text": "Instructions and reference material reused all day...",
        "prompt_cache_breakpoint": {"mode": "explicit", "ttl": "12h"}
      }]
    },
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "Session context reused over the next few minutes...",
          "prompt_cache_breakpoint": {"mode": "explicit"}
        },
        {"type": "input_text", "text": "The current question, no cache write needed"}
      ]
    }
  ]
}

The request-level ttl applies to breakpoints without their own ttl; a breakpoint's ttl overrides it. In explicit mode, content after the last breakpoint is billed as ordinary input with no write charge. Top-level instructions can't hold a breakpoint, so put cacheable instructions in an input_text block inside a developer message. Each request can create at most four cache writes.

Shared instructions get a 12-hour breakpoint, session content 30 minutes, the question none

Check it against the billing fields

In usage.input_tokens_details:

  • cached_tokens: tokens billed at the read rate;
  • cache_write_tokens: total writes, split into cache_write_tokens_details.ttl_30m_tokens and ttl_12h_tokens.

All of these are already included in input_tokens; don't add them again. OpenAI's worked example: 12,000 input tokens with 4,000 read, 3,000 written for 30 minutes and 4,000 written for 12 hours, at $1 per million ordinary input and $0.10 cached:

(1000 + 4000 × 0.1 + 3000 × 1.25 + 4000 × 2.5) / 1,000,000 = $0.01515

The 1,000 is ordinary input, from 12000 − 4000 − 7000. Watch ttl_12h_tokens on your first day. If it stays large on every request, the prefix isn't being reused: either the content changes, or requests never reach the 12-hour breakpoint.

Calling through Nbility

Nbility's Responses endpoint forwards prompt_cache_options, and the current gateway code prices 12-hour writes separately instead of folding them into 30-minute writes. Whether a request actually hits the cache depends on the model and channel; we did not test this on Nbility. To check what a request cost, look at cache reads and writes in your usage records and compare with billing. Client-side estimates can differ from the final charge; see when usage and the bill don't match.

A simple rule: if the same long prefix is used three or more times within 12 hours on a given day, and the gaps are often longer than 30 minutes, try the 12-hour lifetime. Otherwise stay on the default.

Related posts

Decisions APIs Pull Yes/No Questions Out of the Chat Endpoint
Decisions APIGeminiOpenAI

Decisions APIs Pull Yes/No Questions Out of the Chat Endpoint

Google's Gemini Decision 1 and OpenAI's gpt-6-luna both offer a Decisions API that returns yes/no, choice or score answers with no generated text. Compare fields, limits and pricing, and handle thresholds, catch-all options and untrusted input.

Run your Agent workflow through Nbility

Get an API key and connect OpenAI-compatible models and developer tools from one place.

Get an API key