API 参考
Wan 视频 API 快速开始
API 使用和网页版相同的模型、价格和退款规则。每次生成都是一个异步任务:先提交,再轮询(或接收回调),直到视频生成完成。
获取 API 密钥Wan 3 API 团队 ·
接口地址
https://api.wan3api.org/v11. 创建 API 密钥
登录后,系统会在「开始使用」页面自动为你创建第一个密钥。新账号赠送免费调用(限最低价参数)用于测试接入,之后可购买一次性积分包充值。
shell
export API_KEY="sk-..."2. 提交任务
向 /videos/generations 发送 POST 请求和提示词,会立即返回任务 ID 和扣除的积分。
curl -X POST "https://api.wan3api.org/v1/videos/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "wan-3",
"prompt": "A red fox runs through fresh snow at sunrise, slow motion, cinematic",
"duration": 5,
"resolution": "480P",
"aspect_ratio": "16:9"
}'3. 等待视频
每隔几秒请求 GET /tasks/:id,或传入 callback_url 由我们把完成的任务 POST 给你。大多数视频一到三分钟完成。
# Poll every few seconds until status is "succeeded" or "failed".
curl "https://api.wan3api.org/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $API_KEY"
# Then download the video.
curl -L -o video.mp4 "$VIDEO_URL"4. 下载视频
status 为 succeeded 时,video_url 就是 MP4 地址。文件已复制到我们的存储,不会像上游链接那样一小时后失效。
json
{
"id": "3f1c9a52-6d1e-4c1b-9a77-2f4d8f0c9e10",
"object": "video.generation",
"model": "wan-3",
"mode": "text",
"status": "succeeded",
"progress": 100,
"prompt": "A red fox runs through fresh snow at sunrise, slow motion, cinematic",
"duration": 5,
"resolution": "480P",
"aspect_ratio": "16:9",
"video_url": "https://api.wan3api.org/api/video/media/video/outputs/…/3f1c9a52.mp4",
"credits": 15,
"refunded": false,
"error": null,
"source": "api",
"created_at": "2026-11-01T08:00:00.000Z",
"completed_at": "2026-11-01T08:00:41.000Z"
}