Skip to contentx402 is live on Robinhood Chain: agents can now pay for any model, per call, in USDG →
OmniRail
← All models

OpenAI · Language + Image model

GPT-5.4 Image 2

openai/gpt-5.4-image-2
  • Language
  • Image
Released Apr 21, 2026

[GPT-5.4](https://openrouter.ai/openai/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...

As a language model

Specifications

Context window
272,000 tokens
Max output
128,000 tokens
Input
image, text, file
Output
image, text
Reasoning effort
xhigh, high, medium, low, none
Tokenizer
GPT
Moderation
provider-moderated

Supported parameters

Accepted by the model and forwarded as-is by the gateway.

  • frequency_penalty
  • logit_bias
  • logprobs
  • max_tokens
  • presence_penalty
  • reasoning
  • reasoning_effort
  • response_format
  • seed
  • stop
  • structured_outputs
  • top_logprobs

Use it

POST /api/v1/chat/completions · MCP chat · full reference

curl https://omnirail.org/api/v1/chat/completions \
  -H "Authorization: Bearer $OMNIRAIL_KEY" -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-5.4-image-2","messages":[{"role":"user","content":"Hello"}],"max_tokens":300}'

As an image model

Specifications

Input
image, text, file
Output
image, text
Editing
yes, up to 16 reference images
Images per call
1 to 4
Served by
OpenAI

Request options

Validated against these values; anything else returns 400 with the allowed list.

aspect_ratio
1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9, auto
quality
auto, low, medium, high
background
auto, opaque
output_compression
0 to 100

Use it

POST /api/v1/images · /images/edits · MCP generate_image · edit_image · full reference

curl https://omnirail.org/api/v1/images \
  -H "Authorization: Bearer $OMNIRAIL_KEY" -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-5.4-image-2","prompt":"a lighthouse at dawn, 35mm film","aspect_ratio":"1:1"}'