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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Wan API - 通过 AIsa 访问阿里巴巴 Wan 视频和图像模型

> 阿里巴巴 Wan 模型 ID 指南，包括 wan3.0-video 和 Wan 2.7；视频接口兼容 DashScope（阿里云百炼）官方视频生成 API。

AIsa 是 Alibaba Cloud Key Account Partner。你可以使用一个 AIsa API Key 访问阿里巴巴 Wan 视频和图像模型。

Wan 视频兼容 DashScope（阿里云百炼）官方 API：官方 DashScope SDK 和已有的 DashScope 代码只需改 base URL 和 API Key 即可使用。Wan 视频也可以通过 AIsa 视频接口 `POST /v1/video/generations` 调用。Wan 图像模型使用 `POST /v1/images/generations` 和 `POST /v1/images/edits`。

## 支持的 Wan 模型

| 模型 ID | 类型 | 端点 | 适合 |
| - | - | - | - |
| `wan2.7-i2v` | 视频 | `/v1/video/generations` | 图生视频 |
| `wan2.7-image` | 图像 | `/v1/images/generations`、`/v1/images/edits` | 图像生成和编辑 |
| `wan2.7-image-pro` | 图像 | `/v1/images/generations`、`/v1/images/edits` | 更高质量图像和图生视频 |
| `wan2.7-r2v` | 视频 | `/v1/video/generations` | 参考图生视频 |
| `wan2.7-t2v` | 视频 | `/v1/video/generations` | 文生视频 |
| `wan3.0-video` | 视频 | `/v1/video/generations` | 文生、图生、参考生视频及编辑和续写，最长 30 秒 |

这些模型的当前价格见 [aisa.one/models](https://aisa.one/models)。

`wan3.0-video` 是一个统一的视频模型，支持文生视频、首帧和首尾帧图生视频、参考生视频、视频编辑和视频续写，最长输出 30 秒。Wan 2.7 视频模型按输入拆分：`t2v` 文生视频，`i2v` 图生视频，`r2v` 参考生视频。

## 兼容官方 DashScope API

| | 官方 DashScope | AIsa |
| - | - | - |
| Base URL | `https://dashscope.aliyuncs.com/api/v1` 或 `https://dashscope-intl.aliyuncs.com/api/v1` | `https://api.aisa.one/v1/dashscope/api/v1` |
| API Key | 百炼 API Key | AIsa API Key |

路径、请求体、返回体和错误码都与官方一致，见 [Wan 视频生成 API](https://help.aliyun.com/zh/model-studio/video-generate-edit-model/)。适用于 Wan 视频模型：`wan3.0-video`、`wan2.7-t2v`、`wan2.7-i2v` 和 `wan2.7-r2v`。

```python theme={null}
import os

import dashscope
from dashscope import VideoSynthesis

dashscope.base_http_api_url = "https://api.aisa.one/v1/dashscope/api/v1"
dashscope.api_key = os.environ["AISA_API_KEY"]

task = VideoSynthesis.async_call(
    model="wan3.0-video",
    prompt="日出时分，一只纸船漂过平静的湖面",
)
result = VideoSynthesis.wait(task)
print(result.output.task_status, result.output.video_url)
```

暂不支持：任务列表、取消任务和临时文件上传。图片、视频和音频请使用公网 URL（图片也可以用 Base64）；`oss://` 临时文件和本地文件（`file://`）不可用。

## 分辨率

默认分辨率取决于调用方式，并按默认分辨率计费：DashScope API 为 `1080P`，与官方一致；AIsa 视频接口为 `720P`。可通过 `resolution` 指定。对 Wan 3.0 和 Wan 2.7 的请求如果带 `size`，会在扣费之前被拒绝，因为这些模型不按 `size` 决定输出分辨率。

## 常用选择

| 需求 | 使用 |
| - | - |
| 一个模型覆盖所有视频输入，最长 30 秒 | `wan3.0-video` |
| 文生、图生或参考生视频 | `wan2.7-t2v`、`wan2.7-i2v` 或 `wan2.7-r2v` |
| 图像生成/编辑 | `wan2.7-image-pro` 或 `wan2.7-image` |

## 数据隐私

通过 AIsa 发出的 Wan 请求会在 AIsa 与 Alibaba Cloud 的 Key Account 企业协议下处理。如需合规文档，请[联系我们](mailto:developer@aisa.one)。

## 下一步

* [Qwen 模型](https://aisa.one/docs/zh/models/qwen.md)
* [模型目录](https://aisa.one/docs/zh/guides/models.md)
* [AI 模型价格](https://aisa.one/docs/zh/guides/pricing.md#模型)


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