New: Nano Banana 2.1Try the model
API Stock
/VIDEO/kling-4.0
视频
Kling

Kling 4.0 API

Generate 3–30 second videos with stereo audio, references, keyframes and video editing at 720p or 1080p.

  • 文本转视频
  • 图像转视频

起价

$0.171

每秒输出

15 个参数 · 4 个价格选项

Kling 4.0 在线试用

输入

Describe the scene. Use @Image1 / @Element1 for references. Required unless multiShots is supplied; mutually exclusive with multiShots.

Raw references (up to 10); address as @Image1, @Image2. Requires elements, transform or video_reference mode.

Required first frame in start_end_frame mode

Ordered middle frames (up to 8) in start_end_frame mode; at most 10 total frames

Optional last frame in start_end_frame mode

Source video for transform / video_reference. Duration is probed before charging; 3–10 seconds for transform, 3–30 for video_reference. Transform needs a short side of at least 700px.

登录后运行

运行费用将从您的余额中扣除。

输出

输出将显示在此处。

填写参数、确认费用并运行模型,结果将在此处显示。在浏览器中试用无需单独创建 API 密钥。

Kling 4.0 API 价格

选项每秒价格
Resolution: 720p · Source Video: no$0.171
Resolution: 720p · Source Video: yes$0.229
Resolution: 1080p · Source Video: no$0.256
Resolution: 1080p · Source Video: yes$0.343
1curl -X POST https://api.api-stock.com/api/v1/generation/create \
2 -H "Authorization: Bearer $API_STOCK_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "kling-4.0",
6 "input": {
7 "resolution": "720p",
8 "duration": 3,
9 "generateAudio": true,
10 "keepAudio": true
11 }
12 }'

参数

名称类型必填默认值描述
promptstring否—Describe the scene. Use @Image1 / @Element1 for references. Required unless multiShots is supplied; mutually exclusive with multiShots.
videoModestring否—Omit for pure text-to-video. Use elements for references, start_end_frame for keyframes, transform or video_reference for a source video.以下之一:elements, start_end_frame, transform, video_reference
resolutionstring否720pOutput resolution (4K is not available)以下之一:720p, 1080p
durationnumber否3Output seconds, 3–30. Ignored with source video (its probed duration is billed) or multiShots (shot durations are summed).
aspectRatiostring否—Aspect ratio; must be auto with a source video. Keyframes determine their own ratio.以下之一:auto, 16:9, 9:16, 1:1, 21:9
generateAudioboolean否trueGenerate native stereo audio (included in the price)
keepAudioboolean否truePreserve source video audio
imageUrlsstring[]否—Raw references (up to 10); address as @Image1, @Image2. Requires elements, transform or video_reference mode.
startImageIndexnumber否—1-based imageUrls index anchoring the first frame (elements mode)
elementsobject[]否—Subject elements: { description?: string, type?: image | video, imageUrls?: string[1..4], videoUrl?: string }. Up to 7, at most 3 video elements. Images and elements together: at most 15, or 14 with source video.
startFrameUrlstring否—Required first frame in start_end_frame mode
keyframeUrlsstring[]否—Ordered middle frames (up to 8) in start_end_frame mode; at most 10 total frames
endFrameUrlstring否—Optional last frame in start_end_frame mode
videoUrlstring否—Source video for transform / video_reference. Duration is probed before charging; 3–10 seconds for transform, 3–30 for video_reference. Transform needs a short side of at least 700px.
multiShotsobject[]否—2–6 scenes totalling 3–30 seconds; replaces prompt and duration. Only text-to-video and elements modes.

常见问题

Kling 4.0 的费用是多少?

Kling 4.0 通过 API Stock API 的起价为 $0.171 每秒输出。您按使用量从单个预付余额中支付——无需订阅——最终价格会根据分辨率或时长等参数浮动。

Kling 4.0 是什么时候发布的?

Kling 4.0 于 2026年10月15日 发布。它可以通过 API Stock API 使用,与其他所有模型共用同一个 API 密钥和预付余额。

如何获取 Kling 4.0 的 API 密钥?

注册 API Stock 账号,使用可用的付款方式充值,然后在控制台创建 API 密钥即可,整个过程只需几分钟,无需签订合同。同一个密钥可调用目录中的所有模型,因此无需为 Kling 4.0 单独申请密钥。

如何调用 Kling 4.0 API?

向 https://api.api-stock.com/api/v1/generation/create 发送 POST 请求,并附上您的 API 密钥和模型 ID "kling-4.0"。请求会返回一个任务 ID,您可以轮询该 ID;或者在结果准备就绪时通过 webhook 回调通知。上方的快速开始部分提供了一个可直接运行的示例。

Kling 4.0 接受哪些输入参数?

Kling 4.0 接受 15 个输入参数。参数表中列出了它们的类型、默认值和允许值。

如果 Kling 4.0 请求失败,会发生什么?

API Stock 会自动在备用提供商上重试请求。如果所有提供商都失败,费用会退还至您的余额。

我可以使用与其他模型相同的 API 密钥来调用 Kling 4.0 吗?

可以。API Stock 上的每个模型——视频、图像、音乐和聊天——共享一个 API 密钥和一个预付余额,因此您无需新的凭据即可切换到 Kling 4.0。