跳转到主要内容
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": "sora-2",
  "prompt": "Ocean waves crashing on rocks at golden hour, cinematic",
  "aspect_ratio": "16:9",
  "duration": 8
}
'
{
  "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
默认值:sora-2
必填

sora-2:标准版 sora-2-pro:专业版,自动生成音频

示例:

"sora-2"

"sora-2-pro"

prompt
string
必填

文本提示词,描述想要生成的视频内容

说明:

  • 支持中英文
  • 使用 character_ids 时,在提示词中用角色名称引用
  • 最多 5000 个字符
Maximum string length: 5000
示例:

"A lone astronaut stands on Mars, cinematic lighting"

image_urls
string[] | null

参考图像 URL 列表,用于图生视频功能

说明:

  • 仅支持传入 1 张首帧图片
  • 需为公开可访问的图片 URL
示例:
["https://example.com/photo.jpg"]
aspect_ratio
string
默认值:16:9

输出视频宽高比

可选值:

  • 16:9 / 1280x720 — 横屏(默认)
  • 9:16 / 720x1280 — 竖屏
示例:

"16:9"

duration
integer
默认值:4

输出视频时长(秒)

可选值: 48121620

示例:

4

resolution
enum<string>
默认值:720p

输出视频分辨率

可选值:

  • 720p — 标清(默认)
  • 1080p — 高清

注意: sora-2-pro 在 1080p 下价格更高

可用选项:
720p,
1080p
character_ids
string[] | null

角色 ID 列表,最多 2 个

说明:

  • 由 sora-2-character 模型生成
  • 在 prompt 中用角色名称引用

非必须不要传这个参数。

示例:
["char_abc"]
delete_video
boolean
默认值:true

是否在取回后删除视频

说明:

  • 默认 true(删除)
  • 设为 false 可保留视频,用于后续 sora-2-pro-remix

非必须不要传这个参数。

示例:

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"