Skip to main content
Base URL: https://platform.runblob.io

POST /v1/gemini/generate

Creates an image generation task from text description using Nano Banana (Gemini Image Generation).

Available Models

ModelValueQuality OptionsMax ImagesDescription
Standardstandardstandard only4Fast generation with Gemini 2.5 Flash
Proprostandard, 2k, 4k8High quality with Gemini 3.0 Pro
Nano Banana 2v2standard, 2k, 4k8Next-gen with Gemini 3.1 Flash
prompt
string
required
Text description of the image (1-4000 characters)
model
string
default:"standard"
Model version: "standard", "pro", or "v2"
quality
string
default:"standard"
Image quality (for pro and v2 models): "standard", "2k", or "4k"
aspect_ratio
string
default:"auto"
Image aspect ratio. Options:
  • "auto" - automatic
  • Landscape: "21:9", "16:9", "4:3", "3:2"
  • Square: "1:1"
  • Portrait: "9:16", "3:4", "2:3"
  • Flexible: "5:4", "4:5"
temperature
number
default:"0.7"
Creativity level from 0 to 1. Higher values = more creative results.
images
array
Array of input images (base64 or URLs) for image editing/transformation. Up to 4 for standard, up to 8 for pro and v2.
callback_url
string
Webhook URL for completion notifications
curl -X POST https://platform.runblob.io/v1/gemini/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cute orange cat sitting on a windowsill, golden hour lighting",
    "model": "standard",
    "aspect_ratio": "16:9"
  }'

Response

{
  "task_uuid": "ffd473d5-5bef-4e14-bf22-8d559be3c19f",
  "status": "pending",
  "price": "0.0200"
}
task_uuid
string
UUID of the generation task for status checking
status
string
Initial status, always "pending"
price
string
Amount charged in USD
Image generation typically takes 7-30 seconds. Use the task_uuid to check status or set up webhooks for notifications.
quality parameter (2k, 4k) is only available for the pro and v2 models. Using it with standard model will result in an error.

Input Images

You can provide input images for image editing or transformation. Limit: 4 images for standard, 8 images for pro and v2.
  • Base64: "data:image/jpeg;base64,/9j/4AAQ..."
  • URL: "https://example.com/image.jpg"
  • Max size: 20 MB per image
  • Formats: JPEG, PNG, WEBP
{
  "prompt": "Combine these images into a collage",
  "images": [
    "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
    "https://example.com/image2.jpg",
    "data:image/png;base64,iVBORw0KGgo..."
  ]
}