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

POST /v1/kling/o3-photo/generate

Creates an image generation task from text description using Kling O3 Photo model.
prompt
string
required
Text description of the image (1-2500 characters)
images_url
array
Array of image URLs for reference-based generation (max 10 images, cannot mix with images_base64)
images_base64
array
Array of base64-encoded images for reference-based generation (max 10 images, cannot mix with images_url)
img_resolution
string
default:"4k"
Image resolution: "1k", "2k", or "4k"
aspect_ratio
string
default:"1:1"
Image aspect ratio. Available options:
  • "1:1" - Square (default)
  • "auto" - Automatic detection
  • "9:16" - Vertical portrait
  • "2:3" - Vertical
  • "3:4" - Vertical
  • "4:3" - Horizontal
  • "3:2" - Horizontal
  • "16:9" - Widescreen
  • "21:9" - Ultra-wide
prefer_multi_shots
boolean
default:"false"
Generate multiple variations in a single image (experimental feature)
callback_url
string
Webhook URL for completion notifications
Image Input Restrictions:
  • Provide either images_url OR images_base64, not both
  • Maximum 10 images total (URLs + base64 combined)
  • Maximum 10 MB per image
  • Supported formats: JPEG, PNG, WEBP
curl -X POST https://platform.runblob.io/v1/kling/o3-photo/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A futuristic city with flying cars, neon lights, cyberpunk style",
    "img_resolution": "4k",
    "aspect_ratio": "16:9"
  }'

Response

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "price": "0.0500"
}
generation_id
string
UUID of the generation task for status checking
status
string
Initial status, always "pending"
price
string
Amount charged in USD (varies by resolution)
Image generation typically takes 1-3 minutes. Use the generation_id to check status or set up webhooks for notifications.Check status: GET /v1/kling/o3-photo/generations/{generation_id}

Generation Features

Use input images for reference-based generation:
  • images_url: Provide URLs of reference images (HTTPS)
  • images_base64: Provide base64-encoded images
  • Maximum 10 images total (URLs + base64 combined)
  • Cannot mix images_url and images_base64 in one request
  • Supports JPEG, PNG, WEBP formats
  • Maximum 10 MB per image
  • AI will use them as visual reference for generation
Choose image quality:
  • 1K: Faster generation, standard quality
  • 2K: Higher detail, recommended for most use cases
  • 4K: Ultra high-definition, best for professional work (default)
9 aspect ratio options:
  • 1:1: Square (default)
  • Auto: Automatically determine best ratio
  • Portrait formats: 9:16, 2:3, 3:4
  • Landscape formats: 4:3, 3:2, 16:9, 21:9
Generate multiple variations in one image:
  • Set prefer_multi_shots: true
  • Creates character sheets, design variations, or multiple angles
  • Best with prompts like “character design sheet”, “product from different angles”
  • Works best with 16:9 or 21:9 aspect ratios

Error Responses

{
  "detail": "Prompt must be between 1 and 2500 characters"
}
Invalid request parameters