Environment:
-
Python SDK: google-genai ^1.52.0
-
Endpoint: generativelanguage.googleapis.com/v1beta
-
Model: gemini-3-pro-image-preview
Issue:
All image generation requests (both text-to-image and image editing with reference images) to gemini-3-pro-image-preview started returning 400 INVALID_ARGUMENT around 11:10 UTC on February 13, 2026. Before that, requests were working (last successful at 08:04 UTC, same parameters).
Error:
{"error": {"code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT"}}
What we’ve confirmed:
-
The same raw request via curl to the REST API succeeds (with responseModalities: [“TEXT”, “IMAGE”] and imageConfig: {aspectRatio: “16:9”, imageSize: “2K”})
-
The Python SDK (google-genai) with the same parameters returns 400
-
No code changes between working and broken states
-
Affects ALL requests: text-to-image (no images), image editing (2-5 reference images)
-
Same API key, same parameters, same prompts that worked at 08:04 UTC
Request config (Python SDK):
config = types.GenerateContentConfig(
response_modalities=["TEXT", "IMAGE"],
image_config=types.ImageConfig(
aspect_ratio="16:9",
image_size="2K"
)
)
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=prompt,
config=config
)
Question:
Since the raw REST API works but the Python SDK doesn’t, is the SDK injecting additional parameters (e.g., thinking config) that are incompatible with image generation models? Was there a server-side change around 11:00 UTC today that tightened parameter validation?