Wan 2.6
curl --request POST \
--url https://apistable.ai/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-2.6",
"input": {
"prompt": "A paper boat drifting on a calm pond at sunrise, gentle ripples",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan-2.6',
input: {
prompt: 'A paper boat drifting on a calm pond at sunrise, gentle ripples',
resolution: '720p',
duration: 5,
aspect_ratio: '16:9'
}
})
};
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-2.6",
"input": {
"prompt": "A paper boat drifting on a calm pond at sunrise, gentle ripples",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
}
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 2.6
通过文本或首帧图片生成 5、10 或 15 秒的 720p/1080p 视频,音频包含在同一每秒费率内。
POST
/
api
/
v1
/
tasks
/
create_task
Wan 2.6
curl --request POST \
--url https://apistable.ai/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-2.6",
"input": {
"prompt": "A paper boat drifting on a calm pond at sunrise, gentle ripples",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan-2.6',
input: {
prompt: 'A paper boat drifting on a calm pond at sunrise, gentle ripples',
resolution: '720p',
duration: 5,
aspect_ratio: '16:9'
}
})
};
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-2.6",
"input": {
"prompt": "A paper boat drifting on a calm pond at sunrise, gentle ripples",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
}
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
}参数与输入模式
传入model 与 input 即可选择文生视频或首帧图生视频,两种方式均可附加自定义音轨;各字段默认值、取值范围与素材限制见下方 Body 参数列表。
nsfw_check=true 启用本站筛查,否则跳过。
| 请求场景 | input 必填字段 |
|---|---|
| 文生视频 | prompt |
| 首帧图生视频 | first_frame_url(prompt 可选;须省略 aspect_ratio) |
| 自定义音轨(可选附加) | 在任一工作流中附加 reference_audio_urls(优先于 generate_audio) |
使用场景
将以下示例提交到POST /api/v1/tasks/create_task。首帧示例使用已托管的样本图;请将 cdn.example.com 占位音频链接替换为符合下方 Body 限制的公网 HTTPS 音频直链。
{
"model": "wan-2.6",
"input": {
"prompt": "A paper boat drifting on a calm pond at sunrise, gentle ripples",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
}
{
"model": "wan-2.6",
"input": {
"first_frame_url": "https://files.apistable.ai/examples/wan/v2/inputs/wan27-boat-keyframes-input-0.jpg",
"prompt": "Slow camera push-in as golden sunrise light ripples across the water.",
"resolution": "1080p",
"duration": 5
}
}
{
"model": "wan-2.6",
"input": {
"prompt": "Opening shot glides along rain-slicked cobblestones before cutting to a warm cafe window.",
"reference_audio_urls": [
"https://cdn.example.com/narration-10s.mp3"
],
"resolution": "720p",
"duration": 10,
"aspect_ratio": "16:9",
"shot_type": "multi",
"prompt_extend": true
}
}
使用创建任务响应中的data.task_id通过 查询任务 或callback_url(Webhook 安全与验签)获取结果;鉴权见 快速开始,提交错误见 创建任务。转存视频链接保留 14 天;超过 24 小时仍未完成的任务将进入超时清理且不扣费。
试用与价格
每次请求生成 1 条视频,按所选分辨率的每秒费率乘以请求输出秒数计费,原生声音与自定义音频均不另收费。失败任务扣费为 0。余额查询见 查询积分余额。| 分辨率 | 积分 / 秒 | 美元 / 秒 |
|---|---|---|
720p(默认) | 13.0 | $0.065 |
1080p | 21.0 | $0.105 |
在线试用
在工作台测试文生视频、首帧图生与音频选项。
查看价格
查看 720p 与 1080p 秒价、充值折合价与竞品对比。
授权
登录 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-2.6",
"status": "succeeded",
"created_at": "2026-11-24T08:30:00.000Z",
"completed_at": "2026-11-24T08:31:45.000Z",
"duration": 105000,
"charged_credits": 65,
"message": "",
"input": "{\"prompt\":\"A paper boat drifting on a calm pond at sunrise, gentle ripples\",\"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 接收结果。