Skip to Content
Video ModelsKling 2.6

Kling 2.6

Overview

Kling 2.6 is Kuaishou’s latest video generation model with built-in audio generation capability. It supports both Text-to-Video and Image-to-Video modes, producing high-quality videos with optional synchronized sound effects.

Test API KEY: key_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwith.ai/api/task/create

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Api-Key{API_KEY}Yes

Request Parameters

ParameterTypeRequiredDescription
promptstringYesThe input prompt (e.g., “A cat playing with a ball in the garden”)
image_urlsarrayConditional[“https://cdn.pixwith.ai/xxx.jpg ”]. Provide exactly 1 image for Image-to-Video mode.
model_idstringYes2-33
optionsobjectYesConfiguration options for the task
options.prompt_optimizationbooleanYesIf true, all prompt words will be automatically translated into English.
options.num_outputsintNoNumber of videos to generate. Valid values: 1 to 4. Default: 1.
options.soundbooleanYesIf true, generates synchronized audio for the video. Default: true.
options.aspect_ratiostringConditionalAspect ratio of the output. Valid values: '1:1' (Default), '16:9', '9:16'. Only for Text-to-Video. Image-to-Video auto-detects from input image.
options.durationintYesDuration of the video in seconds. Valid values: 5 or 10. Default: 5.

Example Request - Text-to-Video

{ "prompt": "A cat playing with a ball in the garden", "model_id": "2-33", "options": { "prompt_optimization": true, "num_outputs": 1, "sound": true, "aspect_ratio": "16:9", "duration": 5 } }

Example Request - Image-to-Video

{ "prompt": "The person in the photo starts walking forward", "image_urls": ["https://cdn.pixwith.ai/example.jpg"], "model_id": "2-33", "options": { "prompt_optimization": true, "num_outputs": 1, "sound": false, "duration": 10 } }

Response Parameters

ParameterTypeDescription
codeint1=success, 0=error
messagestringSuccess and failure messages
dataobject
data.task_idstring
data.estimated_timeintEstimated time in seconds

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d", "estimated_time": 150 } }

Credits

DurationSound OffSound On
5 seconds4590
10 seconds90180
Last updated on