Worked examples
The simulator's four example sessions on GPT-5.4 mini with in-memory retention, priced turn by turn by the same cost model. OpenAI says entries typically last 5 to 10 minutes of inactivity, up to an hour. We use the low end: 5 minutes.
-
Coding agent
Tool calls and edits in quick succession, with a few longer pauses. 40 turns, 20K tokens of starting context, 3K in and 600 out per turn, 1.5 minutes apart, three long breaks of 8 minutes.
Open this in the simulator- With caching
- $0.71
- Without
- $2.90
- Saved
- $2.19 75%
- Pays for itself on turn 2
- Cache goes cold 3 times
-
Long chat
A person reading and typing, with one long break. 30 turns, 3K tokens of starting context, 150 in and 500 out per turn, 3 minutes apart, one long break of 45 minutes.
Open this in the simulator- With caching
- $0.12
- Without
- $0.35
- Saved
- $0.23 66%
- Pays for itself on turn 2
- Cache goes cold 1 time
-
Big document
One large document, questioned a dozen times. 12 turns, 150K tokens of starting context, 100 in and 700 out per turn, 7 minutes apart.
Open this in the simulator- With caching
- $1.43
- Without
- $1.43
- Saved
- $0 0%
- Never pays for itself in this session
- Cache goes cold 11 times
-
Unattended loop
A script calling the model nonstop, the prompt growing every turn. 200 turns, 30K tokens of starting context, 1.5K in and 300 out per turn, 30 seconds apart.
Open this in the simulator- With caching
- $3.69
- Without
- $31.86
- Saved
- $28.17 88%
- Pays for itself on turn 2
- Cache stays warm the whole way
When caching pays for itself
For a prefix sent again and again inside the cache lifetime. The count does not depend on the prefix size, as long as it is above the minimum.
In memory, about 5 min
There is no write charge. A read costs $0.075 per million tokens instead of $0.75, so caching never costs more than sending the prefix uncached.
A cached prefix pays for itself after 1 read within the lifetime.
Assumed lifetime OpenAI says entries typically last 5 to 10 minutes of inactivity, up to an hour. We use the low end: 5 minutes.
Caching rules for GPT-5.4 mini
- Caching is automatic, with no write charge. A read costs 0.1x the input price.
- Only in-memory retention is shown: OpenAI's extended retention list includes GPT-5.5 and GPT-5.4 but not GPT-5.4 mini. Entries typically last 5 to 10 minutes of inactivity, up to an hour, and the simulator uses 5 minutes.
- OpenAI says the minimum prompt length varies by request on models before GPT-5.6, so the simulator applies none.
Sources: OpenAI's pricing page, caching guide. See all prices and sources.
Similar models
Per million tokens, with the 40-turn coding agent on each model's default cache setting.
| Model | Input | Cache read | Output | Coding agent |
|---|---|---|---|---|
| GPT-5.4 mini | $0.75 | $0.075 | $4.50 | $0.71 |
| GPT-6.1 Terra | $1.00 | $0.05 | $5.00 | $0.50 |
| GPT-6.1 Sol | $2.00 | $0.10 | $10.00 | $1.00 |
| Claude Haiku 4.5 | $1.00 | $0.10 | $5.00 | $1.05 |
| Gemini 3.8 Flash | $0.75 | $0.075 | $3.75 | $0.48 best case* |
* Gemini implicit caching, best case.
Questions
What is the cached input price for GPT-5.4 mini?
Input costs $0.75 per million tokens, with no charge to write the cache, $0.075 to read it and $4.50 for output.
Is prompt caching worth it for GPT-5.4 mini?
In the 40-turn coding agent example, caching costs $0.71 against $2.90 without, a saving of $2.19 (75%). With in-memory retention there is no write charge, so caching never costs more than not caching.
How long does the GPT-5.4 mini cache last?
In memory, about 5 min: OpenAI says entries typically last 5 to 10 minutes of inactivity, up to an hour. We use the low end: 5 minutes.
Does GPT-5.4 mini have a minimum cacheable prompt length?
OpenAI says the minimum varies by request on models before GPT-5.6, so the simulator applies none.
An estimate from published list prices, and your bill may differ. Token counts are what the example sets, not tokenized text. Not covered: batch and fast-mode prices, thinking tokens beyond the output shown, tool fees and regional uplifts.