Skip to content

Gemini image generation

The gemini engine exposes Gemini 2.5 Flash Image — the same underlying model product as Google's nano-banana-* variants, but via the direct Gemini API rather than Vertex AI. Simpler input shape: no aspect-ratio or resolution picker, just prompt (+ optional reference images for edits) and a quantity. Uses operation as the discriminator, mirroring most other imageGen engines.

Gemini vs Google

If you want explicit aspect-ratio control, resolution tiers, or web-search grounding, use the google engine with model: "nano-banana-2" — same product, richer controls. Pick gemini when you want the minimal shape and the direct Gemini-API semantics.

Prerequisites

Text-to-image (createImage)

http
POST https://orchestration.civitai.com/v2/consumer/workflows?wait=60
Authorization: Bearer <your-token>
Content-Type: application/json

{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "gemini",
      "model": "2.5-flash",
      "operation": "createImage",
      "prompt": "A photorealistic portrait of a woman with flowers in her hair, golden hour lighting",
      "quantity": 1
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Image editing (editImage)

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "gemini",
      "model": "2.5-flash",
      "operation": "editImage",
      "prompt": "Make it a winter scene with snow falling",
      "images": [
        "https://image.civitai.com/.../source.jpeg"
      ]
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Pass 1–4 reference images in images[] — the prompt is treated as an edit instruction applied across them.

Parameters

FieldRequiredDefaultNotes
modelOnly 2.5-flash exposed today.
operationcreateImage or editImage.
promptNatural-language. No explicit cap documented; keep it reasonable.
quantity114.
images[]✅ on editImage1–4 entries. URLs, data URLs, or Base64.

No aspect-ratio control, no resolution tier, no seed, no safety toggle. If you need any of those, switch to the google engine with nano-banana-2.

Reading the result

Standard imageGen output — an images[] array, one per quantity:

json
{
  "status": "succeeded",
  "steps": [{
    "name": "0",
    "$type": "imageGen",
    "status": "succeeded",
    "output": {
      "images": [
        { "id": "blob_...", "url": "https://.../signed.png" }
      ]
    }
  }]
}

Blob URLs are signed and expire — refetch the workflow or call GetBlob for a fresh URL.

Runtime

Typical wall time 8–20 s per image including queue. wait=60 is comfortable for quantity: 12; larger batches or busy periods warrant wait=0 + polling.

Cost

Billed in Buzz on the workflow's transactions. Use whatif=true for an exact preview; see Payments (Buzz) for currency selection.

Flat per-image:

total = 60 × quantity
ShapeBuzz
createImage, quantity: 1~60
editImage with 1 reference~60
createImage, quantity: 4~240

Gemini 2.5 Flash's price doesn't depend on resolution (there's no resolution field) or the number of reference images. If you need the same product with tiered resolution pricing, the google engine's nano-banana-2 is materially cheaper at 1K (~104 Buzz) and has a tiered scale for 2K / 4K.

Troubleshooting

SymptomLikely causeFix
400 with unknown property aspectRatio / resolutionThose fields live on the google engine, not geminiSwitch engines, or drop the field.
400 with "images minItems" on editImageEmpty images[]Include at least one source image when operation: "editImage".
400 with "images maxItems"More than 4 source imagesTrim to 4 — google/nano-banana-2 accepts up to 10 if you need more.
Output doesn't look editedPrompt described target state rather than the changePhrase as an instruction ("Make it a winter scene") rather than a description of the result.
Request timed out (wait expired)Busy Gemini API queueResubmit with wait=0 and poll.
Step failed, reason = "blocked"Google's content filterDon't retry the same input — see Errors & retries → Step-level failures.

Civitai Developer Documentation