diff --git a/litellm/llms/gemini/image_generation/transformation.py b/litellm/llms/gemini/image_generation/transformation.py index 72ba5bcf1e..14c6955772 100644 --- a/litellm/llms/gemini/image_generation/transformation.py +++ b/litellm/llms/gemini/image_generation/transformation.py @@ -190,8 +190,7 @@ class GoogleImageGenConfig(BaseImageGenerationConfig): predictions = response_data.get("predictions", []) for prediction in predictions: # Google AI returns base64 encoded images in the prediction - generated_images = prediction.get("generatedImages", []) - for image_data in generated_images: + for image_data in prediction: model_response.data.append(ImageObject( b64_json=image_data.get("bytesBase64Encoded", None), url=None, # Google AI returns base64, not URLs