Wan 3.0 Prime
curl --request POST \
--url https://apistable.ai/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-3.0-prime",
"input": {
"prompt": "Morning mist drifts across a mountain lake as the camera glides forward.",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan-3.0-prime',
input: {
prompt: 'Morning mist drifts across a mountain lake as the camera glides forward.',
resolution: '720p',
aspect_ratio: '16:9',
duration: 5
}
})
};
fetch('https://apistable.ai/api/v1/tasks/create_task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.ai/api/v1/tasks/create_task"
payload = {
"model": "wan-3.0-prime",
"input": {
"prompt": "Morning mist drifts across a mountain lake as the camera glides forward.",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"task_id": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}Alibaba
Wan 3.0 Prime
支持 480p/720p/1080p 与 2–30 秒或自动时长视频生成,可同步生成声音,支持文本、首尾帧、图/视频/音频、文档及公开网页参考。
POST
/
api
/
v1
/
tasks
/
create_task
Wan 3.0 Prime
curl --request POST \
--url https://apistable.ai/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-3.0-prime",
"input": {
"prompt": "Morning mist drifts across a mountain lake as the camera glides forward.",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan-3.0-prime',
input: {
prompt: 'Morning mist drifts across a mountain lake as the camera glides forward.',
resolution: '720p',
aspect_ratio: '16:9',
duration: 5
}
})
};
fetch('https://apistable.ai/api/v1/tasks/create_task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.ai/api/v1/tasks/create_task"
payload = {
"model": "wan-3.0-prime",
"input": {
"prompt": "Morning mist drifts across a mountain lake as the camera glides forward.",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"task_id": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}生成模式
wan-3.0(Standard)与 wan-3.0-prime(Prime)共用 POST /api/v1/tasks/create_task 接口及一致的扁平 input 字段结构。请求体必填 model 与 input;input 内至少提供 prompt 或任一项素材字段。
nsfw_check 为 true 时,APIstable 在提交前审核文本和图片;视频和音频交由模型供应商按其自身策略审核。开启筛查时,文档和网页中的文本、图片也须通过提取与审核;省略或 false 时跳过本站审核。
| 生成模式 | 典型 input 字段 | 说明 |
|---|---|---|
| 文生视频 | prompt | 2–30 秒或 -1(自动);提示词最长 20,000 字符 |
| 首帧 / 首尾帧 | first_frame_url(及可选 last_frame_url) | 传 last_frame_url 时必须提供 first_frame_url;prompt 可选 |
| 多模态参考 | reference_image_urls、reference_video_urls、reference_audio_urls | 最多 10 张图、5 段视频、5 段音频;prompt 可选 |
| 文档或网页生成 | file_url 或 link_url | 文档与网页二选一(最多 1 项);根据文档或网页内容生成视频 |
省略resolution默认按1080p(最高费率)生成与计费,成本敏感时请显式传480p或720p。时长请统一使用duration(2–30或-1),传入duration_seconds会返回 HTTP 400。
请求示例
将以下任一请求体发送至POST /api/v1/tasks/create_task(请求头携带 Authorization: Bearer YOUR_API_KEY),并将示例链接替换为你自己的公网 HTTPS 直链。
{
"model": "wan-3.0-prime",
"input": {
"prompt": "Morning mist drifts across a mountain lake as the camera glides forward.",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5
}
}
{
"model": "wan-3.0-prime",
"input": {
"prompt": "The camera moves smoothly toward the cabin as dusk settles.",
"first_frame_url": "https://cdn.example.com/start.jpg",
"last_frame_url": "https://cdn.example.com/end.jpg",
"resolution": "1080p",
"aspect_ratio": "adaptive",
"duration": 6
}
}
{
"model": "wan-3.0-prime",
"input": {
"prompt": "Use the cabin porch appearance from the reference image, match the tracking pace of the reference video, and follow the rhythm of the reference audio.",
"reference_image_urls": [
"https://cdn.example.com/cabin.jpg"
],
"reference_video_urls": [
"https://cdn.example.com/camera-motion.mp4"
],
"reference_audio_urls": [
"https://cdn.example.com/beat.mp3"
],
"resolution": "720p",
"aspect_ratio": "adaptive",
"duration": 5,
"generate_audio": true
}
}
{
"model": "wan-3.0-prime",
"input": {
"file_url": "https://cdn.example.com/product-brief.pdf",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 10
}
}
{
"model": "wan-3.0-prime",
"input": {
"prompt": "Turn this launch page into a concise product showcase video.",
"link_url": "https://example.com/launch-article",
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 10
}
}
{
"model": "wan-3.0-prime",
"input": {
"prompt": "Raindrops slide down a night train window overlooking neon city streets.",
"reference_image_urls": [
"https://cdn.example.com/train-window.jpg"
],
"resolution": "720p",
"aspect_ratio": "adaptive",
"duration": -1,
"official_fallback": true
}
}
授权
登录 APIstable 后,在 API Key 管理 创建并复制密钥。
每次调用都要在 HTTP 请求头传入:
Authorization: Bearer YOUR_API_KEY
将 YOUR_API_KEY 替换为你创建的 API Key。
请求体
application/json
回调
POST{$request.body#/callback_url}Webhook
请求体
application/json
任务成功或失败后,APIstable 向创建任务时传入的 callback_url 发送 JSON POST。验签后返回 HTTP 2xx 确认接收。
用 data.status 判断生成结果。成功时为 succeeded,生成视频链接位于 data.result.urls。全部失败时为 failed,data.result 为 null,data.message 提供失败原因。
签名和去重使用 X-APIstable-Signature、X-APIstable-Timestamp 和 X-APIstable-Event-Id。详见 Webhook 安全与验签。
Webhook 请求体示例
{
"code": 200,
"msg": "success",
"data": {
"task_id": "c6adbc82-8b9a-4d6f-8b60-1114c8c4aafb",
"model": "wan-3.0-prime",
"status": "succeeded",
"created_at": "2026-11-24T08:30:00.000Z",
"completed_at": "2026-11-24T08:31:45.000Z",
"duration": 105000,
"charged_credits": 105,
"message": "",
"input": "{\"prompt\":\"Morning mist drifts across a mountain lake as the camera glides forward.\",\"resolution\":\"720p\",\"aspect_ratio\":\"16:9\",\"duration\":5}",
"result": {
"urls": [
"https://cdn.example.com/generated/wan-video.mp4"
],
"items": [
{
"id": "e7aacd19-819a-4747-bbbf-46fb6f2995a5",
"urls": [
"https://cdn.example.com/generated/wan-video.mp4"
],
"last_frame_url": null,
"draft": false,
"draft_expires_at": null
}
]
}
}
}
响应
2XX
已接收 Webhook。
响应
已受理。使用 task_id 查询任务,或通过 callback_url 接收结果。