calesthio/OpenMontage · error · ValueError
video_edit requires video_url, video_path, or reference_vide
Error message
video_edit requires video_url, video_path, or reference_video_path
What it means
Raised in _build_payload for media_style=='gemini_video_edit' when no source video was supplied: the tool checks video_url and reference_video_url (path-based video keys normalized earlier also failed). The video_edit operation edits an existing video, so a video input is mandatory.
Source
Thrown at tools/video/atlas_video.py:288
*({"url": value, "type": "audio"} for value in audios),
]
if image:
refers.insert(0, {"url": image, "type": "image"})
if not refers or not any(item.get("type") in {"image", "video"} for item in refers):
raise ValueError("MiniMax H3 reference_to_video requires at least one image or video in refers")
payload["refers"] = refers
elif style == "gemini_video_clips":
clips = list(inputs.get("video_clips") or [])
if not clips and video:
clips = [{"url": video, "start": 0, "ends": min(int(inputs.get("duration", 10)), 10)}]
if len(clips) != 1:
raise ValueError("Gemini Omni developer reference_to_video requires exactly one video_clip")
payload["video_clips"] = clips
if images:
payload["images"] = images
elif style == "gemini_video_edit":
if not video:
raise ValueError("video_edit requires video_url, video_path, or reference_video_path")
payload["video"] = video
if images:
if len(images) > spec["media_limits"].get("images", 10):
raise ValueError("Gemini Omni video_edit accepts at most 10 reference images")
payload["images"] = images
extra = inputs.get("extra_params")
if isinstance(extra, dict):
payload.update(extra)
return payload
@staticmethod
def _upload_value(value: str | None, api_key: str) -> str | None:
if not value or _is_remote(value):
return value
return atlas_client.upload_media(value, api_key)
def _resolve_media(self, inputs: dict[str, Any], api_key: str) -> dict[str, Any]:View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Add video_url (remote) or video_path/reference_video_path (local file) to inputs
- Optionally attach up to 10 reference_images for the edit guidance
- If you meant to generate from scratch, use a text-to-video operation/model instead
Example fix
# before
inputs = {'model':'google/gemini-omni-flash','operation':'video_edit','prompt':'make the sky sunset'}
# after
inputs = {'model':'google/gemini-omni-flash','operation':'video_edit','prompt':'make the sky sunset','video_path':'input/scene.mp4'} Defensive patterns
Strategy: validation
Validate before calling
video = inputs.get('video_url') or inputs.get('video_path') or inputs.get('reference_video_path')
if not video:
raise ValueError('video_edit needs a source video')
if inputs.get('video_path') and not Path(inputs['video_path']).is_file():
raise ValueError(f"video file missing: {inputs['video_path']}") Type guard
def has_edit_video(inputs: dict) -> bool:
return bool(inputs.get('video_url') or inputs.get('reference_video_url') or
inputs.get('video_path') or inputs.get('reference_video_path')) Try / catch
try:
result = atlas_video.run(inputs=inputs)
except ValueError as e:
if 'video_edit requires' in str(e):
raise SystemExit('video_edit edits an existing video — attach one') from e
raise Prevention
- Use video_path for local files, video_url for remote; never 'video' or 'source_video'
- Assert the edit source exists after any download/cut step
- Keep a single input-builder keyed by operation so video_edit always carries a video
When it happens
Trigger: Calling operation='video_edit' with only a prompt and images; supplying the video under 'video' or 'source_video' (unread keys); the local video_path key misspelled so its normalized value never landed in video_url/reference_video_url.
Common situations: Treating video_edit as text-to-video with style images; renaming keys in an adapter layer; upstream upload of the local video failing silently leaving the URL field empty.
Related errors
- Gemini Omni video_edit accepts at most 10 reference images
- This Gemini route requires at least one reference image
- Gemini Omni developer reference_to_video requires exactly on
- Input video not found: {path}
- Atlas Cloud returned an unexpected payload: {str(body)[:500]
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/6d23be2964caeb48.
Report an issue: GitHub.