I’m using gemini-3.1-flash-image-preview with the following configuration:
const response = await genAI.models.generateContent({
model: "gemini-3.1-flash-image-preview",
contents: parts,
config: {
responseModalities: ["TEXT", "IMAGE"],
imageConfig: {
aspectRatio: "16:9",
imageSize: "512px",
},
},
});
However, regardless of setting imageSize: "512px" (0.5K), the generated images are always returned in approximately 1K resolution.
Questions
-
Is
imageSizecurrently supported ingemini-3.1-flash-image-preview? -
Is
"512px"a valid value, or is a different format required? (I also tried “0.5K”) -
Is this a known issue or intentional behavior (e.g., minimum resolution enforced)?
-
Is there any workaround to force lower-resolution output?
Would appreciate clarification from the team or anyone who has encountered this.
Thanks.