Skip to main content

Create task

POST /kling/v1/videos/text2video
cURL
200

Request headers

string
required
Bearer authentication in the form Bearer YOUR_API_KEY.
string
default:"application/json"
required
Must be 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 from Voice Management.
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.

Specified voice

voice_list accepts up to two voices. Reference them as <<<voice_1>>> and <<<voice_2>>> in list order, and set sound to on.

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.

Query task by ID

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

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 task_id returned by the create request.
cURL

Response fields

integer
0 indicates that the query was accepted.
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.
200
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. It does not include new model-specific endpoints or the unavailable video task-list queries.