Skip to content
Sign in

GPT-5.4 is OpenAI's latest frontier model, unifying the Codex and GPT series into a single system. It features a 1M+ token context window (922K input, 128K output), supports text and image inputs, and enables high-context reasoning, coding, and multimodal analysis within the same workflow. The model delivers improved performance in coding, document understanding, tool use, and instruction following. It is designed as a powerful default for general tasks and software engineering, capable of generating production-quality code, synthesizing information across multiple sources, and executing complex multi-step workflows with fewer iterations and greater token efficiency.

Context window1.1M
ProviderOpenAI
Released2026/03/09

Playground

Pricing

The same model is available through multiple service channels — choose based on latency, reliability and cost.

Prices in $ / 1M tokens
To pick a channel, add a provider field to the request body, for example "provider": { "channel": "direct" }. Valid values are direct / stable / economical; omit it to use the default channel.

Direct

Direct upstream connection — best when you need native behavior and the full context window.

Input contextInputOutputCache read
≤ 272K2.50/M15.00/M0.25/M
> 272K5.00/M22.50/M0.50/M

Overview

Input
Text Image
Output
Text

API

API integration

Model IDUse this value as the model in inference requests
gpt-5.4
API KeyBearer token used to authenticate inference requests
Base URLOpenAI compatible · /chat/completions
OpenAIhttps://api.seawhaleai.com/v2/
provider OptionalSelects a service channel; omit it and the system picks the default
"provider": { "channel": "direct" }

gpt-5.4 usage examples

SeaWhale AI is compatible with the OpenAI API protocol, so you can call it with the OpenAI SDK or plain HTTP requests. Streaming is enabled by default.

About the provider parameter (optional, a SeaWhale AI extension): most models are served over several channels that differ slightly in price and reliability. Add a provider field to the request body to pick one; omit it and the system selects the default channel — normal calls are unaffected.

provider is not part of the official OpenAI protocol — it is a SeaWhale AI extension that only takes effect on this platform. The OpenAI SDK allows custom fields like this to pass through; see the examples below.

ValueChannelBest for
directDirectThe official upstream link, for native behavior and the full context window
stablePreferredBalanced availability and speed — a good default for production traffic
economicalEconomyCost first, well suited to batch processing and price-sensitive workloads

Available channels and their prices are listed under "Pricing" above (channels vary by model). Additional notes:

  • Syntax: "provider": { "channel": "direct" }.
  • If the requested channel is not enabled for that model, the request automatically falls back to the default channel and returns normally — it does not error.
  • With the official SDKs: in Python pass it via extra_body; in Node.js put it directly on the request object and it passes through. In TypeScript projects, add a // @ts-expect-error line to skip the type check.
js
curl https://api.seawhaleai.com/v2/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "gpt-5.4",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ],
    "provider": { "channel": "direct" },
    "stream": true
  }'
# provider is optional — remove this line to use the default channel
js
from openai import OpenAI

client = OpenAI(
    base_url="https://api.seawhaleai.com/v2",
    api_key="<API_KEY>",
)

stream = client.chat.completions.create(
    model="gpt-5.4",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"},
    ],
    stream=True,
    # Optional: pick a service channel; omit to use the default
    extra_body={"provider": {"channel": "direct"}},
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
js
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://api.seawhaleai.com/v2',
  apiKey: '<API_KEY>',
})

const stream = await client.chat.completions.create({
  model: 'gpt-5.4',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Hello!' },
  ],
  stream: true,
  // Optional: pick a service channel; omit to use the default
  // @ts-expect-error provider is a SeaWhale AI extension, not in the OpenAI SDK types
  provider: { channel: 'direct' },
})

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? '')
}