Kling 3.0
Overview
Kling 3.0 is Kuaishou’s cinematic video generation model with multi-shot storytelling, native multilingual audio, and flexible duration up to 15 seconds. It supports both Text-to-Video and Image-to-Video modes with start and end frame control.
Test API KEY: key_00000000000000000000000000000000Endpoints
1. Create Task
Request
POST https://api.pixwithapi.online/api/task/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | The input prompt (e.g., “A cat playing with a ball in the garden”) |
| image_urls | array | Conditional | [“https://cdn.pixwithapi.online/start.jpg ”, “https://cdn.pixwithapi.online/end.jpg ”]. Provide up to 2 images (start frame and end frame) for Image-to-Video mode. |
| model_id | string | Yes | 2-39 |
| options | object | Yes | Configuration options for the task |
| options.prompt_optimization | boolean | Yes | If true, all prompt words will be automatically translated into English. |
| options.aspect_ratio | string | Conditional | Aspect ratio of the output. Valid values: '1:1', '16:9' (Default), '9:16'. Only for Text-to-Video. Image-to-Video auto-detects from input image. |
| options.duration | int | Yes | Duration of the video in seconds. Valid values: 5, 10, or 15. Default: 10. |
Example Request - Text-to-Video
{
"prompt": "A cinematic scene of a woman walking through a neon-lit city at night",
"model_id": "2-39",
"options": {
"prompt_optimization": true,
"aspect_ratio": "16:9",
"duration": 10
}
}Example Request - Image-to-Video
{
"prompt": "The character starts moving forward with cinematic motion",
"image_urls": ["https://cdn.pixwithapi.online/start.jpg"],
"model_id": "2-39",
"options": {
"prompt_optimization": true,
"duration": 10
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | 1=success, 0=error |
| message | string | Success and failure messages |
| data | object | |
| data.task_id | string | |
| data.estimated_time | int | Estimated time in seconds |
Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"estimated_time": 150
}
}Last updated on