> ## Documentation Index
> Fetch the complete documentation index at: https://docs.token.poryf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 可灵 3.0

> 快手可灵视频模型，文生视频与图生视频的参数和示例。

快手可灵视频模型，支持文生视频、首帧 / 首尾帧图生视频，可同步生成音频。

* 模型 ID：`kling-3.0`
* 接口：`POST https://token.poryf.com/v1/videos`（异步任务）
* [查看价格](https://token.poryf.com/pricing/kling-3.0) · [在线试用](https://token.poryf.com/model-guide/kling-3.0)（登录后，按自己的余额扣费）

## 请求参数

<ParamField header="Authorization" type="string" required>
  `Bearer YOUR_API_KEY`，在 [控制台的 API 密钥页](https://token.poryf.com/keys) 创建。
</ParamField>

<ParamField body="model" type="string" required>
  `kling-3.0`
</ParamField>

<ParamField body="prompt" type="string">
  画面与运动描述。文生视频必填；图生视频可选。
</ParamField>

<ParamField body="seconds" type="integer" default="5">
  时长：3–15 秒的整数，默认 5。
</ParamField>

<ParamField body="resolution" type="string" default="720P">
  `720P` 或 `1080P`。
</ParamField>

<ParamField body="aspect_ratio" type="string">
  `16:9`、`9:16`、`1:1`。只对文生视频生效；图生视频的比例跟随首帧图片。
</ParamField>

<ParamField body="audio" type="boolean" default="false">
  是否同步生成音频。支持，720P 和 1080P 都可以。
</ParamField>

<ParamField body="input_reference" type="string | string[]">
  首帧图片的公网 URL。传两张时，第一张为首帧，第二张为尾帧。
</ParamField>

<ParamField body="negative_prompt" type="string">
  不希望出现的内容。
</ParamField>

<ParamField body="seed" type="integer">
  随机种子。
</ParamField>

## 示例：文生视频

```bash theme={null}
curl https://token.poryf.com/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-3.0",
    "prompt": "清晨的海边，一只柯基在沙滩上奔跑，镜头缓慢跟随",
    "seconds": 5,
    "resolution": "720P",
    "aspect_ratio": "16:9"
  }'
```

## 示例：首尾帧图生视频

```bash theme={null}
curl https://token.poryf.com/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-3.0",
    "prompt": "花朵从含苞到完全绽放",
    "seconds": 5,
    "input_reference": [
      "https://example.com/first.jpg",
      "https://example.com/last.jpg"
    ]
  }'
```

## 响应

提交成功后返回任务对象（示例结构）：

```json theme={null}
{
  "id": "task_xxxxxxxx",
  "object": "video",
  "status": "queued",
  "progress": 0
}
```

拿到 `id` 后，按 [视频通用说明](/api/videos/overview#查询进度) 查询进度并下载视频。

## 计费

按秒计费，按分辨率（720P / 1080P）和是否有声分四档。提交时按请求的时长和分辨率预扣，任务失败自动全额退回。

<Warning>
  * 首帧、尾帧只接受公网可访问的 `http(s)` 图片 URL，不支持上传文件或 Base64。
  * 视频约 7 天内可以下载，过期后返回 `410 artifact_gone`，请及时下载转存。
</Warning>

实时单价见 [模型广场](https://token.poryf.com/pricing)。任务状态、下载方式和常见错误见 [视频通用说明](/api/videos/overview)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.