cURL
curl --request POST \ --url https://www.anyfast.ai/v1/video/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "wan2.2-i2v-a14b", "image": "https://example.com/reference.jpg", "prompt": "相机缓慢推进", "duration": 5, "width": 123, "height": 123, "seed": 123 } '
{ "task_id": "<string>", "status": "<string>" }
根据参考图片和文本描述生成视频。为异步任务——提交后通过 GET /v1/video/generations/{task_id} 轮询状态,直到 status 为 succeeded。
GET /v1/video/generations/{task_id}
status
succeeded
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
模型 ID
wan2.2-i2v-a14b
"wan2.2-i2v-a14b"
参考图片的公网 URL。
"https://example.com/reference.jpg"
视频描述文字(可选,用于引导生成方向)。
"相机缓慢推进"
视频时长(秒),3–5。
3 <= x <= 5
输出视频宽度(像素)。
输出视频高度(像素)。
随机种子,用于复现结果。
任务创建成功
任务 ID,用于轮询状态。