Skip to main content
POST
/
v1
/
video
/
generations
创建视频生成任务
curl --request POST \
  --url https://www.anyfast.com.cn/v1/video/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "seedance-fast",
  "content": [
    {
      "type": "text",
      "text": "一只猫在阳光明媚的房间里弹钢琴"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/reference.jpg"
      },
      "role": "reference_image"
    }
  ],
  "generate_audio": true,
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": 5,
  "tools": [
    {
      "type": "web_search"
    }
  ],
  "watermark": false
}
'
{
  "id": "cgt-20260312231129-7db6s",
  "task_id": "cgt-20260312231129-7db6s",
  "object": "video",
  "model": "seedance-fast",
  "status": "",
  "progress": 0,
  "created_at": 1773328294
}

Authorizations

Authorization
string
header
required

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

Body

application/json
model
enum<string>
required

模型 ID

Available options:
seedance-fast
Example:

"seedance-fast"

content
object[]
required

输入内容数组,支持文本、图片、视频、音频的多种组合:

  • 文本
  • 文本(可选)+ 图片
  • 文本(可选)+ 视频
  • 文本(可选)+ 图片 + 音频
  • 文本(可选)+ 图片 + 视频
  • 文本(可选)+ 视频 + 音频
  • 文本(可选)+ 图片 + 视频 + 音频
Example:
[
{ "type": "text", "text": "一只猫在阳光明媚的房间里弹钢琴" },
{
"type": "image_url",
"image_url": {
"url": "https://example.com/reference.jpg"
},
"role": "reference_image"
}
]
generate_audio
boolean
default:true

控制生成视频是否包含同步音频。

  • true — 自动生成人声、音效和背景音乐
  • false — 无声视频
resolution
enum<string>
default:720p

输出视频分辨率。

Available options:
480p,
720p
ratio
enum<string>
default:adaptive

输出宽高比。adaptive 根据输入自动选择最合适的宽高比。

Available options:
16:9,
4:3,
1:1,
3:4,
9:16,
21:9,
adaptive
duration
integer
default:5

视频时长(秒),整数,4–15。设置为 -1 由模型自动选择合适时长。

Required range: -1 <= x <= 15
tools
object[]

模型调用的工具。当前支持联网搜索(仅文生视频)。

watermark
boolean
default:false

是否添加水印。

Response

视频生成任务已创建

id
string

任务 ID

Example:

"cgt-20260312231129-7db6s"

task_id
string

任务 ID(同 id)

Example:

"cgt-20260312231129-7db6s"

object
string
Example:

"video"

model
string
Example:

"seedance-fast"

status
string

初始为空

Example:

""

progress
integer
Example:

0

created_at
integer

Unix 时间戳

Example:

1773328294