When I use the OpenAI-compatible mode to edit images(image to image), the quality parameter doesn’t seem to work?
According to OpenAI’s parameter description:
quality
string or null
Optional
Defaults to auto
The quality of the image that will be generated. high, medium and low are only supported for gpt-image-1. dall-e-2 only supports standard quality. Defaults to auto.
But even if I pass in high, the generated image size doesn’t seem to change much
What are the ways to set the quality of generated images through OpenAI’s compatibility mode?
Hii @stillmoon
Welcome to the Google AI Forum!!
Could you please let me know which model you are using?
model isgemini-3-pro-image-preview
use /images/edits
Because I wanted a 16:9 4K quality image output, I tried the following parameters.
-F 'size=7282x4096' \
-F 'quality=high'
Hii,
Could you please try with resolution size of 4096×2304 instead of 7282×4096 because 7282×4096 exceeds the standard 4K size?
1 Like
Many thanks! After replacing with 4096×2304, the output image size significantly increased, going from around 500K to approximately 1400K.
Then I noticed that the quality=high parameter seems to have no effect—whether I include this parameter or not, the output image size remains almost the same.
Additionally, could you let me know how to correctly replace the native aspectRatio and imageSize parameters with OpenAI’s size?
Hello,
aspectRatio - 16:9
imageSize: 4096x2304
For a more detailed explanation, please refer to this following document.
OpenAI compatibility
Image Configuration
Thanks!
In fact, the ‘aspectRatio’ and ‘imageSize’ I mentioned refer to Image Configuration document.
For example:
aspectRatio - 16:9
imageSize - 2K
What should the corresponding openAI interface call parameter size (format: width x high) be? Is there a corresponding table? I couldn’t find any relevant explanations in the document.
Hello,
Please refer to this Aspect ratios and image size document for clarification. It provides the full mapping between aspect ratios, resolution labels (such as 2K), and the exact pixel dimensions required for the image size field.
1 Like