跳转到主要内容
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 @- <<EOF
{
  "model": "heygen-video-agent",
  "prompt": "A weather reporter in front of a sunny city skyline introducing today's forecast in an upbeat tone."
}
EOF
{
  "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
默认值:heygen-video-agent
必填

heygen-video-agent:智能视频代理,自动生成数字人视频

示例:

"heygen-video-agent"

prompt
string
必填

自然语言 prompt,描述希望生成的视频内容

说明:

  • 最长 10000 字符
  • Video Agent 会自主决定选角、脚本、场景编排与剪辑
  • 输出视频时长由模型自主决定,客户端无法指定
Maximum string length: 10000
示例:

"A weather reporter in front of a sunny city skyline introducing today's forecast."

avatar_id
string | null

指定使用的 HeyGen avatar 标识

说明:

  • 不传或留空 → 由 Video Agent 自动挑选
  • 可传 HeyGen 官方 avatar ID,也可传 auto 交由模型决定
示例:

"Anna_public_3_20240108"

voice_id
string | null

指定使用的 HeyGen voice 标识

说明:

  • 不传或留空 → 由 Video Agent 自动挑选
  • 可传 HeyGen 官方 voice ID,也可传 auto 交由模型决定
示例:

"en-US-Studio-O"

style_id
string | null

HeyGen 视觉风格模板 ID

说明:

  • 控制场景构图、节奏与美学
  • 不传则使用默认风格
示例:

"modern_vlog_01"

orientation
enum<string> | null

输出视频方向

可选值:

  • landscape — 横屏
  • portrait — 竖屏
  • 不传 → 由 Video Agent 自动判断
可用选项:
landscape,
portrait
示例:

"landscape"

file_urls
string[] | null

参考素材 URL 列表(图片 / 视频 / 音频 / PDF)

说明:

  • 最多 20 个 URL

非必须不要传这个参数。

示例:
["https://example.com/screenshot-1.png"]
incognito_mode
boolean | null

是否启用无痕模式(禁用 agent 记忆)

非必须不要传这个参数。

示例:

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"