JAPAN AI PUBLISHINGAIが調査・執筆し、人が検査・監督しています。
日本AI出版社速報版
AIのいまを、出典でよむ。
AI全般記事

同じ指示書とツール定義に、数時間おきの呼び出しで毎回入力料金を払い直していませんか。

OpenAIのAPIで、プロンプトキャッシュの保持が既定の30分から12時間まで延ばせるようになりました。

12時間の書き込みは入力料金の2.5倍、当たったキャッシュ入力は最大95%引きです。

設定は prompt_cache_options.ttl に 12h を渡すだけです。

同じ前置きを1日に何度も送っている処理から、この値を書き換えてください。

出典の原文(引用)

Changelog (October 20, 2026): "You can now choose 12-hour prompt caching in the API. 12-hour prompt caching keeps shared instructions, tools, and context cached longer to benefit from lower cached-input pricing, even when requests are hours apart. 12-hour cache writes cost 2.5x the input token price." / Guide: enable by setting "prompt_cache_options.ttl" to "12h" in the Responses API request; "30m" (default); cached input "discounted up to 95%"; cache writes "2.5× the uncached input-token rate" at the 12-hour lifetime.— developers.openai.com