跳转到主要内容
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": "happyhorse-1.0-video-edit",
  "video_url": "https://example.com/input.mp4",
  "prompt": "Turn the scene into a rainy cyberpunk street at night",
  "resolution": "1080p"
}
'
{
  "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
默认值:happyhorse-1.0-video-edit
必填

happyhorse-1.0-video-edit:视频编辑

示例:

"happyhorse-1.0-video-edit"

video_url
string
必填

待编辑视频的公开 URL

说明:

  • 支持 MP4 / MOV(推荐 H.264 编码)
  • 输入视频时长 3 - 60
  • 文件大小上限 100MB
  • 视频短边在 320 ~ 2160 像素之间
示例:

"https://example.com/input.mp4"

prompt
string
必填

编辑指令或风格迁移描述,可使用 @Image1 ~ @Image5 引用对应参考图

说明:

  • 最多 2500 个字符
Maximum string length: 2500
示例:

"Turn the scene into a rainy cyberpunk street at night"

reference_image_urls
string[] | null

可选参考图片 URL 列表,最多 5 张

说明:

  • 支持 JPEG / PNG / WEBP
  • 短边 ≥ 300px,每张大小上限 10MB
  • 数组顺序对应 prompt 中的 @Image1 ~ @Image5
Maximum array length: 5
示例:
["https://example.com/style.jpg"]
resolution
enum<string>
默认值:1080p

输出视频分辨率,可选 720p1080p

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

"720p"

audio_setting
enum<string>
默认值:auto

音频处理策略

可选值:

  • auto — 由模型自动决定是否重生音频
  • origin — 尽量保留输入视频原始音频

非必须不要传这个参数。

可用选项:
auto,
origin
示例:

"auto"

seed
integer | null

随机种子,用于提升结果复现性

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

123

enable_safety_checker
boolean | null

是否启用安全检查,不传则使用模型默认行为

非必须不要传这个参数。

示例:

true

响应

任务创建成功

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"