Models Hub
API ReferenceOmni

omni-fast-v2v Reference-Video Generation

Use /v1/videos with omni-fast-v2v to edit, extend, or regenerate from a reference video.

Edit this page

omni-fast-v2v is designed for editing, extending, or regenerating from an existing MP4 used as a reference video. It also submits an async task with a JSON request body, and the reference-video field accepts video, video_url, and input_video.

CapabilityFields
Reference-video editingvideo
Compatible reference-video fieldsvideo_url, input_video
Output controlseconds, aspect_ratio, resolution

Create a task

Prefer video for the reference video. It can be a public MP4 URL or a data:video/mp4;base64,... data URI.

curl -X POST "$MODELSOK_BASE_URL/v1/videos" \
  -H "Authorization: Bearer $MODELSOK_API_KEY" \
  -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"
  }'

The response returns a task ID:

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

Using video_url

video_url is a compatibility field for video. Use it when video is not provided:

{
  "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"
}

Using input_video

input_video is also a compatibility field for the reference video, convenient for reusing an existing client-side field name:

{
  "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"
}

Converting a local MP4 to a data URI

If you do not have a public MP4 URL, you can convert a local file to a data URI. The reference video is capped at 15MB; if it is larger, compress it first or upload it to a publicly accessible URL.

import base64
from pathlib import Path

source = Path("source.mp4")
if source.stat().st_size > 15 * 1024 * 1024:
    raise ValueError("reference video max 15MB")

video = "data:video/mp4;base64," + base64.b64encode(source.read_bytes()).decode("ascii")

Query the result

curl "$MODELSOK_BASE_URL/v1/videos/video_abc123" \
  -H "Authorization: Bearer $MODELSOK_API_KEY"

When complete, read video_url:

{
  "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"
}

You can also download the MP4 through the content endpoint:

curl -L "$MODELSOK_BASE_URL/v1/videos/video_abc123/content" \
  -H "Authorization: Bearer $MODELSOK_API_KEY" \
  -o omni-fast-v2v.mp4

Field reference

FieldTypeRequiredDescription
modelstringYesAlways omni-fast-v2v
promptstringYesEdit or generation prompt; describe which motion, camera, or subject to preserve
videostringNoReference video, recommended field; public MP4 URL or Base64 data URI
video_urlstringNoCompatibility field for video
input_videostringNoCompatibility field for video
secondsstringNoOutput duration, pass as a string; 4 to 30 seconds recommended
aspect_ratiostringNoAspect ratio, e.g. 16:9, 9:16
resolutionstringNoResolution, e.g. 720p, 1080p, 2k, 4k
first_image_urlstringNoCompatibility first-frame field; without a reference video, prefer omni-fast
imagesstring arrayNoCompatibility multi-reference-image field, up to 5; without a reference video, prefer omni-fast

Notes

  • Reference-video editing, extension, or regeneration must use omni-fast-v2v.
  • video, video_url, and input_video are the same class of reference-video input; prefer video.
  • The reference video is capped at 15MB; when using data:video/mp4;base64,... the actual request body grows, so allow extra network timeout.
  • If you do not need a reference video, prefer omni-fast video generation.

On this page