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

POST /v1/kling/generate

Creates a video generation task from text description using Kling AI models.
prompt
string
required
Text description of the video (1-2500 characters)
negative_prompt
string
What should NOT be in the video (max 2500 characters)
model
string
default:"kling_2.5_turbo"
Model to use.Available models:
  • kling_2.6 (NEW: Audio-enabled, always Pro quality)
  • kling_2.5_turbo (Standard/Turbo)
  • kling_2.5_turbo_pro (Professional/Turbo Pro)
  • kling_2.1 (Standard)
  • kling_2.1_pro (Professional)
  • kling_2.1_master (Master, no pro mode)
  • kling_1.6 (Standard)
  • kling_1.6_pro (Professional)
duration
string
default:"5"
Duration: "5" (5 seconds) or "10" (10 seconds)
aspect_ratio
string
default:"16:9"
Video aspect ratio: "16:9", "9:16", "1:1"
For image-to-video mode, aspect ratio is automatically determined from the input image and should not be specified.
cfg_scale
number
default:"0.5"
Creativity balance (0.0-1.0). 0.0 = maximum creativity, 1.0 = strict prompt following
seed
number
Reproducibility seed (0-2147483647)
callback_url
string
Webhook URL for completion notifications
image_base64
string
Base64-encoded image for Image-to-Video (JPEG/PNG/WEBP)
image_url
string
URL of image for Image-to-Video
curl -X POST https://platform.runblob.io/v1/kling/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A golden retriever running through a sunflower field at sunset",
    "model": "kling_2.5_turbo"
  }'

Response

{
  "generation_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "price": "0.0250"
}
Video generation typically takes 2-5 minutes. Use the generation_id to check status or set up webhooks for notifications.

Get Generation Status Response

{
    "generation_id": "5b92cd9c-2ddf-45a4-9bd1-7b13afaf1186",
    "status": "completed",
    "prompt": "cat and dog play together",
    "video_url": "https://storage.runblob.io/...",
    "model": "kling_2.5_turbo"
}

Generation Modes

The API supports 2 generation modes:

1. Text-to-Video

Generate video from text prompt only (no images). Models: kling_1.6, kling_2.1_master, kling_2.5_turbo, kling_2.6
kling_2.1 and kling_2.1_pro do NOT support text-to-video. They require an input image.

2. Image-to-Video

Animate a single image with text prompt using image_base64 or image_url parameter.
  • Formats: JPEG, PNG, WEBP
  • Max size: ~10 MB
  • Models: kling_1.6, kling_2.1, kling_2.1_master, kling_2.5_turbo, kling_2.6 (and their _pro variants)
Important: You cannot use both image_base64 and image_url in the same request. For image-to-video mode, aspect ratio is taken from the input image automatically.

Models Guide

Kling 2.6 (NEW)

  • Code: kling_2.6
  • Features:
    • Text-to-video: Yes
    • Image-to-video: Yes
    • Audio support: Yes
    • Always Pro quality
    • Priority processing
    • Negative prompt: No
    • CFG Scale: No
  • Best for: Highest quality videos with audio support

Kling 2.5 Turbo (Default)

  • Codes: kling_2.5_turbo, kling_2.5_turbo_pro
  • Features:
    • Text-to-video: Yes
    • Image-to-video: Yes
    • Negative prompt: No
    • CFG Scale: No
  • Best for: Fastest generation speed

Kling 2.1 Master

  • Code: kling_2.1_master
  • Features:
    • Text-to-video: Yes
    • Image-to-video: Yes
    • Negative prompt: Yes
    • CFG Scale: No
  • Best for: High-quality text-to-video

Kling 2.1 Pro

  • Codes: kling_2.1, kling_2.1_pro
  • Features:
    • Text-to-video: No (image required)
    • Image-to-video: Yes
    • Negative prompt: Yes
    • CFG Scale: No
  • Best for: Professional image animation

Kling 1.6

  • Codes: kling_1.6, kling_1.6_pro
  • Features:
    • Text-to-video: Yes
    • Image-to-video: Yes
    • Negative prompt: Yes
    • CFG Scale: Yes
  • Best for: Maximum creative control
Creativity balance parameter (Kling 1.6 only):
  • 0.0-0.3: Maximum creativity, AI adds interpretations
  • 0.4-0.6: Balanced mode (recommended)
  • 0.7-1.0: Strict prompt following, minimal deviations