Skip to content

GPT Image 2: expose size / resolution for 4K and custom output dimensions #262

Description

@nk-weezly

Summary

OpenAI's upstream gpt-image-2 API supports flexible output dimensions via the size parameter, including documented 4K sizes such as 3840x2160 and 2160x3840.

OpenRouter's dedicated Images API also has normalized resolution and explicit size parameters in the API design. However, the current capability descriptor for openai/gpt-image-2 does not advertise either resolution or size, so there is currently no documented/supported way to request the upstream model's 4K or custom-size output through OpenRouter.

Current behavior / capability descriptor

The current entry from:

curl https://openrouter.ai/api/v1/images/models

for openai/gpt-image-2 advertises parameters including:

aspect_ratio
quality
background
n
input_references
output_compression

but not resolution or size.

OpenRouter's image-generation docs state that an absent key in supported_parameters means the parameter is unsupported by that endpoint.

Upstream capability

OpenAI documents that gpt-image-2 accepts any size satisfying its constraints, with popular sizes including:

  • 2048x2048
  • 2048x1152
  • 3840x2160 (4K landscape)
  • 2160x3840 (4K portrait)

OpenAI currently marks outputs above 2560x1440 total-pixel territory as experimental, but they are supported by the API.

Requested behavior

Please expose the upstream GPT Image 2 sizing capability through OpenRouter's Images API, ideally by:

  1. Supporting exact size, e.g.:
{
  "model": "openai/gpt-image-2",
  "prompt": "...",
  "size": "3840x2160",
  "quality": "high"
}
  1. Optionally supporting OpenRouter's normalized resolution form where it maps cleanly:
{
  "model": "openai/gpt-image-2",
  "prompt": "...",
  "resolution": "4K",
  "aspect_ratio": "16:9"
}
  1. Advertising the capability in /api/v1/images/models and the per-endpoint capability descriptor.

Exact size support would be especially useful because GPT Image 2 supports arbitrary dimensions within the upstream constraints, rather than only fixed 1K/2K/4K presets.

Why this matters

At the moment, applications that need native GPT Image 2 4K/custom-size output have to bypass OpenRouter and call OpenAI directly, even though OpenRouter already exposes a dedicated Images API with size / resolution abstractions.

Exposing the upstream sizing controls would bring the OpenRouter adapter much closer to feature parity with the native GPT Image 2 API.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions