POST
/
v3
/
async
/
kling-v1.6-t2v
curl --request POST \
  --url https://api.novita.ai/v3/async/kling-v1.6-t2v \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "mode": "<string>",
  "prompt": "<string>",
  "negative_prompt": "<string>",
  "guidance_scale": 123
}'
{
  "task_id": "<string>"
}

KLING V1.6 Text to Video is an AI text-to-video generation model developed by the Kuaishou AI Team. It transforms textual descriptions into dynamic 5-second videos at 720p resolution, offering high-quality visual outputs with enhanced motion and semantic understanding.

This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the video generation results.

Request Headers

Content-Type
string
required

Supports: application/json

Authorization
string
required

Bearer authentication format, for example: Bearer {{API Key}}.

Request Body

mode
string

The mode of the video generation.

Supports:

  • Standard: fast creation, lower cost, and generate 720p video.

Default: Standard.

prompt
string
required

Prompt text required to guide the generation.

Range: 1 <= x <= 2000.

negative_prompt
string

Negative prompts instruct the model on what elements to avoid generating.

Range: 0 <= x <= 2000.

guidance_scale
float

Guidance scale parameter controls how closely the generated content follows the prompt.

Range: 0 <= x <= 1. Default: 0.5.

Response

task_id
string
required

Use the task_id to request the Task Result API to retrieve the generated outputs.

Example

Here is an example of how to use the KLING V1.6 Text to Video API.

  1. Generate a task_id by sending a POST request to the KLING V1.6 Text to Video API.

Request:

curl --location 'https://api.novita.ai/v3/async/kling-v1.6-t2v' \
--header 'Authorization: Bearer {{API Key}}' \
--header 'Content-Type: application/json' \
--data '{
    "mode": "Standard", 
    "prompt": "A cute dog standing up from a sitting position while wearing sunglasses",
    "negative_prompt": "low quality",
    "guidance_scale": 0.6,
}'

Response:

{
    "task_id": "{Returned Task ID}"
}
  1. Use task_id to get output videos.

HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.

You can get videos url in videos of response.

Request:

curl --location --request GET 'https://api.novita.ai/v3/async/task-result?task_id={Returned Task ID}' \
--header 'Authorization: Bearer {{API Key}}'

Response:

{
    "task": {
        "task_id": "{Returned Task ID}",
        "task_type": "KLING_V16_T2V_STANDARD",
        "status": "TASK_STATUS_SUCCEED",
        "reason": "",
        "eta": 0,
        "progress_percent": 100
    },
    "images": [],
    "videos": [
        {
            "video_url": "{The URL of the generated video}",
            "video_url_ttl": "3600",
            "video_type": "mp4"
        }
    ]
}

Video files: