Kling 2.6 API 价格与接入
Kling 2.6 API 的模型能力、计价规格、请求参数和接入示例。使用 VezAPI 账号密钥统一接入。
Kling 2.6 API 接入文档
使用 VezAPI 密钥接入 Kling 2.6。下列操作共用同一个账号余额和鉴权方式。
https://api.vezapi.com请求头使用 Authorization: Bearer YOUR_VEZAPI_KEY。每次提交使用唯一的 Idempotency-Key,查询同一笔提交时才复用。
Kling-2.6 图生视频
/api/v1/jobs/createTask模型标识: kling-2.6/image-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。必填字段。 - 该端点必须使用 `kling-2.6/image-to-video` 模型 可选值: 默认: |
callBackUrl可选 | string | 接收生成任务完成通知的回调 URL。可选配置,建议在生产环境中使用。 - 任务生成完成后,系统会向该 URL POST 任务状态与结果 - 回调内容包含生成的资源 URL 与任务相关信息 - 您的回调端点需要支持接收带 JSON 负载的 POST 请求 - 也可以选择调用任务详情端点,主动轮询任务状态 |
input可选 | object | 生成任务的输入参数 |
input.prompt必填 | string | 文本提示词(最长 2500 字符)。
|
input.image_urls必填 | array | 用于生成视频的图像 URL。(为上传后的文件 URL,非文件内容;支持的类型:image/jpeg、image/png;最大文件大小:10.0MB)
|
input.sound必填 | boolean | 必填。该参数用于指定生成的视频是否包含声音(布尔值:true/false) |
input.duration必填 | string | 必填。视频时长(单位:秒) 可选值: |
请求示例
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling-2.6/image-to-video",
"input": {
"prompt": "In a bright rehearsal room, sunlight streams through the windows, and a standing microphone is placed in the center of the room. [Campus band female lead singer] stands in front of the microphone with her eyes closed, and other members stand around her. [Campus band female lead singer, singing loudly] Lead vocal: \"I will do my best to heal you, with all my heart and soul...\" The background is a cappella harmonies, and the camera slowly pans around the band members.",
"image_urls": [
"https://example.com/input.png"
],
"sound": false,
"duration": "5"
}
}'返回值与错误
HTTP 200
请求成功
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code可选 | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). 可选值: |
msg可选 | string | Response message, error description upon failure |
data必填 | object | |
data.taskId必填 | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
Kling-2.6 文生视频
/api/v1/jobs/createTask模型标识: kling-2.6/text-to-video
| 参数 | 类型 | 说明与限制 |
|---|---|---|
model必填 | string | 用于生成任务的模型名称。必填字段。 - 该端点必须使用 `kling-2.6/text-to-video` 模型 可选值: 默认: |
callBackUrl可选 | string | 接收生成任务完成通知的回调 URL。可选配置,建议在生产环境中使用。 - 任务生成完成后,系统会向该 URL POST 任务状态与结果 - 回调内容包含生成的资源 URL 与任务相关信息 - 您的回调端点需要支持接收带 JSON 负载的 POST 请求 - 也可以选择调用任务详情端点,主动轮询任务状态 |
input可选 | object | 生成任务的输入参数 |
input.prompt必填 | string | 文本提示词(最长 2500 字符)。
|
input.sound必填 | boolean | 必填。该参数用于指定生成的视频是否包含声音(布尔值:true/false) |
input.aspect_ratio必填 | string | 必填。该参数用于定义视频的画面比例 可选值: |
input.duration必填 | string | 必填。视频时长(单位:秒) 可选值: |
请求示例
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling-2.6/text-to-video",
"input": {
"prompt": "Scene: A fashion live-streaming sales setting, with clothes hanging on racks and the host'\''s figure reflected in a full-length mirror. Lines: [African female host] turns around to showcase the hoodie'\''s cut. [African female host, in a cheerful tone] says: \"360-degree flawless tailoring, slimming and versatile.\" She then [African female host] leans closer to the camera. [African female host, in a lively tone] says: \"Double-sided fleece fabric, $30 off immediately when you order now.\"",
"sound": false,
"aspect_ratio": "1:1",
"duration": "5"
}
}'返回值与错误
HTTP 200
请求成功
| 参数 | 类型 | 说明与限制 |
|---|---|---|
code可选 | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). 可选值: |
msg可选 | string | Response message, error description upon failure |
data必填 | object | |
data.taskId必填 | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
任务状态与回调
异步任务请保存返回的 taskId。调用 GET /api/v1/jobs/recordInfo?taskId=... 查询,或在创建时设置 callBackUrl。只有任务所属账号可以查询任务或基于任务创建派生资源。
超时可能表示请求已经受理。请在控制台查看原请求,不要自动新建任务。回调可能重试并重复到达,请使用 X-VezAPI-Event-Id 去重。
文件、日志与计费
生成媒体通常随上游保留 14 天,上传文件在 24 小时后失效。请在过期前保存所需文件。VezAPI 仅流式转发已登记资源,不提供永久作品库。请求日志保留两个自然月。
调用前预留积分,最终按实际优惠扣分 1:1 结算。用量不明时暂停新付费请求。若保护其他任务预留后余额不足以结算,会保留待结算记录,补足余额后再扣费;模型用量不会将钱包扣成负数。按时长计价的输入文件由服务端读取时长,读取失败时不提交模型任务。
使用你的 VezAPI 密钥发送请求。成功生成将消耗账号积分。
/api/v1/jobs/createTask返回结果将在这里显示。
Kling 2.6 API 价格
下方费率为参考估算,最终按实际优惠扣分 1:1 结算。按标准充值包换算,1,000 积分约为 10 美元,大额充值包可降低每积分实际单价。
| 规格 | 积分 | 计价单位 | 美元参考 |
|---|---|---|---|
| kling 2.6, text-to-video, with audio-10.0s | 252 | 每个视频 | $2.52 |
| kling 2.6, text-to-video, without audio-10.0s | 126 | 每个视频 | $1.26 |
| kling 2.6, text-to-video, without audio-5.0s | 63 | 每个视频 | $0.63 |
| kling 2.6, text-to-video, with audio-5.0s | 126 | 每个视频 | $1.26 |
| kling 2.6, image-to-video, without audio-10.0s | 126 | 每个视频 | $1.26 |
| kling 2.6, image-to-video, with audio-10.0s | 252 | 每个视频 | $2.52 |
| kling 2.6, image-to-video, with audio-5.0s | 126 | 每个视频 | $1.26 |
| kling 2.6, image-to-video, without audio-5.0s | 63 | 每个视频 | $0.63 |