跳转到主要内容
POST
/
v1
/
videos
/
generations
Grok Imagine Video Extension
curl --request POST \
  --url https://api.foxapi.cc/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "grok-imagine-video-extension",
  "prompt": "The camera slowly zooms out to reveal the city skyline at sunset",
  "video_url": "https://example.com/input-video.mp4",
  "duration": 6
}
'
{
  "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
默认值:grok-imagine-video-extension
必填

grok-imagine-video-extension:基于已有视频延长生成续段

示例:

"grok-imagine-video-extension"

prompt
string
必填

文本提示词,描述视频接下来应继续发生的内容

说明:

  • 支持中英文
  • 建议描述镜头延续、动作走向或场景变化
  • 最多 4096 个字符
Maximum string length: 4096
示例:

"The camera slowly zooms out to reveal the city skyline at sunset"

video_url
string
必填

输入视频的公开 URL

说明:

  • 必须为公开可访问的 MP4 URL
  • 编码支持 H.264 / H.265 / AV1
  • 输入视频时长需在 2 - 15 秒之间
示例:

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

duration
integer | null

延长片段时长(秒)

说明:

  • 范围:2 - 10
  • 未传时默认 6
示例:

2

响应

任务创建成功

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"