Skip to main content

Gemini Image Editing

POST /v1beta/models/{model}:generateContent
As of March 23, 2026, a minimal production check against native Gemini image editing on Crazyrouter showed:
  • gemini-3.1-flash-image-preview returned 500
  • gemini-2.5-flash-image-preview returned 500
  • gemini-2.5-flash-image returned 524
The observed 500 error was:
  • code: "get_channel_failed"
  • message: model temporarily unavailable, please try again later
That means the native Gemini generateContent path for “send an input image and get an edited image back” should not currently be documented as a stable success workflow on Crazyrouter production.
Until this path is revalidated successfully, do not depend on native Gemini image editing for production automation.
If your goal is stable customer-facing image editing rather than the native Gemini protocol itself, start with the Nano Banana family pages: Nano Banana, Nano Banana Pro, and Nano Banana 2. Their current public contract is narrowed to URL input through image_input.

Current Recommendation

  1. If your goal is Gemini text-to-image, use Gemini Image Generation
  2. If your goal is stable customer-facing image editing, use Nano Banana, Nano Banana Pro, or Nano Banana 2
  3. If you must evaluate native Gemini image editing, run a same-day production retest with a minimal input image first
  4. If you receive 500 get_channel_failed or 524, stop there and wait for channel recovery before scaling traffic

Retest Template

This is the minimal request template used for retesting. It shows how to recheck the path, not a currently stable success example:
curl "https://crazyrouter.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {"text": "Edit this image: change the background to blue and keep the main square visible. Return image output."},
          {
            "inlineData": {
              "mimeType": "image/png",
              "data": "iVBORw0KGgoAAA..."
            }
          }
        ]
      }
    ],
    "generationConfig": {
      "responseModalities": ["IMAGE"]
    }
  }'