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 ​

  • For editImage: 1–4 source images (URLs, data URLs, or Base64)

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
model✅—Only 2.5-flash exposed today.
operation✅—createImage or editImage.
prompt✅—Natural-language. No explicit cap documented; keep it reasonable.
quantity11–4.
images[]✅ on editImage—1–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 entry per quantity (shape and URL expiry).

Runtime ​

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

Cost ​

Preview the exact charge with whatif=true (Payments (Buzz)).

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 costs more at 1K (~104 Buzz) but adds a tiered scale for 2K / 4K.

Troubleshooting ​

Timeouts, moderation blocks and expired blob URLs: see Common troubleshooting. blocked comes from Google's content filter.

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.

Civitai Developer Documentation