Kling V2.6 Pro Text to Video
kwaivgi/kling-video/v2.6/pro/text-to-videoKling V2.6 Pro Text to Video by Kuaishou turns a text prompt into a 5 or 10 second 1080p video with optional native audio.
ลองใช้โมเดล
Playground
การตั้งค่าขั้นสูง
ต้องการทำอะไรต่อ
ตัวอย่าง
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
- เปิดผลลัพธ์ ↗
อินพุต
{ "prompt": "Old friends reuniting at a train station after 20 years, one exclaims 'Is that really you?!' other tearfully replies 'I promised I'd come back, didn't I?', train whistle, steam hissing, emotional orchestral swell, crowd murmur" }
Kling V2.6 Pro Text to Video
Kling V2.6 Pro text-to-video with native audio, 5 or 10 seconds.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 2,500 characters. |
aspect_ratio | 16:9 / 9:16 / 1:1 | 16:9 | Output frame shape. |
duration | 5 / 10 | 5 | Output length in seconds. |
generate_audio | boolean | true | Native audio; on by default. |
Billing
Per output second: $0.14 with audio, $0.07 silent.
| Output | With audio | Silent |
|---|---|---|
| 5s (default) | $0.70 | $0.35 |
| 10s | $1.40 | $0.70 |
Failed runs are not charged.
Prompting
- Describe subject, action, camera move, and light in order.
Limits
- Clips are 5 or 10 seconds.
Also on SandBase
Related: kwaivgi/kling-video/v2.6/pro/image-to-video, kwaivgi/kling-video/v3/pro/text-to-video (newer).
เริ่มสร้าง
ส่งคำขอแรกของคุณ
ส่งโมเดลนี้ผ่าน SandBase Unified Run API
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "kwaivgi/kling-video/v2.6/pro/text-to-video",
"prompt": "Old friends reuniting at a train station after 20 years, one exclaims 'Is that really you?!' other tearfully replies 'I promised I'd come back, didn't I?', train whistle, steam hissing, emotional orchestral swell, crowd murmur",
"duration": 5,
"aspect_ratio": "16:9",
"generate_audio": true
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"2. การยืนยันตัวตน
สร้าง SandBase API key และตั้งค่าไว้ในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอทั้งหมดใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์หรือคอมมิตลง repository
3. คิว
ส่งคำขอ
POST ไปที่ /v1/run ด้วย model ID นี้และอินพุตของมัน ตัวอย่างคำขอด้านบนมีทั้งการส่งและการ polling
ดึงสถานะและผลลัพธ์ของคำขอ
ใช้ run ID ที่ส่งกลับมาเพื่อ polling จนกว่าสถานะจะเป็น completed, failed หรือ timeout ให้อ่าน output หลังจาก completed เท่านั้น
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"4. ไฟล์
ไฟล์ที่โฮสต์ไว้
ส่ง URL ไฟล์ที่เข้าถึงได้สาธารณะในช่อง image, video หรือ audio ของโมเดล รูปแบบและข้อจำกัดที่รองรับแสดงอยู่ข้างแต่ละอินพุตใน Playground
อัปโหลดรูปภาพ
ใช้ตัวควบคุม upload หรือ replace ในช่องรูปภาพที่รองรับใน Playground ช่อง URL ของวิดีโอรองรับวิดีโอ driving ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
5. Schema
อินพุต
durationinteger
The duration of the generated video in seconds
ค่าเริ่มต้น: 5
ค่าที่เป็นไปได้: 5, 10
aspect_ratiostring
The aspect ratio of the generated image.
ค่าเริ่มต้น: "16:9"
ค่าที่เป็นไปได้: "16:9", "9:16", "1:1"
generate_audioboolean
Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase.
ค่าเริ่มต้น: true
{
"model": "kwaivgi/kling-video/v2.6/pro/text-to-video",
"prompt": "Old friends reuniting at a train station after 20 years, one exclaims 'Is that really you?!' other tearfully replies 'I promised I'd come back, didn't I?', train whistle, steam hissing, emotional orchestral swell, crowd murmur",
"duration": 5,
"aspect_ratio": "16:9",
"generate_audio": true
}ผลลัพธ์
run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"poster": "https://static.sandbase.ai/examples/posters/5af6c4b9f5fe725b4ea3.jpg",
"source": "Kling AI official schema mirror",
"source_url": "https://kling.ai/document-api/guides/get-started/overview",
"url": "https://static.sandbase.ai/examples/e6a3ff5d-0282-47ac-889e-3c5a7366410b/output/2570a860-40b6-4ed2-943f-e4e6916b22d4.mp4"
}
]