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

POST /v1/kling/o1-video/generate

Creates a video generation task from text description or images using Kling O1 Video model.
prompt
string
required
Text description of the video (1-2500 characters)
duration
string
required
Video duration in seconds
  • Text-to-video: "5" or "10"
  • Image-to-video: "3", "4", "5", "6", "7", "8", "9", "10"
aspect_ratio
string
required
Video aspect ratio: "16:9" (landscape), "9:16" (portrait), "1:1" (square)
images_base64
array
Array of base64-encoded images (max 5, JPEG/PNG/WebP)
images_urls
array
Array of image URLs (max 5, alternative to images_base64)
keep_original_sound
boolean
default:"true"
Keep original audio from images
callback_url
string
Webhook URL for completion notifications
Provide either images_base64 OR images_urls, not both. Duration options "3", "4", "6", "7", "8", "9" are only available for image-to-video.
curl -X POST https://platform.runblob.io/v1/kling/o1-video/generate -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
  "prompt": "A cinematic shot of a cat walking in slow motion",
  "duration": "5",
  "aspect_ratio": "16:9"
}'

Response

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "price": "0.30"
}
generation_id
string
UUID of the generation task for status checking
status
string
Initial status, always "pending"
price
string
Amount charged in USD
Video generation typically takes 1-10 minutes. Use the generation_id to check status or set up webhooks for notifications.Check status: GET /v1/kling/o1-video/generations/{generation_id}

Generation Modes

The API supports 2 generation modes:

1. Text-to-Video

Generate video from text prompt only (no images).
  • Duration: "5" or "10" seconds
  • No image parameters required
{
  "prompt": "Epic cinematic scene of a dragon flying",
  "duration": "10",
  "aspect_ratio": "16:9"
}

2. Image-to-Video

Animate up to 5 images with text prompt.
  • Duration: "3", "4", "5", "6", "7", "8", "9", "10" seconds
  • Formats: JPEG, PNG, WEBP
  • Max size: 10 MB per image
  • Max images: 5
{
  "prompt": "Bring these photos to life with smooth animation",
  "images_urls": [
    "https://example.com/photo1.jpg",
    "https://example.com/photo2.jpg"
  ],
  "duration": "8",
  "aspect_ratio": "16:9"
}

Multi-Image Support

  • Images are processed in order
  • Each image is referenced internally as @Image1, @Image2, etc.
  • All images are combined into the final video
  • The AI uses the prompt to guide the animation
  • Max size: 10 MB per image
  • Formats: JPEG, PNG, WebP
  • Max total: 5 images per request
  • Either URLs or Base64 (not both)
Text-to-video:
  • 5 seconds
  • 10 seconds
Image-to-video:
  • 3, 4, 5, 6, 7, 8, 9, or 10 seconds

Aspect Ratios

Aspect RatioUse CaseResolution
16:9Landscape, YouTube, widescreenOptimized for horizontal displays
9:16Portrait, TikTok, Instagram ReelsOptimized for vertical/mobile
1:1Square, Instagram feedBalanced format

Error Responses

400 Bad Request:
{
  "detail": "Duration 3 seconds is only available for image-to-video generation"
}
402 Payment Required:
{
  "detail": "INSUFFICIENT_CREDITS"
}
422 Validation Error:
{
  "detail": "Maximum 5 images allowed"
}