Около 22 октября в Responses API OpenAI появилась возможность задать 12-часовой срок жизни кэша промптов.
Как включить
{ "prompt_cache_options": { "ttl": "12h" } }
Работает на моделях начиная с GPT-5.6.
Цены относительно стоимости входных токенов
| Кэш 30 минут (по умолчанию) | Кэш 12 часов | |
|---|---|---|
| Запись | 1.25× | 2.5× |
| Чтение | 0.1× | 0.1× (0.05× у GPT-6.1 Sol и Terra) |
Когда это выгодно
Запись дороже вдвое, поэтому длинный кэш окупается, когда один и тот же префикс читается много раз в течение дня, а запросы идут неравномерно — с паузами длиннее 30 минут:
- агенты с большими системными промптами и описаниями инструментов;
- RAG и чат-боты с общим контекстом — документацией, политиками;
- пакетные задачи, растянутые на рабочий день.
Что сделать
Вынести неизменяемую часть промпта — инструкции, описания инструментов, справочные документы — в начало запроса, а переменные данные — в конец, иначе кэш не будет попадать. Затем сравнить долю cached tokens в отчётах об использовании до и после.
Around Oct 22 OpenAI’s Responses API gained the option of a 12-hour prompt cache lifetime.
How to enable it
{ "prompt_cache_options": { "ttl": "12h" } }
It works on models from GPT-5.6 onwards.
Pricing relative to the input token rate
| 30-minute cache (default) | 12-hour cache | |
|---|---|---|
| Write | 1.25x | 2.5x |
| Read | 0.1x | 0.1x (0.05x on GPT-6.1 Sol and Terra) |
When it pays off
Writes cost twice as much, so the long cache pays off when the same prefix is read many times through the day and traffic is uneven, with gaps longer than 30 minutes:
- agents with large system prompts and tool descriptions;
- RAG and chatbots with shared context such as documentation or policies;
- batch jobs spread across a working day.
What to do
Put the static part of the prompt — instructions, tool descriptions, reference documents — at the start of the request and variable data at the end, or the cache will not hit. Then compare the share of cached tokens in usage reports before and after.