跳转到主要内容
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": "wan-2.7-reference-to-video",
  "prompt": "A graceful dance performance on a moonlit stage",
  "reference_image_urls": [
    "https://example.com/character.jpg"
  ],
  "duration": 5,
  "resolution": "1080p",
  "aspect_ratio": "16:9"
}
'
{
  "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
默认值:wan-2.7-reference-to-video
必填

wan-2.7-reference-to-video:参考图/参考视频生视频

示例:

"wan-2.7-reference-to-video"

prompt
string
必填

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

说明:

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

"A graceful dance performance on a moonlit stage"

reference_image_urls
string[] | null

参考图片 URL 列表

说明:

  • 用于提供角色或物体的外观参考
  • 多主体场景可传多张图片
  • 每张图片大小上限 20MB
示例:
["https://example.com/character.jpg"]
reference_video_urls
string[] | null

参考视频 URL 列表

说明:

  • 用于提供角色或物体的动作参考
  • 多主体场景可传多个视频
  • 每个视频大小上限 100MB
示例:
["https://example.com/motion.mp4"]
duration
integer
默认值:5

输出视频时长(秒),支持 2-10 的整数秒

必填范围: 2 <= x <= 10
示例:

2

resolution
enum<string>
默认值:1080p

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

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

"720p"

aspect_ratio
enum<string>
默认值:16:9

输出视频宽高比

可选值: 16:99:161:14:33:4

可用选项:
16:9,
9:16,
1:1,
4:3,
3:4
示例:

"16:9"

negative_prompt
string | null

负向提示词,用于描述希望避免出现的内容

Maximum string length: 500
示例:

"blurry, jitter"

seed
integer | null

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

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

123

multi_shots
boolean | null

是否启用多镜头分段生成

说明:

  • 设为 true 时,系统会尝试生成多镜头段落
  • 不传时使用模型默认行为

非必须不要传这个参数。

示例:

true

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"