Omni 参考视频生成
调用 做参考视频编辑、延长或重生成。
http
POST /v1/videos当前可用模型
请求头
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string | 是 | 请求身份认证。使用 Bearer Token,示例值:。 | |
| string | 是 | 请求内容类型,必须设置为 。 |
请求体
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string | 是 | 模型名称,可选值见上方「当前可用模型」。 | |
| string | 是 | 视频编辑或生成提示词。建议说明保留哪些运动、镜头或主体,并明确要求输出新视频。示例:。 | |
| string | 否 | 参考视频。支持公网 MP4 URL 或 。与 、 任选其一。示例:。 | |
| string | 否 | 的兼容字段。未传 时可使用。示例:。 | |
| string | 否 | 的兼容字段。未传 和 时可使用。示例:。 | |
| string | 否 | 输出时长。建议传字符串;推荐范围为 到 秒。示例:。 | |
| string | 否 | 画面比例。示例值:、。 | |
| string | 否 | 分辨率字段。示例值:、、、。 | |
| string | 否 | 兼容 的首帧图字段。没有参考视频时,建议直接使用 。示例:。 | |
| array<string> | 否 | 兼容 的多参考图字段,最多 5 张。没有参考视频时,建议直接使用 。 |
请求示例
bash
curl -X POST https://octopusx.ai/v1/videos \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '
{
"model": "omni-fast-v2v",
"prompt": "Edit the attached video into a visibly new version while preserving the original camera path, timing, subject motion, and shot continuity. Add a rainy cinematic night look with neon reflections. Output a newly generated video, not the uploaded source clip or its preview.",
"video": "https://example.com/source.mp4",
"seconds": "8",
"aspect_ratio": "16:9",
"resolution": "720p"
}'bash
curl -X POST https://octopusx.ai/v1/videos \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '
{
"model": "omni-fast-v2v",
"prompt": "Extend this clip into a new cinematic shot with the same camera path.",
"video_url": "https://example.com/source.mp4",
"seconds": "8",
"aspect_ratio": "16:9",
"resolution": "720p"
}'bash
curl -X POST https://octopusx.ai/v1/videos \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '
{
"model": "omni-fast-v2v",
"prompt": "Regenerate the attached clip with brighter lighting and smoother motion.",
"input_video": "https://example.com/source.mp4",
"seconds": "8",
"aspect_ratio": "16:9",
"resolution": "720p"
}'响应示例
json
{
"id": "video_abc123",
"task_id": "video_abc123",
"object": "video",
"model": "omni-fast-v2v",
"status": "queued",
"progress": 0,
"created_at": 1735689600,
"video_url": ""
}json
{
"id": "video_abc123",
"task_id": "video_abc123",
"object": "video",
"model": "omni-fast-v2v",
"status": "completed",
"progress": 100,
"created_at": 1735689600,
"completed_at": 1735689900,
"video_url": "https://example.com/results/omni-fast-v2v.mp4"
}json
{
"id": "video_abc123",
"task_id": "video_abc123",
"object": "video",
"model": "omni-fast-v2v",
"status": "failed",
"progress": 100,
"error": {
"message": "upstream task failed",
"code": "task_failed"
}
}json
{
"error": {
"message": "video is required for V2V generation",
"type": "invalid_request_error",
"param": "video",
"code": "invalid_request_error"
}
}json
{
"error": {
"message": "invalid token",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}json
{
"error": {
"message": "insufficient quota",
"type": "insufficient_quota",
"code": "insufficient_quota"
}
}json
{
"error": {
"message": "request body too large",
"type": "invalid_request_error",
"code": "request_body_too_large"
}
}json
{
"error": {
"message": "rate limit exceeded",
"type": "rate_limit_error",
"code": "rate_limit_exceeded"
}
}json
{
"error": {
"message": "internal server error",
"type": "server_error",
"code": "server_error"
}
}响应字段
| 名称 | 类型 | 说明 |
|---|---|---|
| string | 视频任务 ID。后续可用于查询任务。 | |
| string | 视频任务 ID 的兼容字段。通常与 相同。 | |
| string | 对象类型,通常为 。 | |
| string | 本次任务使用的模型,例如 。 | |
| string | 任务状态。常见值为 、、、。 | |
| number | 任务进度,常见范围为 到 。 | |
| string | 完成后的视频地址。 | |
| object | 任务失败或接口错误时返回的错误对象,通常包含 和 。 |