阿里云官方 Wan3.0 页面仅列出
wan3.0-video。对于特定内容请求,请在 Direct 资源组中选择 AnyFast 特有的 wan3.0-video-nsfw,并将 parameters.prompt_extend 设为 false。- 文生视频
- 首帧生视频
- 首尾帧生视频
- 多模态参考
- 文件或网页参考
- 查询任务
创建任务
POST /v1/video/generationscURL
curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan3.0-video",
"input": {
"prompt": "一只小猫在月光下的屋顶奔跑,远处霓虹灯闪烁,电影感光影和平滑跟拍镜头。"
},
"parameters": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 8,
"audio": true,
"prompt_extend": true,
"seed": 42,
"watermark": false
}
}'
请求头
请求体
AnyFast 模型 ID。使用
wan3.0-video,或在 Direct 资源组中使用 AnyFast 特有的 wan3.0-video-nsfw 变体。阿里云官方页面仅列出标准模型。创建响应
200
{
"id": "asyntask_wan30example123",
"task_id": "asyntask_wan30example123",
"object": "video",
"model": "wan3.0-video",
"status": "queued",
"progress": 0,
"created_at": 1787280000
}
创建任务
POST /v1/video/generationscURL
curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan3.0-video",
"input": {
"prompt": "墙上的涂鸦人物走出来开始充满活力地说唱,镜头逐渐推近。",
"media": [
{
"type": "first_frame",
"url": "https://example.com/first-frame.png"
}
]
},
"parameters": {
"resolution": "1080P",
"ratio": "adaptive",
"duration": 5,
"audio": true,
"prompt_extend": true,
"seed": 42,
"watermark": false
}
}'
请求头
请求体
必须提供且只能提供一张
first_frame 图片。帧素材不能与 reference_image、reference_video、reference_audio、file 或 link 混用。创建响应
200
{
"id": "asyntask_wan30example123",
"task_id": "asyntask_wan30example123",
"object": "video",
"model": "wan3.0-video",
"status": "queued",
"progress": 0,
"created_at": 1787280000
}
创建任务
POST /v1/video/generationscURL
curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan3.0-video",
"input": {
"prompt": "女孩从微笑逐渐变为大笑,镜头缓慢推近,背景光线由冷色转为暖色。",
"media": [
{
"type": "first_frame",
"url": "https://example.com/first-frame.jpg"
},
{
"type": "last_frame",
"url": "https://example.com/last-frame.jpg"
}
]
},
"parameters": {
"resolution": "1080P",
"ratio": "adaptive",
"duration": 5,
"audio": true,
"prompt_extend": true,
"seed": 42,
"watermark": false
}
}'
请求头
请求体
提供一张
first_frame 和一张 last_frame。它们不能与 reference_image、reference_video、reference_audio、file 或 link 混用。创建响应
200
{
"id": "asyntask_wan30example123",
"task_id": "asyntask_wan30example123",
"object": "video",
"model": "wan3.0-video",
"status": "queued",
"progress": 0,
"created_at": 1787280000
}
创建任务
POST /v1/video/generationscURL
curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan3.0-video",
"input": {
"prompt": "让 Image 1 执行 Video 1 中的动作,并让场景跟随 Audio 1 的节奏。",
"media": [
{
"type": "reference_image",
"url": "https://example.com/character.jpg"
},
{
"type": "reference_video",
"url": "https://example.com/motion.mp4"
},
{
"type": "reference_audio",
"url": "https://example.com/rhythm.mp3"
}
]
},
"parameters": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 10,
"audio": true,
"prompt_extend": true,
"seed": 42,
"watermark": false
}
}'
请求头
请求体
创建响应
200
{
"id": "asyntask_wan30example123",
"task_id": "asyntask_wan30example123",
"object": "video",
"model": "wan3.0-video",
"status": "queued",
"progress": 0,
"created_at": 1787280000
}
创建任务
POST /v1/video/generationscurl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan3.0-video",
"input": {
"prompt": "根据提供的演示文稿制作一段简洁的产品发布视频,突出设计细节和三个核心优势。",
"media": [
{
"type": "file",
"url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260806/ebapmr/glass.pptx"
}
]
},
"parameters": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 10,
"audio": true,
"prompt_extend": true,
"seed": 42,
"watermark": false
}
}'
curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan3.0-video",
"input": {
"prompt": "将该公开网页的主要内容制作成一段简洁的配音视频。",
"media": [
{
"type": "link",
"url": "https://example.com/public-product-overview"
}
]
},
"parameters": {
"resolution": "1080P",
"ratio": "16:9",
"duration": 10,
"audio": true,
"prompt_extend": true,
"seed": 42,
"watermark": false
}
}'
请求头
请求体
创建响应
200
{
"id": "asyntask_wan30example123",
"task_id": "asyntask_wan30example123",
"object": "video",
"model": "wan3.0-video",
"status": "queued",
"progress": 0,
"created_at": 1787280000
}
按 ID 查询任务
GET /v1/video/generations/{id}cURL
curl --request GET \
--url https://www.anyfast.ai/v1/video/generations/asyntask_wan30example123 \
--header 'Authorization: Bearer YOUR_API_KEY'
请求头
路径参数
阿里云官方说明生成通常需要 1–5 分钟,并建议约每 15 秒轮询一次。该上游典型值不是 AnyFast 的服务等级承诺,实际处理时间可能不同。任务创建后可查询 24 小时,成功结果 URL 的有效期同样为 24 小时。
查询响应
200
{
"code": "success",
"message": "",
"data": {
"task_id": "asyntask_wan30example123",
"action": "generate",
"status": "SUCCESS",
"fail_reason": "https://example.com/generated-video.mp4",
"result_url": "https://example.com/generated-video.mp4",
"submit_time": 1787280000,
"start_time": 1787280005,
"finish_time": 1787280125,
"progress": "100%",
"request_id": "request_wan30example123",
"data": {
"output": {
"end_time": "2026-08-21 08:02:05.000",
"orig_prompt": "一只小猫在月光下的屋顶奔跑,远处霓虹灯闪烁。",
"scheduled_time": "2026-08-21 08:00:05.000",
"submit_time": "2026-08-21 08:00:00.000",
"task_id": "upstream_task_wan30example123",
"task_status": "SUCCEEDED",
"video_url": "https://example.com/generated-video.mp4"
},
"request_id": "upstream_request_wan30example123",
"usage": {
"SR": 1080,
"duration": 8,
"fps": 30,
"input_video_duration": 0.0,
"output_video_duration": 8.0,
"ratio": "16:9",
"video_count": 1
}
}
}
}
兼容字段。部分成功响应会像上例一样在此重复
result_url;非空值不代表任务失败。请根据 status 判断结果,并从 result_url 读取生成地址。FAILURE 状态下此字段可能包含失败详情。媒体限制
图片
- 用途:
first_frame、last_frame和reference_image。 - 格式:JPEG、JPG、不含透明通道的 PNG、BMP 或 WEBP。
- 每边 240–8,000 px,宽高比不得超过 8:1,单张图片不得超过 20 MB。
- 支持公开 HTTP 或 HTTPS URL 和 Base64 data URI。首帧最多 1 张、尾帧最多 1 张、参考图最多 10 张。
视频
- 用途:
reference_video;最多 5 段,总时长不超过 15 秒。 - 格式:MP4 或 MOV。单段 1–15 秒,每边 240–4,096 px,宽高比不得超过 8:1,单个文件不得超过 100 MB。
- 视频必须使用公开 HTTP 或 HTTPS URL。
音频
- 用途:
reference_audio;最多 5 段,总时长不超过 15 秒。 - 格式:WAV 或 MP3。单段 1–15 秒,单个文件不得超过 15 MB。
- 音频必须使用公开 HTTP 或 HTTPS URL。
文件和网页
file支持 DOCX、DOC、XLSX、XLS、PPTX、PPT、PDF、TXT、KEY、PAGES、NUMBERS 和 MD,文件不得超过 100 MB。- PDF、DOCX、DOC、PPTX、PPT、KEY 和 PAGES 最多支持 50 页。
link支持无需登录即可访问的公开 HTTP 或 HTTPS 网页。- 最多提供一个
file或一个link,两者互斥。
reference_image、reference_video、reference_audio、file 和 link 不能与 first_frame 或 last_frame 出现在同一个请求中。