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

# Wan 3.0 Video API：新一代文生视频与图生视频模型

> Wan 3.0 视频生成 API，支持文生视频、图生视频、多模态引用和视频扩展

## 概览

Wan 3.0 Video 可根据提示、第一帧或第一帧和最后一帧图像以及多模态参考输入生成视频。同时支持从公共 MP4 URL 或 APIXO 帐户中最近的 Wan 3.0 任务扩展视频。

| 功能 | 值 |
| - | - |
| 模型 ID | `wan-3-0-video` |
| 模式 | `text-to-video`, `image-to-video`, `reference-to-video`, `video-extend` |
| 提示词 | `text-to-video` 和 `video-extend` 模式需要提供相关输入 |
| 可选分辨率 | `480p`, `720p`, `1080p` |
| 纵横比 | `auto`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` |
| 时长 | 持续时间范围为 `2` 到 `30` 秒，默认为 `5` 秒。智能持续时间（`-1`）适用于其他三种模式。 |
| 图生视频图像 | 1-2 图像 URL；第二张图像是可选的最后一帧 |
| 参考输入 | 最多支持 10 个图像 URL、5 个视频 URL、5 个音频 URL、1 个文件 URL 或 1 个链接 URL |
| 视频扩展源 | 支持一个公共 HTTPS MP4 URL 或一个有效的 `task_id`。最大源长度为 90 秒。 |
| 结果格式 | MP4 URL 数组位于 `resultJson.resultUrls` 中 |

## 请选择 Wan 3.0 端点。

所有三个端点均支持文生视频、第一帧或第一帧与最后一帧的图生视频，以及参考生成视频。使用 `wan-3-0-video` 作为 `video-extend` 的参数。

| 端点 | 输出分辨率 | 参考视频输入 |
| - | - | - |
| [Wan 3.0 Video](https://apixo.ai/docs/zh/models/video/wan-3-0-video.md) | `480p`, `720p`, `1080p` | 支持图片、视频、音频，最多可附加一个文件 URL 或一个网页链接；文件与链接输入互斥。 |
| [Wan 3.0 Video LoRA](https://apixo.ai/docs/zh/models/video/wan-3-0-video-lora.md) | `480p`, `720p`, `1080p` | 图像、视频和音频；无 `file_urls` 或 `link_urls` |
| [Wan 3.0 Video Pro LoRA](https://apixo.ai/docs/zh/models/video/wan-3-0-video-pro-lora.md) | `1080p`, `2k`, `4k` | 图像、视频和音频；无 `file_urls` 或 `link_urls` |

有关工作流程选择，请参阅 [Wan 3.0 Video、LoRA 和 Pro LoRA 比较](https://apixo.ai/blog/wan-3-0-video-vs-lora-vs-pro-lora)。即使两个端点提供相同的分辨率，也使用 [API 定价](https://apixo.ai/pricing/api) 中所选端点的速率。

## 接口与身份验证

API 基础地址：

```text theme={null}
https://api.apixo.ai/api/v1
```

| 方法 | 端点 | 用途 |
| - | - | - |
| `POST` | `/generateTask/wan-3-0-video` | 提交生成任务 |
| `GET` | `/statusTask/wan-3-0-video?taskId={taskId}` | 查询任务状态并获取结果 |

每个请求都必须携带 APIXO API 密钥：

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

提交任务时，还需要设置以下请求头：

```http theme={null}
Content-Type: application/json
```

## 异步请求示例

以下示例提交一个最简单的文生视频任务，响应中会返回 `taskId`。

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-3-0-video" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-video",
      "prompt": "a cinematic product reveal with smooth camera movement and premium studio lighting",
      "resolution": "480p",
      "aspect_ratio": "auto",
      "duration": 5,
      "sound": true
    }
  }'
```

成功响应：

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
```

保存 `taskId`，后续轮询结果时需要用到它。

## 轮询结果

```bash theme={null}
curl -X GET "https://api.apixo.ai/api/v1/statusTask/wan-3-0-video?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

任务处理中的响应示例：

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing",
    "createTime": 1767965610929
  }
}
```

成功响应：

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/video.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965790929,
    "costTime": 180000
  }
}
```

