gpt-5-4-mini
Capability: 128K context · tool use · vision · streaming · structured output
Pricing: per-token, mini tier (live rate)
GPT-5.4-mini sits between GPT-5-mini
and GPT-5.4: mini-tier price with 5.4’s
tighter structured output and tool-call argument generation. Right
default for production extraction and agent loops where you want 5.4’s
quality bump without the standard-tier cost.
Request
Body parameters
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
model | string | yes | — | gpt-5-4-mini |
messages | array | yes | — | — |
max_tokens | integer | no | model max | Max: 16384. |
tools | array | no | — | Parallel function calling. |
response_format | object | no | — | JSON / structured output. |
stream | boolean | no | false | SSE streaming. |
Response
Code examples
Streaming + caching
"stream": true for SSE. Automatic prompt caching.
Errors
| Code | Trigger | Billed? |
|---|---|---|
| 400 / 401 / 402 / 422 / 429 | Standard | No |
| 5xx | Upstream | No (auto-retry) |
When to use
- Production extraction and structured output where 5-mini’s quality plateaus.
- Tool-using agent steps where argument tightness matters.
- For lower latency at smaller scale, see GPT-5.4-nano.
- For more capability, see GPT-5.4 or GPT-5.5.
Limits
| Limit | Value |
|---|---|
| Context window | 128K tokens |
| Max output | 16384 tokens |
| Supports tool use | Yes (parallel) |
| Supports vision | Yes |
| Supports streaming | Yes |
| Supports prompt caching | Automatic |