Kling26
Kling 2.6 视频生成(支持可选音频)
功能特性
- 文本到视频生成
- 可选音频生成
- 多种时长
- 高质量输出
定价
| Duration | No Sound | With Sound |
|---|---|---|
| 5 sec | 60 (~$0.67) | 120 (~$1.33) |
| 10 sec | 120 (~$1.33) | 240 (~$2.67) |
端点
POST
/api/v1/videos/generate参数
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| model | string | 必需 | Must be "kling26" |
| type | string | 可选 | "text-to-video" or "image-to-video" (default: text-to-video) |
| prompt | string | 必需 | Text description of the video |
| image_urls | string[] | 可选 | Input image URLs for image-to-video |
| input_image | string | 可选 | Deprecated. Alias for image_urls[0] |
| duration | string | 可选 | "5" or "10" |
| sound | boolean | 可选 | Generate with audio (default: false) |
| aspect_ratio | string | 可选 | Output aspect ratio |
请求示例
{
"model": "kling26",
"prompt": "A fireworks display over a city skyline",
"duration": "10",
"sound": true
}响应示例
{
"success": true,
"data": {
"task_id": "task_kling123",
"credits_used": 240,
"remaining_credits": 260,
"model": "kling26"
}
}代码示例
curl -X POST https://gateway.bananapro.site/api/v1/videos/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "kling26",
"prompt": "A fireworks display over a city skyline",
"duration": "10",
"sound": true
}'