任务失败时的响应示例：

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "failed",
    "failCode": "UPSTREAM_ERROR",
    "failMsg": "Generation failed",
    "createTime": 1767965610929,
    "completeTime": 1767965620132
  }
}
```

等 `state` 变为 `success` 后，再解析 `resultJson`：

```javascript theme={null}
const payload = JSON.parse(data.resultJson);
const videoUrls = payload.resultUrls;
```

## 请求体

### 文生视频

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "text-to-video",
    "prompt": "a serene lake at sunrise with a slow cinematic camera move",
    "resolution": "480p",
    "aspect_ratio": "16:9",
    "duration": 6,
    "sound": true,
    "watermark": false
  }
}
```

### 图生视频

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "image-to-video",
    "prompt": "animate this portrait with subtle head movement and cinematic lighting",
    "image_urls": [
      "https://example.com/first-frame.png",
      "https://example.com/last-frame.png"
    ],
    "resolution": "720p",
    "aspect_ratio": "auto",
    "duration": 5,
    "sound": true
  }
}
```

### 参考生成视频

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "reference-to-video",
    "prompt": "keep the subject identity and create a natural speaking video",
    "image_urls": [
      "https://example.com/person.png"
    ],
    "video_urls": [
      "https://example.com/motion-reference.mp4"
    ],
    "file_urls": [
      "https://example.com/profile.pdf"
    ],
    "resolution": "720p",
    "aspect_ratio": "auto",
    "duration": -1,
    "sound": true,
    "watermark": false
  }
}
```

### 视频延伸

