Skip to main content
This page consolidates Kling 2.1 Master text-to-video and image-to-video creation and task queries. Each tab keeps its request, response, and fields together.

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.1-master.
string
required
Positive prompt, up to 2,500 characters.
string
Content to avoid, up to 2,500 characters.
string
default:"std"
std for 720p or pro for 1080p.
string
default:"5"
5 or 10 seconds.
string
default:"16:9"
16:9, 9:16, or 1:1.
object
Set enabled to request an additional watermarked result.

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 Legacy model does not support an end frame, audio, specified voices, multi-shot, motion brush, camera control, or cfg_scale.