Skip to main content
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "kling-v3-omni",
    "prompt": "Make the person in <<<image_1>>> wave at the camera",
    "image_urls": ["https://example.com/portrait.jpg"],
    "mode": "std",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'
{
  "id": "video_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ",
  "object": "generation.task",
  "model": "kling-v3-omni",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {}
}
  • Async processing mode, returns task ID for subsequent queries
  • Unified text-to-video and image-to-video interface
  • Supports <<<image_N>>> syntax to reference images in prompts
  • Supports standard mode (720P) and professional mode (1080P)
  • Duration options: 5 or 10 seconds
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in image_urls. Please use the Upload Image API first to upload images and get URLs, then call this endpoint.

Authorization

Authorization
string
required
All endpoints require Bearer Token authenticationGet your API Key: Visit the API Key Management Page to get your API KeyAdd to request header:
Authorization: Bearer YOUR_API_KEY

Request Parameters

model
string
required
Video generation model name, fixed as kling-v3-omni
prompt
string
required
Text prompt describing the video contentUse <<<image_N>>> syntax to reference images in image_urls. N starts from 1.Example: "Make the person in <<<image_1>>> wave at the camera"
If you pass images but the prompt has no <<<image_N>>> reference, the system will automatically prepend <<<image_1>>> to the prompt.
mode
string
default:"std"
Generation modeOptions:
  • std - Standard mode (720P)
  • pro - Professional mode (1080P)
Default: std
duration
integer
default:"5"
Video duration (seconds)Options: 5 or 10Default: 5
aspect_ratio
string
default:"16:9"
Video aspect ratioOptions:
  • 16:9 - Landscape (default)
  • 9:16 - Portrait
  • 1:1 - Square
Default: 16:9
image_urls
string[]
Image URL array for image referencesReference images in the prompt using <<<image_N>>> (N starts from 1)Example: ["https://example.com/photo.jpg"]
  • Image URLs must be publicly accessible, no hotlink protection
  • In image-to-video mode, aspect_ratio may be overridden by the actual image ratio
metadata
object
Extended parameters for Kling v3 Omni

Image Reference Syntax

The Omni model uses <<<image_N>>> syntax in prompts to reference images, enabling a unified text-to-video and image-to-video experience:
SyntaxDescription
<<<image_1>>>References the 1st image in image_urls
<<<image_2>>>References the 2nd image in image_urls
Auto-reference: If you pass image_urls but the prompt has no <<<image_N>>> reference, the system will automatically prepend <<<image_1>>> to the prompt.

Response

id
string
Unique task identifier for querying task status
object
string
Object type, fixed as generation.task
model
string
Model name used for generation
status
string
Task status
  • queued - Waiting to be processed
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
progress
integer
Task progress percentage (0-100)
created_at
integer
Task creation Unix timestamp
metadata
object
Task metadata

Use Cases

Case 1: Text-to-Video (Standard Mode)

{
  "model": "kling-v3-omni",
  "prompt": "A golden retriever running on a beach at sunset, cinematic quality",
  "mode": "std",
  "duration": 5,
  "aspect_ratio": "16:9"
}

Case 2: Image Reference (Single Image)

{
  "model": "kling-v3-omni",
  "prompt": "Make the person in <<<image_1>>> wave at the camera",
  "image_urls": ["https://example.com/portrait.jpg"],
  "mode": "pro",
  "duration": 5
}

Case 3: Multiple Image References

{
  "model": "kling-v3-omni",
  "prompt": "The character in <<<image_1>>> walks toward the scene in <<<image_2>>>",
  "image_urls": [
    "https://example.com/character.jpg",
    "https://example.com/scene.jpg"
  ],
  "mode": "pro",
  "duration": 5
}

Case 4: Images Without Explicit Reference (Auto-add)

{
  "model": "kling-v3-omni",
  "prompt": "Person slowly turns head and smiles",
  "image_urls": ["https://example.com/portrait.jpg"],
  "mode": "std",
  "duration": 5
}
The system will automatically prepend <<<image_1>>> to the prompt, equivalent to "<<<image_1>>> Person slowly turns head and smiles".
Query Task ResultsVideo generation is an async task that returns a task ID upon submission. Use the Get Task Status endpoint to query generation progress and results.
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "kling-v3-omni",
    "prompt": "Make the person in <<<image_1>>> wave at the camera",
    "image_urls": ["https://example.com/portrait.jpg"],
    "mode": "std",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'
{
  "id": "video_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ",
  "object": "generation.task",
  "model": "kling-v3-omni",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {}
}