跳转到主要内容
POST
https://octopusx.ai
/
v1
/
videos
curl -X POST https://octopusx.ai/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "omni-fast",
    "prompt": "Ocean waves gently rolling onto a sandy beach at golden hour, cinematic, warm sunlight",
    "seconds": "8",
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'
{
  "id": "video_abc123",
  "task_id": "video_abc123",
  "object": "video",
  "model": "omni-fast",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "video_url": ""
}

omni-fast

omni-fast 使用 JSON 请求体提交异步视频任务,适合文生视频、首帧图生视频、首尾帧和多参考图视频。
  • 异步处理模式,提交后返回 idtask_id
  • 文生视频只需要 modelpromptseconds 和画面比例字段。
  • 首帧图生视频使用 first_image_url
  • 首尾帧使用 first_image_urllast_image_url
  • 多参考图使用 images,最多 5 张;参考视频请使用 omni-fast-v2v

方法与路径

POST /v1/videos

请求示例

curl -X POST https://octopusx.ai/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "omni-fast",
    "prompt": "Ocean waves gently rolling onto a sandy beach at golden hour, cinematic, warm sunlight",
    "seconds": "8",
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'

响应示例

{
  "id": "video_abc123",
  "task_id": "video_abc123",
  "object": "video",
  "model": "omni-fast",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "video_url": ""
}

认证

使用 Bearer Token 鉴权:
Authorization: Bearer YOUR_API_KEY
所有请求示例都需要携带 Authorization Header。JSON 请求还需要携带:
Content-Type: application/json

Body

model
string
必填
固定传 omni-fast。示例:"omni-fast"
prompt
string
必填
视频提示词。示例:"Ocean waves gently rolling onto a sandy beach at golden hour"
seconds
string
视频时长。建议传字符串;推荐范围为 430 秒。示例:"8"
aspect_ratio
string
画面比例。示例值:"16:9""9:16"
resolution
string
分辨率字段。示例值:"720p""1080p""2k""4k"
first_image_url
string
首帧图。传入后进入首帧图生视频模式。支持公网 URL 或 data:image/...;base64,...。示例:"https://example.com/first-frame.jpg"
last_image_url
string
尾帧图。需要配合 first_image_url 使用。示例:"https://example.com/last-frame.jpg"
images
array<string>
多参考图列表,最多 5 张。支持公网 URL 或 data:image/...;base64,...。示例:["https://example.com/character.jpg"]

Response

id
string
视频任务 ID。后续可用于 GET /v1/videos/{task_id} 查询。
task_id
string
视频任务 ID 的兼容字段。通常与 id 相同。
object
string
对象类型,通常为 video
model
string
本次任务使用的模型,例如 omni-fast
status
string
任务状态。常见值为 queuedin_progresscompletedfailed
progress
number
任务进度,常见范围为 0100
video_url
string
完成后的视频地址。
error
object
任务失败或接口错误时返回的错误对象,通常包含 messagecode

使用场景

竖屏文生视频

{
  "model": "omni-fast",
  "prompt": "A woman walking through a neon-lit Tokyo street at night, rain reflections, cinematic",
  "seconds": "8",
  "aspect_ratio": "9:16",
  "resolution": "720p"
}

首帧图生视频

{
  "model": "omni-fast",
  "prompt": "The scene comes alive with gentle wind and drifting clouds",
  "first_image_url": "https://example.com/first-frame.jpg",
  "seconds": "8",
  "aspect_ratio": "16:9",
  "resolution": "720p"
}

多参考图视频

{
  "model": "omni-fast",
  "prompt": "Use the first image as the character reference and the second image as the visual style reference.",
  "images": [
    "https://example.com/character.jpg",
    "https://example.com/style.jpg"
  ],
  "seconds": "8",
  "aspect_ratio": "16:9",
  "resolution": "720p"
}

注意事项

  • omni-fast 不支持 videovideo_urlinput_video 参考视频字段。
  • images 最多 5 张。
  • 图片字段使用 JSON,不需要 multipart。
  • 建议轮询 GET /v1/videos/{task_id},完成后从返回的 video_url 获取生成的 MP4。
  • 参考视频编辑或延长必须使用 omni-fast-v2v

相关接口