Kling Text-to-Video
Kling's official API-compatible format, generating video from a text description; supported models include kling-v1, kling-v1-5, etc. See also Kling Image-to-Video and Get text-to-video task status.
Different path prefix
The Kling format uses the /kling/... path prefix — without the /v1 prefix used elsewhere in this documentation. Authentication is still Authorization: Bearer <YOUR_API_KEY>.
Endpoint
POST /kling/v1/videos/text2videoRequest parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | No | Model ID, e.g. kling-v1 |
prompt | string | No | Text prompt |
duration | number | No | Video duration (seconds) |
width / height | integer | No | Video width / height |
fps | integer | No | Frame rate |
seed | integer | No | Random seed |
n | integer | No | Number to generate |
Request example
bash
curl https://ai.youqi.tech/kling/v1/videos/text2video \
-H "Authorization: Bearer sk-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v1",
"prompt": "An astronaut stands up and walks away",
"duration": 5
}'Response example
json
{ "task_id": "abcd1234efgh", "status": "queued" }TIP
Poll Get text-to-video task status with the returned task_id for the result.