inference-providers

GPT-5.4

by openai · family gpt

Facts

Release date2026-03-05
Retired date
Knowledge cutoff
Context (max)1,050,000
Max output16,384
Modalitiestext, image → text
Aliasesgpt-5.4
Open weightsno
Description1.05M context, 128K output, text+image input. $2.50/$15.00 per Mtok (prompts over 272K billed 2x input / 1.5x output for the session); cached input $0.25. reasoning.effort none-xhigh (no max), default none. Superseded positionally by 5.5/5.6 but served and not deprecated.

Unknown values are shown as —.

Offerings

ProviderWire IDVariantEndpointProtocolStatusPrice (USD / Mtok)Reasoning
NEAR AI Cloudopenai/gpt-5.4chatopenai-chatga2.50 / 15.00effort · default off · returns reasoning_content
OpenCode Zengpt-5.4-proproresponsesopenai-responsesga30.00 / 180.00effort · default on · mandatory · returns reasoning_summary · round-trips encrypted_content
OpenCode Zengpt-5.4responsesopenai-responsesga2.50 / 15.00effort · default off · returns reasoning_summary · round-trips encrypted_content
OpenRouteropenai/gpt-5.4-proprochat-completionsopenai-chatga30.00 / 180.00effort · default on · mandatory · returns reasoning_content · round-trips reasoning_content
OpenRouteropenai/gpt-5.4chat-completionsopenai-chatga2.50 / 15.00effort · default off · returns reasoning_content · round-trips reasoning_content

Reasoning controls

NEAR AI Cloud· openai/gpt-5.4· chat effort

reasoning_effort none●lowmediumhighxhigh

effort · default off · returns reasoning_content

OpenCode Zen· gpt-5.4-pro· responses effort

reasoning.effort medium●highxhigh

effort · default on · mandatory · returns reasoning_summary · round-trips encrypted_content

Incompatible with: temperature, top_p

OpenCode Zen· gpt-5.4· responses effort

reasoning.effort none●lowmediumhighxhigh

effort · default off · returns reasoning_summary · round-trips encrypted_content

Incompatible with: temperature, top_p

OpenRouter· openai/gpt-5.4-pro· chat-completions effort

reasoning.effort medium●highxhigh

effort · default on · mandatory · returns reasoning_content · round-trips reasoning_content

OpenRouter· openai/gpt-5.4· chat-completions effort

reasoning.effort none●lowmediumhighxhigh

effort · default off · returns reasoning_content · round-trips reasoning_content

Example requests

NEAR AI Cloud · openai-chat · openai/gpt-5.4

curl 'https://cloud-api.near.ai/v1/chat/completions' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-5.4",
  "messages": [
    {
      "role": "user",
      "content": "Tell me about the weather."
    }
  ],
  "reasoning_effort": "none"
}'
Python (requests)
import requests

resp = requests.post(
    "https://cloud-api.near.ai/v1/chat/completions",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "openai/gpt-5.4",
      "messages": [
        {
          "role": "user",
          "content": "Tell me about the weather."
        }
      ],
      "reasoning_effort": "none"
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://cloud-api.near.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "openai/gpt-5.4",
    "messages": [
      {
        "role": "user",
        "content": "Tell me about the weather."
      }
    ],
    "reasoning_effort": "none"
  }),
})
console.log(await resp.json())

OpenCode Zen · openai-responses · gpt-5.4-pro

curl 'https://opencode.ai/zen/v1/responses' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "gpt-5.4-pro",
  "input": "Tell me about the weather.",
  "reasoning": {
    "effort": "medium"
  }
}'
Python (requests)
import requests

resp = requests.post(
    "https://opencode.ai/zen/v1/responses",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "gpt-5.4-pro",
      "input": "Tell me about the weather.",
      "reasoning": {
        "effort": "medium"
      }
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://opencode.ai/zen/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.4-pro",
    "input": "Tell me about the weather.",
    "reasoning": {
      "effort": "medium"
    }
  }),
})
console.log(await resp.json())
  • ⚠ Responses include encrypted_content artifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
  • Reported incompatible with thinking controls: temperature, top_p.

OpenCode Zen · openai-responses · gpt-5.4

curl 'https://opencode.ai/zen/v1/responses' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "gpt-5.4",
  "input": "Tell me about the weather.",
  "reasoning": {
    "effort": "none"
  }
}'
Python (requests)
import requests

resp = requests.post(
    "https://opencode.ai/zen/v1/responses",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "gpt-5.4",
      "input": "Tell me about the weather.",
      "reasoning": {
        "effort": "none"
      }
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://opencode.ai/zen/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.4",
    "input": "Tell me about the weather.",
    "reasoning": {
      "effort": "none"
    }
  }),
})
console.log(await resp.json())
  • ⚠ Responses include encrypted_content artifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
  • Reported incompatible with thinking controls: temperature, top_p.

OpenRouter · openai-chat · openai/gpt-5.4-pro

curl 'https://openrouter.ai/api/v1/chat/completions' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-5.4-pro",
  "messages": [
    {
      "role": "user",
      "content": "Tell me about the weather."
    }
  ],
  "reasoning": {
    "effort": "medium"
  }
}'
Python (requests)
import requests

resp = requests.post(
    "https://openrouter.ai/api/v1/chat/completions",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "openai/gpt-5.4-pro",
      "messages": [
        {
          "role": "user",
          "content": "Tell me about the weather."
        }
      ],
      "reasoning": {
        "effort": "medium"
      }
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://openrouter.ai/api/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "openai/gpt-5.4-pro",
    "messages": [
      {
        "role": "user",
        "content": "Tell me about the weather."
      }
    ],
    "reasoning": {
      "effort": "medium"
    }
  }),
})
console.log(await resp.json())
  • ⚠ Responses include reasoning_content artifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).

OpenRouter · openai-chat · openai/gpt-5.4

curl 'https://openrouter.ai/api/v1/chat/completions' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-5.4",
  "messages": [
    {
      "role": "user",
      "content": "Tell me about the weather."
    }
  ],
  "reasoning": {
    "effort": "none"
  }
}'
Python (requests)
import requests

resp = requests.post(
    "https://openrouter.ai/api/v1/chat/completions",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "openai/gpt-5.4",
      "messages": [
        {
          "role": "user",
          "content": "Tell me about the weather."
        }
      ],
      "reasoning": {
        "effort": "none"
      }
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://openrouter.ai/api/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "openai/gpt-5.4",
    "messages": [
      {
        "role": "user",
        "content": "Tell me about the weather."
      }
    ],
    "reasoning": {
      "effort": "none"
    }
  }),
})
console.log(await resp.json())
  • ⚠ Responses include reasoning_content artifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).