Skip to content
NewRouters/Documentation
LLM API

gpt-5.4 · API guide

Integrate gpt-5.4 through openai. Request examples, parameters, authentication and result handling.

POST/v1/chat/completionsMODELgpt-5.4
Official reference gpt-5.4Checked 2026-10-14Official docs
Code examples & responses
Request & responseExamples
POST/v1/chat/completions
Server-side request
curl "https://newrouters.com/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  --data '{
  "model": "gpt-5.4",
  "messages": [
    {
      "role": "user",
      "content": "Explain how an HTTP request works in three concise steps."
    }
  ],
  "max_completion_tokens": 1024,
  "stream": false
}'

The API origin is filled in. Set API_KEY before running. Examples never submit automatically.

ResponseSelected fields · illustrative values
200Successful result
JSON
{
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "..."
      },
      "finish_reason": "stop"
    }
  ]
}
Integration flowOpenAI · Native protocol
  1. Prepare a request01
    API key + model ID

    Use the model’s native protocol and authentication.

    SDK / HTTP
  2. Call the native API02
    POST /v1/chat/completions

    Submit the request structure documented on this page.

    OpenAI
  3. Read the response03
    choices[].message

    JSON returns a complete result; read SSE increments using native event formats.

    JSON / SSE

Use the exact API model ID gpt-5.4. This guide describes the platform contract; check the live catalog before calling the model.

An active catalog record means the model is configured; it does not guarantee an available channel. Before integration, check lifecycle, health.status and contract in GET /v1/public-model-catalog. Account pricing is shown in the dashboard. If supply is unavailable, wait for recovery or explicitly select another model. Do not repeatedly submit requests with an unknown outcome.

The platform origin is filled in at build time. Set API_KEY to your server-side key before running.

Terminal window
curl "https://newrouters.com/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
--data '{
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "Explain how an HTTP request works in three concise steps."
}
],
"max_completion_tokens": 1024,
"stream": false
}'

This model uses the openai protocol. Read its native response and usage fields; do not wrap the request in the media task input envelope.

Supported endpoint templates:

  • POST /v1/chat/completions
  • POST /v1/responses
LimitCatalog value
Context tokens1050000
Maximum output tokens128000

For streaming, use the native protocol streaming option and parse its events; check supported capabilities in the live catalog.

Checked: 2026-10-14 · Platform model: gpt-5.4 · Official reference: gpt-5.4

Check current availability, contract and account pricing before integration. Keep request IDs and usage receipts when diagnosing errors. Complete API reference