APIMart
Back to all models

GPT-5.4 API

OpenAIModel ID gpt-5.4Text modelReleased March 5, 2026

Use GPT-5.4 to trace a failing test back to the commit that broke it, check a contract draft against the term sheet, or turn a long spec into a task list.

Max input
922,000 tokens
Max output
128,000 tokens
Input → output
Text, Image → Text
Knowledge cutoff
August 31, 2025
  • Image input
  • Streaming
  • Cached input pricing
  • OpenAI SDK compatible

GPT-5.4 API use cases

Each use case comes with an illustrative example: source material, a prompt and a hand-written sample answer, not actual model output. Copy the prompt, swap in your own material and try it on GPT-5.4.

Try GPT-5.4 with your own material

Finding the commit behind a failing test

Send GPT-5.4 the failing test output and the diffs of the last few commits, and ask which change most likely broke it. Confirm by reverting that commit on a branch and running the test again.

Example: Which commit broke this test?

Material

Test failure
test_invoice_total: expected 107.00, got 100.00
Recent commits
a1f3: rename tax_rate to vat_rate in config. b72c: update README. c9e0: add logging to invoice service.

PromptRead the test failure and the recent diffs, and say which commit most likely caused it and why.

Sample answer · written by hand to show the reasoning

Most likely a1f3. The total is missing exactly 7%, which looks like tax not being applied; if the invoice code still reads tax_rate, it now gets nothing and falls back to zero. Search for remaining references to tax_rate, then revert a1f3 on a branch and rerun the test to confirm.

About the GPT-5.4 API

  • Built for coding and professional work

    OpenAI released GPT-5.4 as its frontier model for professional work in March 2026; it now positions it as a more affordable option for coding and professional tasks.

  • 1.05M context, 128K output

    The context window is 1,050,000 tokens and the maximum output 128,000 tokens, with text and image input. Requests over 272K input tokens are billed at long-context rates.

  • Reasoning off by default

    Reasoning effort defaults to none and goes up to xhigh. Function calling, structured outputs and streaming are supported.

  • GPT-5.4 API key and access

    You don’t need a separate GPT-5.4 API key: one APIMart key works for every model. Requests go through an OpenAI Chat Completions-compatible endpoint with the model ID gpt-5.4; GPT-5.4 API pricing is in the table on this page.

How to call the GPT-5.4 API

To call GPT-5.4, you only need an APIMart API key and your existing OpenAI SDK, or send plain HTTP requests.

POST /v1/chat/completions
curl https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-5.4",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

GPT-5.4 access details

Model IDgpt-5.4
Base URLhttps://api.apimart.ai/v1
Endpoint/chat/completions

Common parameters

model
Required
messages
Required
stream
Optional
max_tokens
Optional
temperature
Optional
All request parameters, response fields and error codes

GPT-5.4 API request parameters

GPT-5.4 uses the general chat endpoint, POST /v1/chat/completions, with a JSON body. model and messages are required; every other parameter is optional.

ParameterTypeRequiredDescription
modelstringYesModel ID. Use gpt-5.4 for this model.
messagesarrayYesConversation messages. Each message has a role (system, user, or assistant) and content. Include earlier messages for multi-turn conversations.
streambooleanNoWhether to stream the output. true returns chunks over SSE, false returns the full response at once. Default: true.
temperaturenumberNoOutput randomness, 0–2. Default: 1.0. Lower values give more deterministic output.
top_pnumberNoNucleus sampling, 0–1. Default: 1.0. Adjust this or temperature, not both.
max_tokensintegerNoMaximum number of tokens to generate for the reply.
frequency_penaltynumberNoFrequency penalty, -2.0 to 2.0. Default: 0. Positive values reduce repeated wording.
presence_penaltynumberNoPresence penalty, -2.0 to 2.0. Default: 0. Positive values encourage new topics.
stopstring | arrayNoUp to 4 stop sequences. Generation stops when any of them appears.
nintegerNoNumber of replies to generate. Default: 1.

Response fields

The response contains the fields below. Token usage is returned in usage, which you can use to check costs.

FieldTypeDescription
idstringUnique identifier for the request.
modelstringThe model that handled the request.
choicesarrayList of replies. Each item contains message (role and content) and finish_reason.
usageobjectToken usage: prompt_tokens, completion_tokens, and total_tokens.

Error codes

Failed requests return an error object with code, message, and type.

StatusTypeMeaning
400invalid_request_errorInvalid request parameters.
401authentication_errorThe API key is invalid or missing.
402payment_requiredInsufficient account balance.
403permission_errorNo permission to access this resource.
429rate_limit_errorToo many requests. Retry later.
500server_errorInternal server error.
502bad_gatewayGateway error. The service is temporarily unavailable.

GPT-5.4 API pricing

The GPT-5.4 API is billed by token usage, and prices depend on your membership tier. Prices below are per million tokens; 1 US dollar = 10 credits.

ItemGoldCurrent pricePlatinumDiamondOfficial priceYou save
Input20Credits~$219Credits~$1.918Credits~$1.825Credits~$2.520%
Cached input2Credits~$0.21.9Credits~$0.191.8Credits~$0.182.5Credits~$0.2520%
Output120Credits~$12114Credits~$11.4108Credits~$10.8150Credits~$1520%

Prices are for reference only. View full pricing

