Image_size param not available for nana-banana-pro

Hello guys, i had a problem with the config for image generation when call api. When i use param “image_size“ in the types.ImageConfig, i ve got this error:

ValidationError: 1 validation error for ImageConfig
image_size
Extra inputs are not permitted [type=extra_forbidden, input_value=‘1K’, input_type=str]
For further information visit https://errors.pydantic.dev/2.12/v/extra_forbidden

As i ve seen in the tutorial, this param is aavailable

Has anyone face this? And how could you fix?

Thank guys!

Hi @leo090804 , Welcome to the AI Forum!!!

Thanks for reaching out to us. I have tested the code from tutorial with image_size parameter and it works fine on my end. Let us know if the issue still persists.

i used image_size=”1K” and it doesnt work

ValidationError: 1 validation error for ImageConfig
image_size
Extra inputs are not permitted [type=extra_forbidden, input_value=‘1K’, input_type=str]
For further information visit Redirecting...

Hi @leo090804 , Thanks for the update. I checked using image_size="1K" and it works on my end. I have attached a screenshot for your reference. There might be some environment or version differences causing the ValidationError on your setup.