Skip to content

Commit 81c027c

Browse files
matthew29tangcopybara-github
authored andcommitted
feat: Add image_size to ImageConfig (Early Access Program)
PiperOrigin-RevId: 828623565
1 parent 5135c4d commit 81c027c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

google/genai/types.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4238,6 +4238,12 @@ class ImageConfig(_common.BaseModel):
42384238
description="""Aspect ratio of the generated images. Supported values are
42394239
"1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9".""",
42404240
)
4241+
image_size: Optional[str] = Field(
4242+
default=None,
4243+
description="""Optional. Specifies the size of generated images. Supported
4244+
values are `1K`, `2K`, `4K`. If not specified, the model will use default
4245+
value `1K`.""",
4246+
)
42414247

42424248

42434249
class ImageConfigDict(TypedDict, total=False):
@@ -4247,6 +4253,11 @@ class ImageConfigDict(TypedDict, total=False):
42474253
"""Aspect ratio of the generated images. Supported values are
42484254
"1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9"."""
42494255

4256+
image_size: Optional[str]
4257+
"""Optional. Specifies the size of generated images. Supported
4258+
values are `1K`, `2K`, `4K`. If not specified, the model will use default
4259+
value `1K`."""
4260+
42504261

42514262
ImageConfigOrDict = Union[ImageConfig, ImageConfigDict]
42524263

0 commit comments

Comments
 (0)