跳转到主要内容
POST
/
v1
/
video
/
generations
创建文生视频任务
curl --request POST \
  --url https://www.anyfast.ai/v1/video/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "wan2.2-t2v-a14b",
  "prompt": "一只猫在弹钢琴",
  "duration": 5,
  "width": 123,
  "height": 123,
  "seed": 123,
  "metadata": {}
}
'
{
  "task_id": "<string>",
  "status": "<string>"
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
model
enum<string>
必填

模型 ID

可用选项:
wan2.2-t2v-a14b
示例:

"wan2.2-t2v-a14b"

prompt
string
必填

视频描述文字。

示例:

"一只猫在弹钢琴"

duration
number
默认值:5

视频时长(秒),3–5。

必填范围: 3 <= x <= 5
示例:

5

width
integer

输出视频宽度(像素)。

height
integer

输出视频高度(像素)。

seed
integer

随机种子,用于复现结果。

metadata
object

透传至上游 API 的扩展参数。

响应

任务创建成功

task_id
string

任务 ID,用于轮询状态。

status
string

初始状态(queued)。