跳转到主要内容
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://api.foxapi.cc/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "seedance-2.0-reference-to-video",
  "prompt": "参考 @Image1 的人物造型、@Video1 的运镜节奏、@Audio1 的情绪氛围,生成一段雨夜街头表演视频",
  "image_urls": [
    "https://picsum.photos/id/64/1280/720.jpg"
  ],
  "video_urls": [
    "https://samplelib.com/lib/preview/mp4/sample-5s.mp4"
  ],
  "audio_urls": [
    "https://samplelib.com/lib/preview/mp3/sample-3s.mp3"
  ],
  "aspect_ratio": "adaptive",
  "duration": -1,
  "generate_audio": true
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "<string>",
  "object": "video.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "video"
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

Use this file to discover all available pages before exploring further.

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求体

application/json
model
string
默认值:seedance-2.0-reference-to-video
必填

seedance-2.0-reference-to-video:标准版 seedance-2.0-fast-reference-to-video:快速版

示例:

"seedance-2.0-reference-to-video"

"seedance-2.0-fast-reference-to-video"

prompt
string
必填

文本提示词,描述希望生成的视频内容。

说明:

  • 支持中英文
  • 最大 5000 字符
Required string length: 1 - 5000
示例:

"一只柯基在雨后的街道上奔跑,电影感镜头"

resolution
string
默认值:720p

输出视频分辨率

可选值:

  • 480p
  • 720p — 默认
  • 1080p — 仅标准版(seedance-2.0-{text,image,reference}-to-video)支持, Fast 变体不支持
示例:

"480p"

"720p"

"1080p"

aspect_ratio
string
默认值:adaptive

输出视频宽高比

可选值:

  • 16:94:31:13:49:1621:9
  • adaptive — 由模型自动选择(默认)
示例:

"adaptive"

duration
integer
默认值:5

输出视频时长(秒)。支持 415 的整数,或 -1 让模型自动决定。默认 5

示例:

-1

generate_audio
boolean
默认值:true

是否生成与画面同步的音频。默认为 true

示例:

true

seed
integer
默认值:-1

随机种子。-1 表示由模型自动生成;传固定整数可提升结果复现性。

示例:

-1

image_urls
string[]

参考图片 URL 列表

说明:

  • 最多 9 张,每张 ≤30MB
  • 支持 JPEG / PNG / WebP
  • 在 prompt 中用 @Image1@Image2 等引用
示例:
[
"https://picsum.photos/id/64/1280/720.jpg",
"https://picsum.photos/id/29/1280/720.jpg"
]
video_urls
string[]

参考视频 URL 列表

说明:

  • 最多 3 段,总时长 2–15 秒,总大小 <50MB
  • 支持 MP4 / MOV
  • 在 prompt 中用 @Video1@Video2 等引用
示例:
[
"https://samplelib.com/lib/preview/mp4/sample-5s.mp4"
]
audio_urls
string[]

参考音频 URL 列表

说明:

  • 最多 3 段,每段 ≤15 秒 / 15MB
  • 支持 MP3 / WAV
  • 在 prompt 中用 @Audio1@Audio2 等引用
  • 仅传音频时,至少还需要 1 个参考图片或参考视频
示例:
[
"https://samplelib.com/lib/preview/mp3/sample-3s.mp3"
]

响应

任务创建成功

created
integer

任务创建时间戳

示例:

1757165031

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

model
string

实际使用的模型名称

object
enum<string>

任务的具体类型

可用选项:
video.generation.task
progress
integer

任务进度百分比 (0-100)

必填范围: 0 <= x <= 100
示例:

0

status
enum<string>

任务状态

可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

task_info
object

异步任务信息

type
enum<string>

任务的输出类型

可用选项:
video
示例:

"video"