OpenAI: GPT-5.4 Image 2: AI model
GPT-5.4 Image 2 is an OpenAI image-generation model that turns text and reference images into new visuals. Served asynchronously from inside Iran through Hormouz.
- Context window:
- 272,000 tokens
- Input:
- $8/1M tokens
- Output:
- $15/1M tokens
- Type:
- text, image
- Vision
- Streaming
- Long context
Thinking levels: xhigh · high · medium · low · none
GPT-5.4 Image 2 is a multimodal model that pairs GPT-5.4 reasoning with high-fidelity image generation. GPT-5.4 Image 2 combines GPT-5.4's reasoning with the image-generation capabilities of GPT Image 2. It accepts text and image input and returns generated images, so a single interaction can move between reasoning, coding and visual generation. It supports a context window of up to 272K tokens.
GPT-5.4 Image 2 accepts text and image input and returns generated images. It is served through Hormouz behind an asynchronous predictions API. Submit a request, then poll until it is ready. Point your base URL at Hormouz and use a Hormouz key to call it from your existing code.
Pricing is usage-based at $8/M in · $15/M out · $30/M image-output tokens. Hormouz provides stable access to the model from inside Iran, with no foreign credit card or circumvention tooling required.
GPT-5.4 Image 2 combines OpenAI's GPT-5.4 model with state-of-the-art image generation capabilities from GPT Image 2. It enables rich multimodal workflows, allowing users to seamlessly move between reasoning, coding, and...
Quickstart
# The image comes back as a data: URI on message.images, not as text.
URL=$(curl -s https://api.hormouz.net/v1/chat/completions \
-H "Authorization: Bearer ng-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-image-2",
"modalities": ["image", "text"],
"messages": [{"role": "user", "content": "A red apple on a wooden table"}]
}' | jq -r '.choices[0].message.images[0].image_url.url')
# Take the extension from the URI itself — this model may answer png or jpeg.
EXT=$(printf '%s' "$URL" | sed -n 's|^data:image/\([a-z]*\);.*|\1|p')
printf '%s' "$URL" | sed 's/^data:[^,]*,//' | base64 -d > "output.${EXT:-png}"Specs
| Vendor | OpenAI |
|---|---|
| Type | Text, Image |
| Context window | 272,000 tokens |
| Pricing | $8.00/M in · $15.00/M out |
| API | Chat Completions |
| Capabilities | Streaming · Vision |
Code example
# The image comes back as a data: URI on message.images, not as text.
URL=$(curl -s https://api.hormouz.net/v1/chat/completions \
-H "Authorization: Bearer ng-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-image-2",
"modalities": ["image", "text"],
"messages": [{"role": "user", "content": "A red apple on a wooden table"}]
}' | jq -r '.choices[0].message.images[0].image_url.url')
# Take the extension from the URI itself — this model may answer png or jpeg.
EXT=$(printf '%s' "$URL" | sed -n 's|^data:image/\([a-z]*\);.*|\1|p')
printf '%s' "$URL" | sed 's/^data:[^,]*,//' | base64 -d > "output.${EXT:-png}"import base64
from openai import OpenAI
client = OpenAI(api_key="ng-YOUR_API_KEY", base_url="https://api.hormouz.net/v1")
response = client.chat.completions.create(
model="openai/gpt-5.4-image-2",
messages=[{"role": "user", "content": "A red apple on a wooden table"}],
modalities=["image", "text"],
)
# message.content is None on an image reply — the picture is in message.images.
for i, img in enumerate(response.choices[0].message.images or []):
header, b64 = img["image_url"]["url"].split(",", 1)
ext = "png" if "image/png" in header else "jpg"
with open(f"output_{i}.{ext}", "wb") as f:
f.write(base64.b64decode(b64))import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({ apiKey: "ng-YOUR_API_KEY", baseURL: "https://api.hormouz.net/v1" });
const response = await client.chat.completions.create({
model: "openai/gpt-5.4-image-2",
messages: [{ role: "user", content: "A red apple on a wooden table" }],
modalities: ["image", "text"],
});
// message.content is null on an image reply — the picture is in message.images.
(response.choices[0].message.images ?? []).forEach((img, i) => {
const url = img.image_url.url;
const ext = url.startsWith("data:image/png") ? "png" : "jpg";
fs.writeFileSync(`output_${i}.${ext}`, Buffer.from(url.slice(url.indexOf(",") + 1), "base64"));
});Buy the OpenAI: GPT-5.4 Image 2 API, paid in rial
- Buy credit with an Iranian bank card; no foreign card or account needed.
- One Hormouz key reaches OpenAI: GPT-5.4 Image 2 and 600+ other models, and you pay only for what you use.
- No VPN and no risk of a banned account; just change the base URL to api.hormouz.net/v1.
Use via Hormouz
Connect to this model and 600+ others with one API key, then see usage down to each request.
Request company accessFAQ
- How much does GPT-5.4 Image 2 cost?
- Billing is usage-based at $8/M in · $15/M out · $30/M image-output tokens. There is no fixed monthly fee. You pay only for what you use, and current rates are shown in the Hormouz dashboard.
- How do I access GPT-5.4 Image 2 from inside Iran?
- Create an account on Hormouz and generate an API key. Hormouz provides a stable path to GPT-5.4 Image 2 from inside Iran, with no foreign credit card or circumvention tooling required.
- How do I call GPT-5.4 Image 2?
- GPT-5.4 Image 2 runs on an asynchronous predictions API: you submit a prediction with your prompt, then poll until the image is ready. Point your base URL at Hormouz and use a Hormouz key.
- What can GPT-5.4 Image 2 do?
- GPT-5.4 Image 2 accepts text and image input and returns generated images. GPT-5.4 Image 2 combines GPT-5.4's reasoning with the image-generation capabilities of GPT Image 2. It accepts text and image input and returns generated images, so a single interaction can move between reasoning, coding and visual generation.
- What is GPT-5.4 Image 2 good for?
- GPT-5.4 Image 2 works well for product visuals, marketing creative, illustration and reasoning-guided image generation and editing.
Updated 2026-10-13