We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
OpenAI: GPT-5.4 Image 2
openai/gpt-5.4-image-2Try OpenAI: GPT-5.4 Image 2 now
Runs on your balance at the prices above. New accounts start with free usage.
Settings
OpenAI: GPT-5.4 Image 2 at a glance
- Input price is 60% higher than the median of 21 Image models.
- Context window of 272,000 tokens, enough for long documents and multi-turn conversations.
- Supports structured JSON output with a schema.
- Supports reasoning effort control.
About OpenAI: GPT-5.4 Image 2
OpenAI: GPT-5.4 Image 2 is an image model from OpenAI that also handles text. It sits in both the image and text categories, combining the GPT-5.4 model with image generation capabilities from GPT Image 2. The provider released it on 2026-04-21. For a developer, the important framing is that this is not a text-only model with an image endpoint bolted on; it is built for multimodal work where reasoning, coding and image generation happen in the same workflow.
On the input side the model accepts images, text and files. On the output side it returns images and text, so a single call can produce a generated image alongside written content. The context window is 272,000 tokens and the maximum output is 128,000 tokens. Image generation is configurable rather than fixed: aspect_ratio accepts 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9 or auto; quality accepts auto, low, medium or high; background accepts auto or opaque; n ranges from 1 to 10 images; input_references ranges from 0 to 16; and output_compression ranges from 0 to 100.
Those capabilities point to a fairly specific set of use cases. Because the model takes image, text and file inputs and can return both images and text, it suits workflows that mix analysis with generation: reading reference material and producing new visuals from it, iterating on a design across several inputs, or generating a batch of images in one call with n set above 1. The input_references range of up to 16 makes it practical to condition output on a larger set of supplied images rather than a single example. The aspect_ratio and quality controls let you match output to a target format, such as 16:9 for wide layouts or 9:16 for vertical ones, without post-processing. Text output in the same response is useful when you want an explanation, caption or code alongside the image.
You call the model through api14's OpenAI-compatible API using the model id "openai/gpt-5.4-image-2". Because the interface is OpenAI-compatible, existing OpenAI client libraries and request shapes work with a change of base URL and model id. The supported parameters are include_reasoning, logprobs, max_tokens, reasoning, reasoning_effort, response_format, seed, structured_outputs, top_logprobs and verbosity. The reasoning and verbosity controls let you trade depth against brevity, seed supports reproducible sampling, and structured_outputs and response_format help when you need the text portion in a predictable shape. The image-specific options (aspect_ratio, quality, background, n, input_references, output_compression) are passed as part of the request.
There is no stated restriction in the facts above, but the parameter list is worth reading as a signal about fit. If your task is pure text generation with no image output, the image parameters and the image output modality add surface area you will not use, and a text-only model may be simpler to reason about. If you need more than 16 input references, more than 10 images per call, or aspect ratios outside the listed set, this model's documented ranges will not cover it. Within those bounds, it is aimed at developers who want generation and reasoning in one request rather than chaining separate models.
How to call the OpenAI: GPT-5.4 Image 2 API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "openai/gpt-5.4-image-2".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.images.generate({
"model": "openai/gpt-5.4-image-2",
"prompt": "A minimalist product photo of a ceramic mug on a wooden table",
"n": 1,
"aspect_ratio": "1:1"
});
import { writeFile } from "node:fs/promises";
await writeFile("image.png", Buffer.from(result.data[0].b64_json, "base64"));
Supported parameters
include_reasoninglogprobsmax_tokensreasoningreasoning_effortresponse_formatseedstructured_outputstop_logprobsverbositySpecifications
- Context length
- 272,000
- Max output
- 128,000
- Input
- image, text, file
- Output
- image, text
Requests on api14 · last 7 days
OpenAI: GPT-5.4 Image 2: frequently asked questions
- How much does the OpenAI: GPT-5.4 Image 2 API cost?
- OpenAI: GPT-5.4 Image 2 costs Input $28.00 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of OpenAI: GPT-5.4 Image 2?
- OpenAI: GPT-5.4 Image 2 reads up to 272,000 tokens per request: prompt, history and documents together. It writes up to 128,000 output tokens per response.
- What can OpenAI: GPT-5.4 Image 2 do?
- OpenAI: GPT-5.4 Image 2 accepts image, text, file and returns image, text. It supports structured JSON output, reasoning effort control.
- How do I call OpenAI: GPT-5.4 Image 2 from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-5.4-image-2". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to OpenAI: GPT-5.4 Image 2?
- Comparable Image models at a similar price: Microsoft AI: MAI-Image-2.6 Flash, OpenAI: GPT Image 1, OpenAI: GPT-5 Image. Each runs through the same API key, so switching is one string.
OpenAI: GPT-5.4 Image 2 community
New topicThis community has no topics yet. Open the first one about OpenAI: GPT-5.4 Image 2.