Skip to main content
gemini-3.1-flash-image-preview-c is Google’s image generation model, available through Starrise AI via the native Gemini API. It supports text-to-image generation and image editing with reference images.

Key Capabilities

  • Text-to-image — Generate images from text descriptions
  • Image editing — Pass a reference image via inline_data combined with text instructions for editing
  • Aspect ratio control1:1, 4:3, 3:4, 16:9, 9:16
  • Resolution control512 (512px), 1K (~1024px), 2K (~2048px), 4K (~4096px, by longest side)
  • Multimodal output — Return both image and text description via responseModalities: ["TEXT", "IMAGE"]

Text-to-Image Example

curl "https://ai.alad.com/v1beta/models/gemini-3.1-flash-image-preview-c:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          { "text": "Generate an image of a mountain sunset" }
        ]
      }
    ],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {
        "aspectRatio": "16:9",
        "imageSize": "1K"
      }
    }
  }'

Image Editing Example (with Reference Image)

Pass both a text instruction and an inline_data reference image in the same parts array.
# First convert image to base64:
# BASE64=$(base64 -i your_photo.jpg)
#
# Then send the request:
curl "https://ai.alad.com/v1beta/models/gemini-3.1-flash-image-preview-c:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "This is a photo of me, please add an alpaca beside me"
          },
          {
            "inline_data": {
              "mime_type": "image/jpeg",
              "data": "<YOUR_BASE64_ENCODED_IMAGE>"
            }
          }
        ]
      }
    ],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {
        "aspectRatio": "1:1",
        "imageSize": "1K"
      }
    }
  }'

Parameters

ParameterTypeRequiredDescription
keystringYesAPI key (query parameter)
contents[].parts[].textstringYesText prompt or instruction
contents[].parts[].inline_data.mime_typestringNoReference image type: image/jpeg, image/png, image/webp
contents[].parts[].inline_data.datastringNoBase64-encoded reference image data
generationConfig.responseModalitiesarrayYes["IMAGE"] or ["TEXT", "IMAGE"]
generationConfig.imageConfig.aspectRatiostringNo1:1 / 4:3 / 3:4 / 16:9 / 9:16
generationConfig.imageConfig.imageSizestringNo512 / 1K / 2K / 4K (default 1K)

API Reference

View the interactive API Playground for gemini-3.1-flash-image-preview-c.