Skip to main content
This page groups Kling 2.6 creation, query, and management operations by capability. Each request and response example is aligned with its related fields.

Create task

POST /kling/v1/videos/text2video
cURL

Request headers

string
required
Bearer authentication in the form Bearer YOUR_API_KEY.
string
default:"application/json"
required
Data exchange format. Use application/json.

Request body

string
required
Must be kling-2.6.
string
required
Positive prompt, up to 2,500 characters.
string
Content to avoid, up to 2,500 characters.
object[]
Up to two voices. Each item contains a voice_id returned by Voice management. Reference them as <<<voice_1>>> and <<<voice_2>>> in list order, and set sound to on.
string
default:"off"
on or off. Must be on when voice_list is used.
string
default:"std"
std for 720p or pro for 1080p.
string
default:"5"
Fixed duration: 5 or 10 seconds.
string
default:"16:9"
16:9, 9:16, or 1:1.
object
Preset or custom camera movement.
object
Use enabled to request an additional watermarked result.

Camera control

camera_control.type supports simple, down_back, forward_up, right_turn_forward, and left_turn_forward. In simple mode, set one nonzero property in config: horizontal, vertical, pan, tilt, roll, or zoom. Each property ranges from -10 to 10.

Create response

200
string
AnyFast task ID.
string
Task ID, equal to id.
string
Object type, always video.
string
Public model ID used for the task.
string
Initial status, always queued.
integer
Initial progress, always 0.
integer
Creation time as a Unix timestamp in seconds.

Query task by ID

GET /kling/v1/videos/text2video/{task_id}
cURL

Request headers

string
required
Bearer authentication in the form Bearer YOUR_API_KEY.
string
default:"application/json"
required
Data exchange format. Use application/json.

Path parameters

string
required
The text-to-video task ID returned by the create endpoint.

Task result

200
integer
0 indicates that the query succeeded.
string
Error information; empty for a successful query.
string
Queried task ID.
string
submitted, processing, succeed, or failed.
string
Failure details when the task fails.
object[]
Generated videos, returned after success.
string
Temporary generated-video URL.
string
Actual duration in seconds.
integer
Creation Unix timestamp in milliseconds.
integer
Last update Unix timestamp in milliseconds.
Generated result URLs are removed after 30 days. Save the files promptly.
This page uses the Kling Legacy request structure. AnyFast adds the /kling routing prefix to Legacy paths.