> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytespike.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# gpt-5-4

> OpenAI's GPT-5.4 — the production workhorse of the GPT-5 family. Vision, tools, reasoning, web search, and structured outputs together at mid-tier pricing. Available through both Chat Completions and the Responses API.

`gpt-5-4` is the GPT-5 production workhorse — mid-tier on the price curve, full feature coverage. Reach for it when you want the GPT-5 family's reasoning capability and tighter structured-output validation at a mid-tier rate.

**Pricing:** $2.50 / 1M input, $15.00 / 1M output, \$0.25 / 1M cache read — see the [rate card](/pricing).

## Protocols

| Protocol                | Path                                                |
| ----------------------- | --------------------------------------------------- |
| OpenAI Chat Completions | `POST https://llm.bytespike.ai/v1/chat/completions` |
| OpenAI Responses        | `POST https://llm.bytespike.ai/v1/responses`        |

The Responses API is the newer agent-style protocol — Codex requires it. Chat Completions is the ubiquitous default; most code will use this one.

## Quickstart

<CodeGroup>
  ```bash cURL theme={null}
  curl https://llm.bytespike.ai/v1/chat/completions \
    -H "Authorization: Bearer $BYTESPIKE_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "model": "gpt-5-4",
      "reasoning_effort": "medium",
      "messages": [
        { "role": "user", "content": "Hello, ByteSpike." }
      ]
    }'
  ```

  ```python Python (Chat Completions) theme={null}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://llm.bytespike.ai/v1",
      api_key=os.environ["BYTESPIKE_API_KEY"],
  )

  resp = client.chat.completions.create(
      model="gpt-5-4",
      reasoning_effort="medium",
      messages=[{"role": "user", "content": "Hello, ByteSpike."}],
  )

  print(resp.choices[0].message.content)
  ```

  ```python Python (Responses API) theme={null}
  resp = client.responses.create(
      model="gpt-5-4",
      input="Hello, ByteSpike.",
      reasoning={"effort": "medium"},
  )

  print(resp.output_text)
  ```
</CodeGroup>

## Capabilities

| Capability                         | Supported   |
| ---------------------------------- | ----------- |
| Chat Completions                   | ✅           |
| Responses API                      | ✅           |
| Streaming (SSE)                    | ✅           |
| Vision (image input)               | ✅           |
| Tool use (function calling)        | ✅ parallel  |
| JSON mode                          | ✅           |
| Structured outputs (json\_schema)  | ✅           |
| Reasoning effort (low/medium/high) | ✅           |
| Web search                         | ✅           |
| Context window                     | 128K tokens |

## When to use

* **Production workhorse** — when you need the GPT-5 quality envelope with vision + tools + reasoning, at a mid-tier price.
* **Structured outputs.** `response_format: { type: "json_schema" }` returns schema-validated JSON; ByteSpike does not modify the schema.
* **Codex-style clients.** Hit the Responses API instead of Chat Completions for the structured-reasoning shape.
* **Fresh-fact queries.** Add `tools: [{ "type": "web_search" }]`.

When **not** to use:

* Flagship reasoning — use [`gpt-5-5`](/models/gpt-5-5), the current GPT-5 family flagship.
* High-volume classification — [`gpt-5-4-mini`](/models/gpt-5-4-mini) is cheaper.

## Next

* [gpt-5-4-mini](/models/gpt-5-4-mini) — small-mid of the GPT-5.4 family
* [gpt-5-5](/models/gpt-5-5) — current GPT-5 flagship
