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).
prompt
string
required
Text description of the image (1-4000 characters)
model
string
default:"standard"
Model version: "standard" or "pro"
quality
string
default:"standard"
Image quality (only for pro model): "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 up to 4 input images (base64 or URLs) for image editing/transformation
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 model. Using it with standard model will result in an error.

Input Images

You can provide up to 4 input images for image editing or transformation:
  • 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..."
  ]
}