使用同一账户下已成功完成的 Wan 3.0 Video 任务返回的 `data.taskId`。结果文件仍可访问时，可在完成后 15 天内续写。旧任务如未记录完成时间，则从创建时算起。续写生成的视频还可以再次续写。

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "video-extend",
    "task_id": "0123456789abcdef0123456789abcdef",
    "prompt": "Brilliant fireworks continue to bloom over the mountain.",
    "duration": 5,
    "resolution": "720p"
  }
}
```

要扩展您托管的视频文件，请将 `task_id` 替换为 `"video_urls": ["https://example.com/source.mp4"]`。无论采用何种输入方式，原始 MP4 文件最长支持90秒。生成结果将保留原始视频和音频，并追加生成的延续内容。修剪重叠帧可能导致结果长度略短于两个视频片段的总和。

## 参数

**request\_type** `string` (default: async)

指定如何获取结果。省略此字段或设为 `async` 时，可通过 `statusTask` 轮询；设为 `callback` 时，通过 Webhook 接收。

**callback\_url** `string`

当 `request_type` 为 `callback` 时必填。请提供公网可访问的 HTTPS 地址，用于接收任务的最终结果。详见 [Webhook](https://apixo.ai/docs/zh/api-reference/webhooks.md)。

**input** `object` *required*

Wan 3.0 Video 的输入参数。

**属性**

**mode** `string` *required*

生成模式。可选值为 `text-to-video`、`image-to-video`、`reference-to-video`、`video-extend`。

**prompt** `string`

提示文字。对于 `text-to-video` 和 `video-extend` 是必需的。视频扩展的最大长度为 19986 个字符，其他模式的最大长度为 20000 个字符。

**resolution** `string` (default: 1080p)

输出分辨率档位。可选值为 `480p`、`720p`、`1080p`。

**aspect\_ratio** `string` (default: auto)

输出纵横比。支持的值：`auto`、`16:9`、`4:3`、`1:1`、`3:4`、`9:16`。使用 `aspect_ratio`，而不是 `ratio`。

**duration** `integer|string` (default: 5)

对于 `video-extend`，请求的从 `2` 到 `30` 的连续长度（以整秒为单位）。其他模式也支持 `-1` 表示智能时长。

**sound** `boolean` (default: true)

生成的视频或续集是否应包含音频。视频扩展保留源音频。

**watermark** `boolean` (default: false)

是否添加水印。

**seed** `integer`

对于其他模式，可选种子范围为 `0` 到 `2147483647`。视频扩展始终使用随机种子。

**image\_urls** `string[]`

图像 URL。`image-to-video` 模式下需提供 1-2 张图像，其中 `image_urls[0]` 为第一帧，`image_urls[1]` 为可选的最后一帧；`reference-to-video` 模式下最多支持 10 张图像，为可选。每张图像的宽高必须在 240 至 8000 像素之间（含边界值）。

**video\_urls** `string[]`

在 `reference-to-video` 中，提供最多 5 个参考视频，每个视频时长 1–15 秒，总计最多 15 秒。在 `video-extend` 中，提供一个可公开访问且可直接下载的 HTTPS MP4，最长可达 90 秒，或使用 `task_id` 代替。

**task\_id** `string`

`video-extend` 的源任务 ID 需要来自同一账户的已成功 Wan 3.0 Video 任务，且结果在最近 15 天内可用。提供 `task_id` 或 `video_urls` 其中一项。

**audio\_urls** `string[]`

`reference-to-video` 的参考音频 URL。如果提供，最多支持 5 个 URL。每个音频文件必须为 1–15 秒，总参考音频时长不得超过 15 秒。音频不单独计费。

**file\_urls** `string[]`

`reference-to-video` 的文件输入。最多支持 1 个 URL。不能与 `link_urls` 同时使用。

**link\_urls** `string[]`

`reference-to-video` 的网页链接输入。最多支持 1 个 URL。不能与 `file_urls` 同时使用。

**nsfw\_checker** `boolean` (default: false)

设为 `true` 可在支持的生成路由上启用上游内容审核。API 默认值为 `false`。

| 模式 | 所需输入 | 不支持的媒体字段 | 计费说明 |
| - | - | - | - |
| `text-to-video` | `prompt` | `image_urls`, `video_urls`, `audio_urls`, `file_urls`, `link_urls` | 按输出时长计费，单位为秒。 |
| `image-to-video` | `image_urls` 字段包含 1 到 2 张图像 | `video_urls`, `audio_urls`, `file_urls`, `link_urls` | 按输出时长计费，单位为秒。 |
| `reference-to-video` | 至少提供 `image_urls`、`video_urls`、`audio_urls`、`file_urls` 或 `link_urls` 中的一项。 | 无，但 `file_urls` 与 `link_urls` 互斥。 | 输出时长和参考视频秒数按秒计费。 |
| `video-extend` | `prompt` 以及 `task_id` 或 `video_urls` 中的一个 URL | `image_urls`, `audio_urls`, `file_urls`, `link_urls` | 请求的持续秒数按秒计费。 |

> [!TIP]
>
> 对所有媒体输入使用公共、可直接访问的 URL。在提交任务前将检查视频和音频的持续时间。

> [!TIP]
>
> 在 `reference-to-video` 中，总参考视频秒数加上正 `duration` 不能超过 30 秒。对于智能持续时间（`-1`），预扣费为输入参考秒数加上 30 输出秒。

有关选择和组合参考的指南，请参阅 [Wan 3.0 参考工作流程](https://apixo.ai/blog/wan-3-0-multimodal-reference-guide)。

## 响应格式

### 提交任务时的响应

任务受理后，`POST /generateTask/wan-3-0-video` 会返回任务 ID：

**code** `integer`

API 状态码。`200` 表示任务已受理。

**message** `string`

状态说明。

**data.taskId** `string`

任务的唯一 ID，用于查询任务状态。

### 状态响应字段

**taskId** `string`

任务的唯一标识符。

**state** `string`

当前任务状态，可能的值为 `processing`、`success`、`failed`。

**resultJson** `string`

当 `state` 为 `success` 时返回。解析此 JSON 字符串后，可从 `resultUrls` 读取生成的视频链接。

**failCode** `string`

供程序处理的错误码，仅在 `state` 为 `failed` 时返回。

**failMsg** `string`

失败原因说明，仅在 `state` 为 `failed` 时返回。

**createTime** `integer`

任务创建时的 Unix 时间戳，单位为毫秒。

**completeTime** `integer`

任务完成时的 Unix 时间戳，单位为毫秒。任务完成后返回。

**costTime** `integer`

处理耗时，以毫秒为单位。任务完成且有计时数据时返回。

**billing** `object`

最终计费明细。仅在 `wan-3-0-video` 任务以 `duration=-1` 提交且响应成功时出现。

**billing.settlementState** `string`

结算状态。对于此最终快照，该值始终为 `final`。

**billing.inputVideoSeconds** `number`

所有输入视频的总时长（以秒为单位），四舍五入到小数点后 3 位。

**billing.outputVideoSeconds** `number`

实际生成的输出视频持续时间（以秒为单位），四舍五入到小数点后 3 位。

**billing.totalBillableSeconds** `number`

最终计费持续时间（以秒为单位）。这始终是 `inputVideoSeconds + outputVideoSeconds`。

**billing.unit** `string`

时长单位，值为 `second`。

**billing.rounding** `string`

用于持续时间字段的舍入规则。值为 `round half up to 3 decimal places`。

**billing.inputVideoCount** `integer`

`inputVideoSeconds` 中包含的输入视频数量。

**billing.outputVideoCount** `integer`

`outputVideoSeconds` 中包含的输出视频数量。

## Webhook 回调模式

如果希望服务端自动收到最终结果，可以使用回调模式，无需轮询。

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-3-0-video" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "reference-to-video",
      "prompt": "create a polished product video using the references",
      "image_urls": [
        "https://example.com/ref.png"
      ],
      "resolution": "720p",
      "aspect_ratio": "auto",
      "duration": -1,
      "sound": true
    }
  }'
```

