Documentation Index Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
Use this file to discover all available pages before exploring further.
Async task API, returns a task ID after submission
Supports text-to-video, image-to-video, and first-last frame generation
mode=std maps to 720P, mode=pro maps to 1080P
audio=true generates an audio video and is billed as Sound
Text-to-video supports 15 seconds; image-to-video supports up to 10 seconds
Use publicly accessible image URLs. Do not pass base64 image data in image_urls; upload local images with the Upload Image API first.
Authorization
All endpoints require Bearer Token authentication. Authorization: Bearer YOUR_API_KEY
Request Parameters
Video generation model name, fixed as kling-v3.
Text prompt. Describe the subject, action, scene, camera movement, and style. Example: "A golden cat running on a sunlit meadow, slow motion, cinematic quality"
Generation mode. This also determines the billing resolution.
std - standard mode, 720P
pro - professional mode, 1080P
Video duration in seconds. Options: 5, 10, 15 15 seconds is text-to-video only; image-to-video with image_urls supports up to 10 seconds.
Video aspect ratio. Common values: 16:9, 9:16, 1:1
Image URL array for image-to-video.
1 image: first-frame image-to-video
2 images: first-last frame video, first image as first frame and second image as last frame
Up to 2 images.
Whether to generate an audio video.
false - regular video
true - audio video, billed as Sound
Extended parameters. Show Show metadata fields
Negative prompt describing content to avoid.
Whether to add watermark.
Billing Mapping
Request Parameters Billing Spec mode=std, audio=false720P mode=pro, audio=false1080P mode=std, audio=true720P+Sound mode=pro, audio=true1080P+Sound
Response
Task ID for querying task status.
Object type, usually generation.task.
Model used for the request.
Task status: queued, in_progress, completed, or failed.
Examples
Text-to-Video
{
"model" : "kling-v3" ,
"prompt" : "A golden cat running on a sunlit meadow, slow motion, cinematic quality" ,
"mode" : "std" ,
"duration" : 5 ,
"aspect_ratio" : "16:9"
}
1080P Video
{
"model" : "kling-v3" ,
"prompt" : "A rainy Tokyo street at night, neon lights reflected on wet pavement, cinematic camera" ,
"mode" : "pro" ,
"duration" : 10 ,
"aspect_ratio" : "16:9"
}
Image-to-Video
{
"model" : "kling-v3" ,
"prompt" : "The person in the frame slowly turns and smiles" ,
"image_urls" : [ "https://example.com/portrait.jpg" ],
"mode" : "std" ,
"duration" : 5
}
First-Last Frame
{
"model" : "kling-v3" ,
"prompt" : "The city naturally transitions from day to night" ,
"image_urls" : [
"https://example.com/day.jpg" ,
"https://example.com/night.jpg"
],
"mode" : "pro" ,
"duration" : 5
}
Audio Video
{
"model" : "kling-v3" ,
"prompt" : "A singer performing on stage, crowd cheering, flashing lights" ,
"mode" : "std" ,
"duration" : 5 ,
"audio" : true
}
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "kling-v3",
"prompt": "A golden cat running on a sunlit meadow, slow motion, cinematic quality",
"mode": "std",
"duration": 5,
"aspect_ratio": "16:9"
}'