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

# GPT-5.4

> GPT-5.4: reasoning and coding model. Request examples and parameters for MixRoute.

GPT-5.4 is a reasoning and coding model from OpenAI.

Call `gpt-5.4` through both the OpenAI-compatible Chat Completions API and the Responses API.

## Key capabilities

* OpenAI-compatible - Works with the OpenAI SDK by changing base\_url
* Streaming - Real-time token output through SSE
* Multi-turn conversations - Uses role-based messages
* Responses API - Uses input for text and structured content
* Reasoning control - Configure reasoning effort on supported models
* Tool use - Supports function and hosted tool definitions

## Quick example

### Responses API

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/responses" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "gpt-5.4",
      "input": [
        {
          "role": "user",
          "content": "Explain quantum entanglement in simple terms."
        }
      ],
      "max_output_tokens": 256,
      "reasoning": {
        "effort": "low"
      }
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    response = client.responses.create(
        model="gpt-5.4",
        input="Explain quantum entanglement in simple terms.",
        reasoning={"effort": "low"},
        max_output_tokens=256,
    )

    print(response.output_text)
    ```
  </Tab>

  <Tab title="Streaming">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    with client.responses.stream(
        model="gpt-5.4",
        input="Write a short poem about the sea.",
        reasoning={"effort": "low"},
        max_output_tokens=256,
    ) as stream:
        for event in stream:
            if event.type == "response.output_text.delta":
                print(event.delta, end="")
    ```
  </Tab>
</Tabs>

### Chat Completions

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/chat/completions" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "gpt-5.4",
      "messages": [
        {
          "role": "user",
          "content": "Explain quantum entanglement in simple terms."
        }
      ],
      "max_completion_tokens": 256
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    response = client.chat.completions.create(
        model="gpt-5.4",
        messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
        max_completion_tokens=256,
    )

    print(response.choices[0].message.content)
    ```
  </Tab>

  <Tab title="Streaming">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    stream = client.chat.completions.create(
        model="gpt-5.4",
        messages=[{"role": "user", "content": "Write a short poem about the sea."}],
        max_completion_tokens=256,
        stream=True,
    )

    for chunk in stream:
        print(chunk.choices[0].delta.content or "", end="")
    ```
  </Tab>
</Tabs>

## Parameters

### Responses API

| Parameter | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | Must be `gpt-5.4`. |
| `input` | string \| array | Yes | Text or structured response input. |
| `max_output_tokens` | integer | No | Maximum output tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `reasoning` | object | No | Reasoning configuration, including effort. |
| `text` | object | No | Text format and verbosity controls. |
| `tools` | array | No | Tools the model may call. |
| `store` | boolean | No | Whether to store the response. |

### Chat Completions

| Parameter | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | Must be `gpt-5.4`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_completion_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.