Skip to content

Google image generation

Routes to Google's image-generation APIs (Vertex AI / Gemini API). Three models, selected via the model field:

modelAlso known asNotes
nano-banana-2Gemini 2.5 Flash Image, next-genDefault — text-to-image + image-editing via images[], high-resolution tier (up to 4K), optional web/Google search grounding.
nano-banana-proGemini 2.5 Pro ImageSame shape as nano-banana-2 for most purposes; pro tier for premium output.
imagen4Imagen 4Google's dedicated image model (not Gemini-based). Natural-language + negative prompt, fewer aspect ratios, 1K only.

Default choice for new integrations: model: "nano-banana-2". It's fast, capable, supports editing via images[], and has the widest aspect-ratio and resolution range. Step up to nano-banana-pro for hero-shot quality; reach for imagen4 when you specifically want Google's older Imagen family semantics (negative prompts, stricter aspect-ratio set).

Gemini vs Google

The gemini engine (Gemini image generation) exposes the same Gemini 2.5 Flash Image product as model: "2.5-flash" via the direct Gemini API, with a slightly different input shape. Pick based on which API semantics you prefer — this page covers the google engine.

Prerequisites

  • A Civitai orchestration token (Quick start → Prerequisites)
  • For image editing: one or more source image URLs, data URLs, or Base64 strings (Nano Banana only — Imagen 4 is create-only)

nano-banana-2 (default — Gemini 2.5 Flash Image)

Text-to-image

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

{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "google",
      "model": "nano-banana-2",
      "prompt": "A photorealistic portrait of a woman with flowers in her hair, golden hour lighting",
      "aspectRatio": "1:1",
      "resolution": "1K",
      "numImages": 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

Parameters

FieldDefaultAllowedNotes
prompt— ✅≤ 50 000 charsNatural-language, very long prompts permitted.
aspectRatio1:121:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16
resolution1K1K / 2K / 4KMulti-resolution tier — 4K is slower and more expensive.
numImages114Nano Banana uses numImages, not quantity.
images[](none)max 10Passing images[] switches to edit mode. URLs, data URLs, or Base64.
seedrandomint32Pin for reproducibility.
enableWebSearchfalsebooleanLet the model ground its output in fresh web-search results.
enableGoogleSearchfalsebooleanLet the model ground its output in Google Search results — useful for accurate depictions of real places/people/events.

Image editing

Drop one or more source images into images[] and the same endpoint switches to edit mode — no separate operation field:

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "google",
      "model": "nano-banana-2",
      "prompt": "Make it a winter scene with snow falling",
      "aspectRatio": "1:1",
      "resolution": "1K",
      "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

Up to 10 reference images per call. Useful for prompt-driven edits and compositional blends.

With web-search grounding

enableWebSearch / enableGoogleSearch let the model pull fresh factual context into its generation. Handy for depicting real locations, current events, or brands accurately:

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "google",
      "model": "nano-banana-2",
      "prompt": "A realistic photo of the Eiffel Tower at night, with accurate lighting and modern signage",
      "aspectRatio": "16:9",
      "resolution": "2K",
      "enableWebSearch": true
    }
  }]
}
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

nano-banana-pro

Pro-tier version of Nano Banana. Identical input shape minus the search-grounding toggles and seed. Reach for it when you want premium output quality on the same API:

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "google",
      "model": "nano-banana-pro",
      "prompt": "A cinematic scene of a dragon perched on a mountain peak at dawn",
      "aspectRatio": "21:9",
      "resolution": "2K",
      "numImages": 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

Same aspect-ratio / resolution enums, same images[] editing behaviour (up to 10 inputs). Most costly of the three Google models — use for hero shots, not bulk generation.

imagen4

Google's dedicated Imagen 4 model. Different semantics from Nano Banana — supports negativePrompt, stricter aspect-ratio enum, no resolution tiers (implicit 1K), no editing:

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "google",
      "model": "imagen4",
      "prompt": "A majestic fantasy landscape with floating islands, cinematic lighting",
      "negativePrompt": "blurry, low quality",
      "aspectRatio": "16:9",
      "numImages": 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
FieldDefaultAllowedNotes
prompt— ✅≤ 1 000 charsTighter than Nano Banana's 50k.
negativePrompt""≤ 1 000 charsImagen-specific — Nano Banana doesn't accept one.
aspectRatio1:11:1, 16:9, 9:16, 3:4, 4:3Smaller set than Nano Banana.
numImages114
seedrandomint64

No editing. No resolution picker — outputs are always 1K.

Reading the result

All Google models emit the standard imageGen output:

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

Google's API queue is the dominant factor. Typical wall times:

Model / resolutionPer-image wall timewait recommendation
imagen4 (1K)8–20 swait=60 fine
nano-banana-2 (1K)8–20 swait=60 fine
nano-banana-2 (2K / 4K)20–60 swait=60 sometimes; fall back to wait=0
nano-banana-pro (any)20–60 s depending on queuewait=60 sometimes; wait=0 + polling is safer

Enable wait=0 + polling for batches above numImages: 2, 4K output, or Pro tier.

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 pricing by model, resolution, and grounding toggles:

total = base × numImages
ModelBase (per image)Notes
imagen440Fixed; aspect ratio doesn't affect price.
nano-banana-2 (1K)104Default resolution tier.
nano-banana-2 (2K)156
nano-banana-2 (4K)208
nano-banana-pro (1K, text-only)160
nano-banana-pro (1K, with images[])180Image-to-image carries a small premium.
nano-banana-pro (2K, text-only)230
nano-banana-pro (2K, with images[])250
nano-banana-pro (4K, text-only)320
nano-banana-pro (4K, with images[])340

Web-search grounding (Nano Banana 2 only) adds +20 Buzz per image for each flag enabled — enableWebSearch: true and enableGoogleSearch: true stack (so +40 if both on).

Examples:

  • imagen4, numImages: 1~40 Buzz
  • nano-banana-2 1K, numImages: 1~104 Buzz
  • nano-banana-2 1K + web search, numImages: 1~124 Buzz
  • nano-banana-2 4K, numImages: 4 → ~832 Buzz
  • nano-banana-pro 2K text-only, numImages: 1230 Buzz; with images[]250 Buzz

Troubleshooting

SymptomLikely causeFix
400 with unknown property quantitySent quantity instead of numImagesGoogle uses numImages; OpenAI / Flux use quantity. Easy to mix up.
400 with "aspectRatio must be one of" on Imagen 4Passed a Nano Banana–only ratio like 21:9 or 5:4Imagen 4's set is smaller — stick to 1:1, 16:9, 9:16, 3:4, 4:3.
400 with "resolution is not a valid property" on Imagen 4Imagen 4 has no resolution fieldDrop it — Imagen 4 is always 1K.
400 with "images is not a valid property" on Imagen 4Imagen 4 is create-onlySwitch to nano-banana-2 or nano-banana-pro for editing.
400 with "images maxItems"More than 10 reference images on Nano BananaTrim to 10.
Output seems disconnected from reality (wrong year of events, nonexistent place)No search groundingSet enableWebSearch: true (or enableGoogleSearch: true) on nano-banana-2.
Request timed out (wait expired)Large numImages, 4K resolution, or Pro tier on busy 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