跳转到主要内容
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": "doubao-seedance-1-0-lite-t2v-250428",
  "content": [
    {
      "type": "text",
      "text": "<string>"
    }
  ],
  "ratio": "16:9",
  "resolution": "720p",
  "duration": 5,
  "watermark": false,
  "seed": 123,
  "camera_fixed": false
}
'
{
  "id": "gen-abc123",
  "model": "doubao-seedance-1-0-lite-t2v-250428",
  "status": "processing",
  "created_at": 1773130665
}

授权

Authorization
string
header
必填

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

请求体

application/json
model
enum<string>
必填

模型 ID

可用选项:
doubao-seedance-1-0-lite-t2v-250428
示例:

"doubao-seedance-1-0-lite-t2v-250428"

content
object[]
必填

多模态内容数组。必须包含 text 项。图生视频时添加带 role 的 image_url 项。

Minimum array length: 1
ratio
enum<string>
默认值:16:9

画面比例。adaptive 支持情况因模型而异。

可用选项:
16:9,
4:3,
1:1,
3:4,
9:16,
21:9,
adaptive
示例:

"16:9"

resolution
enum<string>
默认值:720p

输出分辨率。

可用选项:
480p,
720p,
1080p
示例:

"720p"

duration
integer
默认值:5

视频时长(秒),2-12 秒。

必填范围: 2 <= x <= 12
示例:

5

watermark
boolean
默认值:false

是否添加水印。

seed
integer

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

camera_fixed
boolean
默认值:false

是否固定摄像头。

响应

任务已创建

id
string
示例:

"gen-abc123"

model
string
示例:

"doubao-seedance-1-0-lite-t2v-250428"

status
string
示例:

"processing"

created_at
integer
示例:

1773130665