Back to models
Kling

Kling: Video 4.0

kling-v4
KlingPriced by generation parameters

Kling 4.0 是快手可灵新一代视频生成模型,支持文本、图片与多素材参考生成,支持 720p/1080p 输出和原生音频。

Total Context—
PricingUsage based

Providers for Kling: Video 4.0

AnyInt routes requests to the best providers that are able to handle your prompt size and parameters, with fallbacks to maximize uptime.

Kling
Total Context—
PricingPriced by generation parameters

Sample code and API for Kling: Video 4.0

AnyInt generates a quickstart from this model's declared API operations, including complete polling flows for asynchronous media.

Create API key

Choose an operation and language that match this model.

Video GenerationAnyInt async media

Create a generation task, then poll its status for artifacts.

/v1/videos/generations
# 1. Create a generation task and save its ID.
TASK_ID=$(curl 'https://api.anyint.ai/v1/videos/generations' \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -d '{
  "model": "kling-v4",
  "prompt": "Describe a calm futuristic city at sunrise.",
  "duration_seconds": 5,
  "aspect_ratio": "16:9"
}' | jq -r '.task.id')

# 2. Poll until task.status is completed or failed.
curl 'https://api.anyint.ai/v1/async-tasks/'"$TASK_ID" \
  -H "Authorization: Bearer <YOUR_API_KEY>"