One uninterrupted five-second underwater wildlife shot. A single manta ray glides slowly from left to right past the open ribbed hull of an old submerged wooden ship. Two broad pectoral fins make one smooth gentle downward stroke; the same diamond-shaped body and thin tail stay intact. Soft shafts of sunlight enter through gaps in the wreck and travel across its back, while a few suspended particles drift. Slow parallel camera tracking, enough distance to see the full animal, realistic clear turquoise water, calm graceful movement. No diver, no extra rays, no sudden acceleration, no cuts or text.
Kling 1.6 Pro Text to Video API
kwaivgi/kling-video/v1.6/pro/text-to-videoKling 1.6 Pro Text to Video transforms descriptive text prompts into native 1080p cinematic video clips across 16:9, 9:16, and 1:1 aspect ratios with flexible 5-second and 10-second durations. It accurately models complex physical dynamics, advanced camera movements, and dramatic lighting transitions while maintaining subject consistency and visual coherence throughout every shot.
Examples
REST API Spec
Quick Start
Submit an endpoint request and poll for status. Replace example URLs with your accessible files.
Step 1: Configure API authentication
Obtain an API key from the dashboard and include Authorization: Bearer <API_KEY> in every request header.
- Submission Endpoint
- POST
https://api.vidgo.ai/api/generate/submit - Auth Header
- Authorization: Bearer VIDGO_API_KEY
Step 2: Submit a generation task
POST /api/generate/submit. Pass model and optional callback_url at the root level, with generation parameters inside input.
REQUEST_BODY=$(cat <<'JSON'
{
"model": "kwaivgi/kling-video/v1.6/pro/text-to-video",
"input": {
"prompt": "A quiet forest in morning light, with a slow camera pan.",
"duration": 5
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"Step 3: Poll for task completion
Poll status with task_id; continue while not_started or running, and stop on finished or failed. Read video URLs from data.files[].file_url on success, or data.error_message on failure.
Status Endpoint
GET https://api.vidgo.ai/api/generate/status/{task_id}Poll status using task_id; continue while not_started or running, stop when finished or failed. On success, read data.files[].file_url; on failure, read data.error_message.
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "task-example",
"status": "not_started",
"created_time": "2026-09-23T08:00:00"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}Complete end-to-end script example
Expand to view a production-ready script with retry logic, error handling, and timeout safeguards.
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "kwaivgi/kling-video/v1.6/pro/text-to-video",
"input": {
"prompt": "A quiet forest in morning light, with a slow camera pan.",
"duration": 5
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
doneRequest Parameters (input object)
Supported generation parameters inside the input object when submitting a POST request to /api/generate/submit:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string | Required | — | Required nonblank string, at most 2,500 Unicode characters after trimming. |
| duration | integer | Required | — | Required integer: 5 or 10 seconds. No strings, booleans or fractional durations. No API default; the playground starts at 5 seconds. |
| aspect_ratio | string | Optional | — | Optional: 1:1, 16:9 or 9:16. No default. |
| negative_prompt | string | Optional | — | Optional string, at most 2,500 Unicode characters. |
| cfg_scale | number | Optional | — | Optional finite number from 0 to 1. No default. Not supported in Elements. |
Response Fields (query result)
Task details returned when polling GET /api/generate/status/{task_id}:
| Field | Type | Description |
|---|---|---|
| code | integer | Business response code, 200 on success. |
| data.task_id | string | Globally unique asynchronous task identifier. |
| data.status | string | Execution status: not_started, running, finished, or failed. |
| data.files | array | Generated video files upon completion, each with file_url and file_type. |
| data.error_message | string | null | Error description if task fails. |
Task Lifecycle
Clients should inspect the status field and stop polling when reaching finished or failed:
not_startedTask received and queued for execution.
runningGeneration is in progress.
finishedGeneration complete; retrieve video URL from data.files.
failedGeneration failed; inspect data.error_message; deducted credits are refunded per standard policy.
Polling & Error Handling
- Recommended Polling IntervalStart polling every 2–3 seconds, increasing to 5 seconds as the task continues, to avoid excessive requests.
- Network Fluctuations & RetriesIf status polling encounters 5xx or timeouts, the task is still running; retry querying after a brief pause.
- Asynchronous Webhook CallbackProvide callback_url at the root of the request payload to receive the completed task result automatically via POST.
Specifications
| Specification | Value | Description |
|---|---|---|
| Model ID | kwaivgi/kling-video/v1.6/pro/text-to-video | Root-level model field. |
| Duration | 5 / 10s | Required integer: 5 or 10 seconds. No strings, booleans or fractional durations. No API default; the playground starts at 5 seconds. |
Kling 1.6 Pro Text to Video API frequently asked questions
What is the Kling 1.6 Pro Text to Video API?
Kling 1.6 Pro Text to Video is a flagship video diffusion model developed by Kwaivgi. It converts text prompts directly into native 1080p cinematic video clips across 16:9, 9:16, and 1:1 aspect ratios, with 5-second or 10-second duration control. Powered by advanced multi-modal physics modeling and deep semantic conditioning, it maintains structural stability and lighting continuity through complex physical motions and camera moves. You can call it programmatically or try it from the playground above.
How does Kling 1.6 Pro Text to Video compare to the Standard tier?
The primary difference is resolution and rendering fidelity: Standard generates 720p video at 9 credits/second for rapid prototyping, while Pro delivers native 1080p full HD video at 15 credits/second with superior physical simulation, richer textures, and enhanced prompt adherence for cinematic production.
What aspect ratios are supported by Kling 1.6 Pro Text to Video?
The endpoint supports three native aspect ratios: 16:9 (cinematic widescreen and desktop displays), 9:16 (vertical mobile video), and 1:1 (square social media formats). Specify your choice via the aspect_ratio parameter.
What are the character limits for prompts in Kling 1.6 Pro Text to Video?
Both the positive prompt and negative_prompt support up to 2,500 Unicode characters, providing ample room for comprehensive cinematic descriptions, lighting cues, and negative quality filtering.
How should I configure cfg_scale in Kling 1.6 Pro Text to Video?
The cfg_scale parameter is an optional finite number from 0 to 1. Higher values bind the generation more closely to your text prompt, while lower values give the model greater creative flexibility. A setting of 0.5 is recommended for optimal balance.
How is Kling 1.6 Pro Text to Video priced?
Pricing is billed at 15 credits per second ($0.075/s). A 5-second video costs 75 credits ($0.375), and a 10-second video costs 150 credits ($0.750). If generation fails due to a system error, all credits are automatically refunded.
Can I provide reference images to Kling 1.6 Pro Text to Video?
No. This is a dedicated text-driven endpoint and does not accept image inputs. To generate videos using starting frames, ending frames, or reference character images, use the Kling 1.6 Pro Image to Video endpoint.