[Bug] gemini-3.1-flash-image-preview: 500 INTERNAL on multi-turn chat with image input (single-turn works fine)

,

Since this morning (April 14, 2026), `gemini-3.1-flash-image-preview` consistently returns `500 INTERNAL` when sending images as input in a multi-turn chat session. Single-turn image generation on the same chat works fine. This was working perfectly for 2+ months prior — nothing changed on our end.

**Error:**

500 INTERNAL. {‘error’: {‘code’: 500, ‘message’: ‘Internal error encountered.’, ‘status’: ‘INTERNAL’}}

**What works:**

- Creating a chat session and generating an image from a text prompt (message 1) → succeeds every time

**What breaks:**

- Sending a second message on the same chat that includes the generated image as input → 500 INTERNAL every time

**Our use case:**

We use multi-turn chat to generate sequential comic panels with visual continuity. Panel 1 is generated from text only. Panels 2+ send the previous panel image back into the chat for style/scene continuity. This has been working reliably since February.

**Minimal reproduction script:**

python

import sys

import io

from PIL import Image

from google import genai

from google.genai import types

api_key = sys.argv[1]

client = genai.Client(api_key=api_key)

chat = client.chats.create(

    model="gemini-3.1-flash-image-preview",

    config=types.GenerateContentConfig(response_modalities=["Image"]),

)

# Message 1 — works

response = chat.send_message("A cozy bar at night with two friends laughing.")

img = None

for part in response.candidates[0].content.parts:

    if part.inline_data:

        img = Image.open(io.BytesIO(part.inline_data.data))

        print(f"Message 1: SUCCESS ({img.size[0]}x{img.size[1]})")

# Message 2 — crashes with 500 INTERNAL

try:

    response = chat.send_message([

        "Previous panel for continuity:",

        img,

        "Same bar. The friends clink their glasses together.",

    ])

    print("Message 2: SUCCESS")

except Exception as e:

    print(f"Message 2: FAILED — {e}")

Test results:

Message Image input? Result
1 No SUCCESS
2 Yes (prev image) 500 INTERNAL
3 No (reset after fail) 500 INTERNAL (chat corrupted)
4 No SUCCESS (recovered)

Environment:

  • Model: gemini-3.1-flash-image-preview

  • SDK: google-genai (Python)

  • Region: EU (Hetzner, Germany)

  • Worked fine until: April 13, 2026

  • Broken since: April 14, 2026 morning (CET)

This appears to be a server-side regression in the multi-turn chat image handling. Single-turn generation, including with the exact same API key and prompts, works without issues.

Same issue here with gemini-3-pro-image-preview (and gemini-3.1-flash-image-preview)
via the API since April 14, 2026. Single-turn generateContent, not chat sessions.

Request pattern: 1-3 reference images (50-400KB JPEG) + text prompt (~2000 chars).
Model=gemini-3-pro-image-preview, imageSize=1K or 4K.

Failure rate today: ~48% (39 failures out of 80 requests in last hours).
Error identical:
{“error”:{“code”:500,“message”:“Internal error encountered.”,“status”:“INTERNAL”}}

Observations:

  • Same request sometimes succeeds after retry — confirms it’s server-side
    transient, not input-related.
  • Requests with 1 ref image fail at similar rate as requests with 3 refs.
  • No pattern by prompt/image content — a request that failed 3 times in a
    row can succeed a minute later.

Was working fine on April 13. Zero changes on our side in the generation
code path.

Any ETA from the team on a fix? Or a stable fallback model we can
temporarily route to while this is being investigated?

Had same issue. It seems it’s working if I use just ONE sample image at the moment.

I am encountering the same issue. For those among you who deploy this model within a professional application, would there be an interest in forming a WhatsApp group to facilitate immediate notification when similar bugs manifest?

We’re encountering the same issue here too. We’‘re using this model for our project in production and our customers are unable to use it for the last 2 hours.
We’re using image generation using multiple images as inputs.
%20 of our requests are resulting with 500 and it seems like there’s no progress or work about this, is this acknowledged and will there be an action plan?

same issue here too - nothing working

It is truly vexing to remain ignorant of the service’s rationale and its current state of operation :confused:

Subject: [Bug] 500 INTERNAL Error when calling gemini-3-pro-image-preview from Vietnam region


1. Error Summary

Field Value
Error Code 500 INTERNAL
Model gemini-3-pro-image-preview
API Method generateContent
Region Vietnam (Southeast Asia)
Reproducibility 100%


2. Full Error Response

json

{
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

4. Environment & Context

Parameter Value
Client Library google-genai (latest version)
Python Version 3.10.12
Timeout Setting 180 seconds
Billing Enabled

pls help me, Any ETA from the team on a fix? Or a stable fallback model we can
temporarily route to while this is being investigated???