Repository navigation
Description
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/modelsfor 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:
2048x20482048x11523840x2160(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:
- Supporting exact
size, e.g.:
{
"model": "openai/gpt-image-2",
"prompt": "...",
"size": "3840x2160",
"quality": "high"
}- Optionally supporting OpenRouter's normalized resolution form where it maps cleanly:
{
"model": "openai/gpt-image-2",
"prompt": "...",
"resolution": "4K",
"aspect_ratio": "16:9"
}- Advertising the capability in
/api/v1/images/modelsand 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
- OpenAI GPT Image 2 image-generation guide: https://developers.openai.com/api/docs/guides/image-generation
- OpenRouter image-generation docs: https://openrouter.ai/docs/guides/overview/multimodal/image-generation
- OpenRouter image model capabilities: https://openrouter.ai/api/v1/images/models
Activity