APIMart
Back to all models

GPT-5.4 mini API

OpenAIModel ID gpt-5.4-miniText modelReleased March 17, 2026

Use GPT-5.4 mini to review a small pull request, pull fields out of support tickets, or run as the subagent that searches files while a larger model plans.

Max input
272,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 mini 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 mini.

Try GPT-5.4 mini with your own material

Reviewing small pull requests

Send GPT-5.4 mini a diff and ask for bugs, missing tests and unclear names. Keep the final approval with a human reviewer.

Example: What is wrong with this diff?

Material

Diff
- if (items.length > 0) { + if (items.length > 1) { applyDiscount(items);

PromptReview the diff and list bugs or missing tests, most important first.

Sample answer · written by hand to show the reasoning

The condition changed from > 0 to > 1, so a cart with exactly one item no longer gets the discount. If that is intended, it needs a test for the one-item case and a note in the PR description; if not, revert the condition.

About the GPT-5.4 mini API

  • A mini model for coding and subagents

    OpenAI calls GPT-5.4 mini its strongest mini model yet for coding, computer use and subagents, at a fraction of GPT-5.4’s price.

  • 400K context, 128K output

    The context window is 400,000 tokens, with up to 272,000 tokens of input and 128,000 tokens of output. It accepts text and images.

  • 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 mini API key and access

    You don’t need a separate GPT-5.4 mini 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-mini; GPT-5.4 mini API pricing is in the table on this page.

How to call the GPT-5.4 mini API

To call GPT-5.4 mini, 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-mini",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

GPT-5.4 mini access details

Model IDgpt-5.4-mini
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 mini API request parameters

GPT-5.4 mini 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-mini 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 mini API pricing

The GPT-5.4 mini 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
Input6Credits~$0.65.7Credits~$0.575.4Credits~$0.547.5Credits~$0.7520%
Cached input0.6Credits~$0.060.57Credits~$0.0570.54Credits~$0.0540.75Credits~$0.07520%
Output36Credits~$3.634.2Credits~$3.4232.4Credits~$3.2445Credits~$4.520%

Prices are for reference only. View full pricing

Why call GPT-5.4 mini API through APIMart

  • 20% below official pricing

    GPT-5.4 mini 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.06 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    GPT-5.4 mini, 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 mini 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 mini API key works for every model in the table; just change the model parameter.

Differences between OpenAI models
ComparisonGPT-5.4 mini CurrentGPT-5.3-CodexGPT-5.4GPT-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 subagents, 400K context, Text and image inputAgentic coding, Deprecated, Responses APICoding and professional work, 1.05M 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 input272,000 tokens272,000 tokens922,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$0.6$1.4$2$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$3.6$11.2$12$1$144$24$0.96$16$9.6$40$0.4$8$8$4$32$8

GPT-5.4 mini FAQ

Should I use GPT-5.4 mini or GPT-5.4?

Start with GPT-5.4 mini for well-defined, high-volume tasks such as code review comments, extraction and subagent work: its list prices are much lower. Move to GPT-5.4 when you need more than 272,000 input tokens or the answers are not good enough on your evaluations. Both use the same APIMart endpoint and API key: the gpt-5.4-mini API and the gpt-5.4 API differ only in the model parameter.

Is the context window 400,000 or 272,000 tokens?

OpenAI lists a total context window of 400,000 tokens for GPT-5.4 mini, of which up to 272,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 request and the expected reply independently.

Which reasoning effort levels does GPT-5.4 mini support?

Five: none, low, medium, high and xhigh, with none as the default, according to OpenAI’s model docs. For extraction and classification, none or low is usually enough; raise it for multi-step coding tasks.

Is GPT-5.4 mini still the cheapest small GPT model?

No. OpenAI’s newer GPT-6 Luna has lower list prices than GPT-5.4 mini, and GPT-5.4 nano is cheaper but already deprecated. Compare GPT-5.4 mini and GPT-6 Luna on your own requests; on APIMart you only change the model parameter.

How can I try this model online?

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

Which model ID does the GPT-5.4 mini API use?

Set model to gpt-5.4-mini. 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 mini?

On APIMart, GPT-5.4 mini accepts up to 272,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 mini 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 mini API cost?

The GPT-5.4 mini API on APIMart is billed by token, and prices depend on your membership tier. Gold: $0.6 per million input tokens and $3.6 per million output tokens. Diamond: $0.54 per million input tokens and $3.24 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.