Why call GPT-5.4 API through APIMart

  • 20% below official pricing

    GPT-5.4 API pricing is billed by token usage. Gold to Diamond member prices are 20%–28% below OpenAI's official prices, and cached input costs just $0.2 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    GPT-5.4, the rest of its family and 500+ models from GPT, Claude, Gemini and more share one API key and one account balance. Switching models is just a change to the model parameter.

  • Change two lines of existing code

    If you already use the OpenAI SDK, point base_url at https://api.apimart.ai/v1 and swap in your APIMart API key. Requests and responses keep the same format.

  • Try it online before you code

    Try GPT-5.4 with your own material in the Playground, no code or setup needed, and integrate once you like the results.

    Open Playground

Which OpenAI model should you choose?

Base prices per 1M tokens (USD). Your GPT-5.4 API key works for every model in the table; just change the model parameter.

Differences between OpenAI models
ComparisonGPT-5.4 CurrentGPT-5.3-CodexGPT-5.4 miniGPT-5.4 nanoGPT-5.4 ProGPT-5.5GPT-5.6 LunaGPT-5.6 SolGPT-5.6 TerraGPT-6 AstraGPT-6 LunaGPT-6 SolGPT-6.1 SolGPT-6.1 TerraGPT-6.2 AstraGPT-6.2 Sol
Best forCoding and professional work, 1.05M context, Text and image inputAgentic coding, Deprecated, Responses APICoding and subagents, 400K context, Text and image inputClassification and extraction, Deprecated, Text and image inputHard reasoning, More compute per request, Text and image inputCoding and professional work, 1.05M context, Reasoning from none to xhighHigh-volume tasks, Classification, Data extractionComplex professional work, Coding and debugging, Text and image inputBalanced cost, Support and review, Text and image inputComplex coding, Professional work, ResearchStructured summaries, Classification, Data extractionComplex coding, Agentic workflows, Testing and debuggingComplex coding, Professional documents, Business workflowsVisual reasoning, Drawings and screenshots, WritingComplex coding, Long-document analysis, Professional researchEveryday coding, Agentic tasks, Writing
Max input922,000 tokens272,000 tokens272,000 tokens272,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens
Knowledge cutoffAugust 31, 2025August 31, 2025August 31, 2025August 31, 2025August 31, 2025December 1, 2025February 16, 2026February 16, 2026February 16, 2026April 30, 2026May 18, 2026April 20, 2026April 30, 2026June 1, 2026May 18, 2026June 1, 2026
Input price$2$1.4$0.6$0.16$24$4$0.16$3.2$1.6$8$0.08$1.6$1.6$0.8$6.4$1.6
Output price$12$11.2$3.6$1$144$24$0.96$16$9.6$40$0.4$8$8$4$32$8

GPT-5.4 FAQ

Should I use GPT-5.4 or a newer GPT model?

For new projects, compare GPT-6.2 Sol first: it is from OpenAI’s newer GPT-6 family and its list prices are lower than GPT-5.4’s. Keep GPT-5.4 where your prompts and evaluations are already validated on it. On APIMart every GPT model uses the same endpoint and API key, so switching only changes the model parameter.

Is the context window 1,050,000 or 922,000 tokens?

OpenAI lists a total context window of 1,050,000 tokens for GPT-5.4, of which up to 922,000 tokens are input and up to 128,000 tokens are output. This page lists max input and max output separately so you can size the material in your request and the expected reply independently.

How is input above 272K tokens billed?

Under OpenAI’s pricing rules, when a request has more than 272,000 input tokens, the whole request is billed at long-context rates: input is 2x and output 1.5x the base price. The table on this page shows the base tier of GPT-5.4 API pricing.

Which reasoning effort levels does GPT-5.4 support?

Five: none, low, medium, high and xhigh, with none as the default, according to OpenAI’s model docs. Without a reasoning_effort parameter, GPT-5.4 answers without extended reasoning, so set medium or higher for hard debugging and analysis.

What is the difference between GPT-5.4, GPT-5.4 mini and GPT-5.4 Pro?

GPT-5.4 is the main model of the family with a 1,050,000-token context window. GPT-5.4 mini and nano are smaller and cheaper, with a 400,000-token context window. GPT-5.4 Pro uses more compute per request for harder problems, costs considerably more and can take minutes to respond.

How can I try this model online?

Click Start chatting or Open Playground to visit the existing APIMart Playground. Select GPT-5.4 in the text category to start exploring.

Which model ID does the GPT-5.4 API use?

Set model to gpt-5.4. Copy the exact ID from the page heading or the integration details panel.

Is it compatible with the OpenAI SDK?

You can keep the OpenAI SDK. Set base_url to https://api.apimart.ai/v1, provide your APIMart API key, and use the model ID on this page.

What is the context window of GPT-5.4?

On APIMart, GPT-5.4 accepts up to 922,000 input tokens per request. Your prompt, earlier messages, and file content all count toward it.

How many tokens can it output at once?

GPT-5.4 can output up to 128,000 tokens in a single reply. Use the max_tokens parameter to set a lower limit.

How much does the GPT-5.4 API cost?

The GPT-5.4 API on APIMart is billed by token, and prices depend on your membership tier. Gold: $2 per million input tokens and $12 per million output tokens. Diamond: $1.8 per million input tokens and $10.8 per million output tokens. Prices may change; the pricing page has the current rates.

Does it support streaming?

Yes. The general chat endpoint streams over SSE by default. Set stream to false to receive the complete response at once.

How do I get an API key?

Sign in to APIMart and create a key on the API Keys page, then send it in the Authorization: Bearer header. The same key also works for other models on the platform.