Home/Models/Kling/Kling Video

Kling Video

Kling
kling_video
每次請求:$0.13
影片生成
功能
定價
API

Kling Video 的功能

探索 Kling Video 的核心功能,專為提升效能和可用性而設計。了解這些功能如何為您的專案帶來效益並改善使用者體驗。
text-to-text
text-to-music
speech-to-text
text-to-speech
text-to-image
image-to-image
image-editing
image-to-text
text-to-video
image-to-video
chat
video-to-text
pdf-to-text

Kling Video 的定價

探索 Kling Video 的競爭性定價,專為滿足各種預算和使用需求而設計。我們靈活的方案確保您只需為實際使用量付費,讓您能夠隨著需求增長輕鬆擴展。了解 Kling Video 如何在保持成本可控的同時提升您的專案效果。
VersionQualityDurationPrice
v1std5s$0.13
v1std10s$0.26
v1pro5s$0.46
v1pro10s$0.92
v1.5/v1.6std5s$0.26
v1.5/v1.6std10s$0.53
v1.5/v1.6pro5s$0.46
v1.5/v1.6pro10s$0.92
v2-master-5s$1.32
v2-master-10s$2.64
v2-1std5s$0.26
v2-1std10s$0.53
v2-1pro5s$0.46
v2-1pro10s$0.92
v2-1-master-5s$1.32
v2-1-master-10s$2.64
v2-5-turbopro5s$0.33
v2-5-turbopro10s$0.66
v2-6 (no native audio)pro5s$0.33
v2-6 (no native audio)pro10s$0.67
v2-6 (native audio, no voice control)pro5s$0.67
v2-6 (native audio, no voice control)pro10s$1.33
v2-6 (native audio, with voice control)pro5s$0.80
v2-6 (native audio, with voice control)pro10s$1.60

Kling Video 的範例程式碼和 API

存取完整的範例程式碼和 API 資源,以簡化您的 Kling Video 整合流程。我們詳盡的文件提供逐步指引,協助您在專案中充分發揮 Kling Video 的潛力。
Python
JavaScript
Curl
import requests
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com/kling/v1"

headers = {
    "Authorization": f"Bearer {COMETAPI_KEY}",
    "Content-Type": "application/json",
}

# ============================================================
# Step 1: Create Video Task
# ============================================================
print("Step 1: Creating video task...")

create_payload = {
    "prompt": "A happy scene of a vacation on the beach.",
    "model_name": "kling-v2-6",
}

create_response = requests.post(
    f"{BASE_URL}/videos/text2video", headers=headers, json=create_payload
)

create_result = create_response.json()
print(f"Create response: {create_result}")

# Extract task ID from the response
task_id = create_result.get("data", {}).get("task_id")
if not task_id:
    print("Error: Failed to get task_id from response")
    exit(1)

print(f"Task ID: {task_id}")

# ============================================================
# Step 2: Query Task Status
# ============================================================
print("
Step 2: Querying task status...")

query_response = requests.get(
    f"{BASE_URL}/videos/text2video/{task_id}", headers=headers
)

query_result = query_response.json()
print(f"Query response: {query_result}")

# Check task status
task_status = query_result.get("data", {}).get("status") or query_result.get(
    "data", {}
).get("task_status")
print(f"Task status: {task_status}")

更多模型