Skip to main content

Image model

GPT-5.4 Image 2

openai/gpt-5.4-image-2

openai/gpt-5.4-image-2 is an image generation model from OpenAI you can call on the OceanToken API, with a 272K-token context window and up to 128K output tokens; it supports reasoning, image input.

Price card, similar models and questions answered: GPT-5.4 Image 2 on oceantoken.ai.

At a glance

Model IDopenai/gpt-5.4-image-2
TypeImage
PublisherOpenAI
Context window272,000 tokens
Max output128,000 tokens
PriceOn oceantoken.ai
Endpoint/v1/images/generations, /v1/images/edits
API shapeOpenAI-compatible
In the catalog since2026-04-21

API

POST /v1/images/generations (also /v1/images/edits). Base URL https://api.oceantoken.ai, your OceanToken key as the bearer token. The OpenAI SDKs work unchanged; see the Quickstart.

Download this spec (JSON) · llms.txt for AI assistants

Basic

curl https://api.oceantoken.ai/v1/images/generations \
-H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.4-image-2",
"prompt": "A lighthouse at dawn, watercolor",
"size": "1:1"
}'

Request parameters

Only what this model takes. Anything else in the request is left out before it reaches the model.

ParameterTypeDescription
model
required
stringThis model's ID.
prompt
required
stringWhat to draw.
sizestring
1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9, 4:5, 5:4
Aspect ratio. Width x height such as 1024x1024 is accepted too and mapped to its ratio.
qualitystring
low, medium, high
Quality level; lower is faster and cheaper.
ninteger
1 to 10
default 1
How many images.
imagesarray
up to 16 items
Up to 16 reference images to start from or draw on, each a public https:// URL or a data URL. The request is then an edit.

Response

FieldTypeDescription
createdintegerUnix time.
data[].urlstringThe image. Download it within 24 hours.
Example response
{
"created": 1792000000,
"data": [
{
"url": "https://..."
}
]
}

More examples and how errors and billing work: Images.

Compared with similar models

Image models on OceanToken in the same price range as openai/gpt-5.4-image-2. Compare their prices on oceantoken.ai.

ModelPublisherContext
GPT-5.4 Image 2
openai/gpt-5.4-image-2
OpenAI272,000
Mai Image 2.6
microsoft/mai-image-2.6
Microsoft—
Mai Image 2.6 Flash
microsoft/mai-image-2.6-flash
Microsoft—
Gemini 3 Pro Image
google/gemini-3-pro-image
Google131K

More from OpenAI

All OpenAI models on OceanToken

Use it

Create an account Price on oceantoken.ai

The facts on this page were read from the live OceanToken catalog on 2026-12-02 (UTC), when the documentation was built. Prices are published on oceantoken.ai.