Home/Models/Kling/Kling Video
K

Kling Video

Per Request:$0.13216
Video Generation
Commercial Use
Features
Pricing
API

Features for Kling Video

Explore the key features of Kling Video , designed to enhance performance and usability. Discover how these capabilities can benefit your projects and improve user experience.

Pricing for Kling Video

Explore competitive pricing for Kling Video , designed to fit various budgets and usage needs. Our flexible plans ensure you only pay for what you use, making it easy to scale as your requirements grow. Discover how Kling Video can enhance your projects while keeping costs manageable.
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

Sample code and API for Kling Video

Access comprehensive sample code and API resources for Kling Video to streamline your integration process. Our detailed documentation provides step-by-step guidance, helping you leverage the full potential of Kling Video in your projects.
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}")

More Models