回调有效负载使用与状态轮询相同的顶级结构，包含 `code`、`message` 和 `data` 字段。成功回调包含最终的 `state` 和 `resultJson`。对于 `duration=-1` 任务，成功终端回调包含与状态轮询一致的 `data.billing` 对象。详情请参阅 [Webhooks](https://apixo.ai/docs/zh/api-reference/webhooks.md) 中的交付要求和重试行为。

## 计费

市场参考价等于标准 APIXO 价格乘以 1.30，四舍五入到小数点后三位。它们是对比值，而非实时第三方报价或实际收费金额。

新提交的非 LLM 请求按 **1 积分 = `$0.001`** 计费。先按用量和附加项目计算总额，再应用账号折扣，最后将请求总额向上取整到整数积分。如果约定了固定单价，则按该单价的原始精度计算，不再使用标准价或另行打折；最终积分仍向上取整。详见[积分换算与取整](https://apixo.ai/docs/zh/pricing.md#credit-conversion-and-rounding)。

Wan 3.0 Video 按秒计费。对于给定的 `resolution`，所有模式均使用相同的标准单价。视频扩展仅对请求的持续秒数计费。

| 模式 | 分辨率 | APIXO 官方价格 | 市场参考价 |
| - | - | - | -: |
| `text-to-video` | `480p` | `$0.05 / second` | `$0.065 / second` |
| `text-to-video` | `720p` | `$0.10 / second` | `$0.130 / second` |
| `text-to-video` | `1080p` | `$0.20 / second` | `$0.260 / second` |
| `image-to-video` | `480p` | `$0.05 / second` | `$0.065 / second` |
| `image-to-video` | `720p` | `$0.10 / second` | `$0.130 / second` |
| `image-to-video` | `1080p` | `$0.20 / second` | `$0.260 / second` |
| `reference-to-video` | `480p` | `$0.05 / second` | `$0.065 / second` |
| `reference-to-video` | `720p` | `$0.10 / second` | `$0.130 / second` |
| `reference-to-video` | `1080p` | `$0.20 / second` | `$0.260 / second` |
| `video-extend` | `480p` | `$0.05 / second` | `$0.065 / second` |
| `video-extend` | `720p` | `$0.10 / second` | `$0.130 / second` |
| `video-extend` | `1080p` | `$0.20 / second` | `$0.260 / second` |

计费公式：

| 请求 | 公式 |
| - | - |
| `text-to-video` 或 `image-to-video` 且 `duration` 为正数 | `duration * unitPrice` |
| `reference-to-video` 且 `duration` 为正数 | `(input video seconds + duration) * unitPrice` |
| `video-extend` | `duration * unitPrice`。按标准费率，延长 5 秒 `720p` 的费用为 `$0.50`。 |
| 智能持续时间 (`duration = -1`) | 预扣费用为 `(input video seconds + 30) * unitPrice`；任务成功后，最终计费秒数为 `input video seconds + actual output seconds`，差额将退还。 |

输入图像、音频文件、文件和链接不会增加单独的计费秒数。

对使用 `duration=-1` 的任务，成功结束后的响应会在 `data.billing` 中返回最终结算秒数。以下示例假设参考视频为 5.371 秒、输出视频为 10.042 秒，用于说明计费明细，并非任务实测结果。

```json theme={null}
{
  "billing": {
    "settlementState": "final",
    "inputVideoSeconds": 5.371,
    "outputVideoSeconds": 10.042,
    "totalBillableSeconds": 15.413,
    "unit": "second",
    "rounding": "round half up to 3 decimal places",
    "inputVideoCount": 1,
    "outputVideoCount": 1
  }
}
```

`billing` 中的时长均以秒为单位，四舍五入至小数点后三位。`inputVideoSeconds` 是所有输入视频的总时长，`inputVideoCount` 是计入总时长的视频个数，`outputVideoSeconds` 是实际生成的视频时长。`totalBillableSeconds` 始终等于 `inputVideoSeconds + outputVideoSeconds`。未提供输入视频时，`inputVideoSeconds` 为 `0.000`，`inputVideoCount` 为 `0`。只有最终结算成功后才会返回此 `billing` 对象，成功回调中也会包含它。重复轮询会得到相同的值。

如果没有参考视频，输入视频秒数为零。视频参考仍然需要至少一个受支持的参考输入。对于`duration=-1`，30输出秒数是预扣费基础，而不是承诺的输出长度。最终费用为`(input video seconds + actual output seconds) * unitPrice`；使用 `data.billing.settlementState=final` 的成功响应来确定秒数。

例如，使用记录的 `1080p` 基础速率 `$0.20/second`，一个 5 秒参考视频和固定 10 秒输出成本 `$3.00`。当 `duration=-1` 时，相同输入的初始费用为 `(5 + 30) * $0.20 = $7.00`。如果输出成功为 10 秒，则最终费用为 `$3.00`，退还差额为 `$4.00`。这些是算术示例，而不是测量的生成结果。

有关预算演练，请参阅 [Wan 3.0 持续时间和成本指南](https://apixo.ai/blog/wan-3-0-duration-and-cost)。其美元示例使用标准 Wan 3.0 Video 费率；检查 [API 定价](https://apixo.ai/pricing/api) 以了解所选端点的当前费率。API 使用量以 USD 计费，与 Studio 每月积分分开计费。

最新的美元费率见 [API 价目表](https://apixo.ai/pricing/api)。

## 延迟与轮询

Wan 3.0 Video 任务是异步的。实际延迟可能因提示复杂性、持续时间、参考媒体可访问性、分辨率、路由队列负载和生成时间而异。

| 工作量 | 通常生成耗时 | 建议首次查询时间 | 轮询间隔 |
| - | - | - | - |
| 文本转视频或图像转视频 | 因提示、分辨率和持续时间而异 | 任务创建 60 秒后 | 10s-15s |
| 带有图像、视频、音频、文件或链接输入的视频参考 | 通常比简单生成耗时更长 | 任务创建 60 至 90 秒后 | 10s-15s |

> [!TIP]
>
> 生产环境建议使用回调，避免在视频生成期间频繁轮询。

结果链接有时效。任务完成后，请尽快下载并保存重要文件。

请求频率和并发上限因账号、API 密钥和路由而异。收到 `429` 时，请降低请求频率，逐步延长重试间隔。账号级限制见[系统 API](https://apixo.ai/docs/zh/api-reference/system.md)。

## 错误与排查

### HTTP 错误

| 代码 | 含义 | 处理方式 |
| - | - | - |
| `400` | 请求体无效、缺少 `input`、不受支持的 `mode`、缺少所需的 `prompt` 或媒体、无效的 `resolution`、无效的 `aspect_ratio`、无效的 `duration` 或无效的媒体数组 | 在重试前修复请求 |
| `401` | 缺少 API 密钥，或密钥无效 | 检查 `Authorization` 请求头 |
| `402` | 余额或配额不足 | 充值或更换账号或API密钥 |
| `403` | 密钥或路由无权访问该模型 | 检查权限和路由策略 |
| `404` | 轮询时未找到任务 | 检查`taskId` |
| `429` | 已达到速率或并发限制 | 按指数退避策略重试 |
| `500` | 服务器错误或未知任务失败 | 逐步延长间隔后重试 |
| `502` | 服务错误 | 逐步延长间隔后重试 |
| `504` | 服务超时 | 重试；耗时较长的任务可改用回调模式 |

### 验证说明

| 条件 | 后端行为 |
| - | - |
| 缺少 `input` | 请求会被拒绝，系统不会创建任务。 |
| 缺少 `mode` | 请求会被拒绝，系统不会创建任务。 |
| 不支持的 `mode` 值 | 请求会被拒绝，任务不会创建。可选值为 `text-to-video`、`image-to-video`、`reference-to-video`、`video-extend`。 |
| `text-to-video` 或 `video-extend` 任务中缺少 `prompt` | 请求会被拒绝，系统不会创建任务。 |
| `prompt` 字段为空（必需） | 请求会被拒绝，系统不会创建任务。 |
| 缺少 `resolution` | 默认值为 `1080p`。 |
| 不支持的 `resolution` 值 | 请求会被拒绝，任务不会创建。可选值为 `480p`、`720p`、`1080p`。 |
| 缺少 `aspect_ratio` | 默认值为 `auto`。 |
| 不支持的 `aspect_ratio` 值 | 请求在任务创建前失败。请使用 `auto`、`16:9`、`4:3`、`1:1`、`3:4` 或 `9:16` 设置比例。 |
| 使用 `ratio` 代替 `aspect_ratio` | `ratio` 不是公共 Wan 3.0 字段。请使用 `aspect_ratio`。 |
| 缺少 `duration` | 默认值为 `5`。 |
| `duration` 在 `-1` 或 `2` 到 `30` 之外，或十进制值 | 请求会被拒绝，系统不会创建任务。 |
| `image-to-video` 未提供 `image_urls` | 请求会被拒绝，系统不会创建任务。 |
| `image-to-video` 模式的图片超过 2 张 | 请求会被拒绝，系统不会创建任务。 |
| `reference-to-video` 未提供任何参考输入 | 请求会被拒绝，系统不会创建任务。 |
| `video-extend` 的源视频超过 90 秒 | 该任务在生成或充电前的媒体验证阶段失败。 |
| `file_urls`和`link_urls`一起使用 | 请求会被拒绝，系统不会创建任务。 |
| 参考视频或音频的时长不足 1 秒或超过 15 秒 | 请求会被拒绝，系统不会创建任务。 |
| 总参考视频时长或总参考音频时长超过 15 秒 | 请求会被拒绝，系统不会创建任务。 |
| 正 `duration` 加上参考视频总时长超过 30 秒 | 请求会被拒绝，系统不会创建任务。 |

### 任务失败错误码

`failCode` 表示任务失败的原因，常见值如下。

| 错误码 | 含义 | 处理方式 |
| - | - | - |
| `SensitiveContent` | 提示或输入/输出内容被安全检查拒绝 | 更改提示或参考媒体 |
| `PromptInvalid` | 提示词无效或被拒绝 | 修改提示词后重试 |
| `ImageFormatIncorrect` | 无法处理参考图像格式 | 提供公开可访问的图片直链，并使用常见图片格式 |
| `RateLimited` | 请求频率达到上限 | 按指数退避策略重试 |
| `Timeout` | 任务超时 | 稍后重试或使用回调模式 |
| `Unknown error` | 任务因未知原因失败 | 逐步延长间隔后重试，或联系支持团队并提供 `taskId` |

完整列表见[错误码](https://apixo.ai/docs/zh/api-reference/errors.md)。

## MCP 集成

[完整模型 Schema](https://apixo.ai/docs/models/schemas/video/wan-3-0-video.json) 中的 `mcp.result` 指定了结果的解析方式，`mcp.attachments` 列出支持绑定文件的字段。这些元数据供客户端集成使用，无需作为生成参数提交。附件字段为 `image_urls`, `video_urls`, `audio_urls`, `file_urls`。请保留用户指定的文件顺序。API 负责校验模型参数。

## 相关链接

* [生成 API 概览](https://apixo.ai/docs/zh/models.md)
* [视频模型](https://apixo.ai/docs/zh/models/video)
* [提交生成任务](https://apixo.ai/docs/zh/api-reference/generate-task.md)
* [查询任务状态](https://apixo.ai/docs/zh/api-reference/status-task.md)
* [Webhook](https://apixo.ai/docs/zh/api-reference/webhooks.md)
* [错误码](https://apixo.ai/docs/zh/api-reference/errors.md)
* [参数规范](https://apixo.ai/docs/zh/api-reference/parameters.md)
* [路由策略](https://apixo.ai/docs/zh/concepts/routing-strategies.md)
* [在 APIXO Playground 尝试 Wan 3.0 Video](https://apixo.ai/models/wan-3-0-video)
* [API定价](https://apixo.ai/pricing/api)


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