{"record":{"id":"cd53029026ff0701","repo":"calesthio/OpenMontage","slug":"reference-video-path-is-not-supported-by-ark-uplo","errorCode":null,"errorMessage":"reference_video_path is not supported by Ark; upload the video to a public/signed HTTPS URL or Ark asset first","messagePattern":"reference_video_path is not supported by Ark; upload the video to a public/signed HTTPS URL or Ark asset first","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/video/seedance_ark.py","lineNumber":731,"sourceCode":"            \"4:3\",\n            \"1:1\",\n            \"3:4\",\n            \"9:16\",\n        }\n        if ratio not in valid_ratios:\n            raise ValueError(\n                \"aspect_ratio must be adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, or 9:16\"\n            )\n\n        max_duration = 30 if variant == \"2.5\" else 15\n        duration = self._normalize_duration(inputs.get(\"duration\", 5), max_duration)\n        prompt = str(inputs.get(\"prompt\") or \"\").strip()\n        content: list[dict[str, Any]] = []\n        if prompt:\n            content.append({\"type\": \"text\", \"text\": prompt})\n\n        if inputs.get(\"reference_video_path\"):\n            raise ValueError(\n                \"reference_video_path is not supported by Ark; upload the \"\n                \"video to a public/signed HTTPS URL or Ark asset first\"\n            )\n\n        if operation == \"text_to_video\":\n            if not prompt:\n                raise ValueError(\"prompt is required for text_to_video\")\n            if self._has_any_media(inputs):\n                raise ValueError(\n                    \"text_to_video does not accept reference media; use \"\n                    \"image_to_video or reference_to_video\"\n                )\n        elif operation == \"image_to_video\":\n            first_refs = self._single_image_refs(inputs)\n            if len(first_refs) != 1:\n                raise ValueError(\"image_to_video requires exactly one reference image\")\n            content.append(self._image_content(first_refs[0], role=\"first_frame\"))\n            end_refs = [","sourceCodeStart":713,"sourceCodeEnd":749,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/seedance_ark.py#L713-L749","documentation":"Hard guard in `_build_payload`: if `reference_video_path` is set, the tool refuses immediately. The Ark content-generation API only accepts reference videos that are already publicly (or signed) reachable HTTPS URLs or Ark-hosted assets — it performs no client-side upload of local video files. The message tells you exactly what to do instead.","triggerScenarios":"Passing `reference_video_path: '/data/clip.mp4'` (mirroring other tools that do upload local files, e.g. the Kling tool in this repo) together with operation reference_to_video or image_to_video.","commonSituations":"Developers porting call shapes from kling_official_video or fal-based tools that accept local paths; users assuming OpenMontage uploads media on their behalf; local-video-driven workflows (clip-factory, podcast-repurpose) trying to condition Ark generation on a local file.","solutions":["Upload the video to any HTTPS-accessible location (object storage with a signed URL, public bucket, Ark asset storage) and pass `reference_video_url` instead","For local files with no hosting, use a different provider tool that accepts paths (check the registry's video_generation capability)","Ensure the URL stays valid for the whole task lifetime — generation fetches it server-side"],"exampleFix":"# before\ninputs = {\"operation\": \"reference_to_video\", \"reference_video_path\": \"/tmp/clip.mp4\"}\n# after\ninputs = {\"operation\": \"reference_to_video\", \"reference_video_url\": \"https://cdn.example.com/clip.mp4\"}","handlingStrategy":"validation","validationCode":"if inputs.get(\"reference_video_path\"):\n    raise ValueError(\n        \"Ark cannot ingest local files; upload first and pass reference_video_url\"\n    )\n# upload flow: push file to signed-URL storage, then\n# inputs[\"reference_video_url\"] = upload(inputs.pop(\"reference_video_path\"))","typeGuard":"def has_local_video_ref(inputs: dict) -> bool:\n    return bool(inputs.get(\"reference_video_path\"))","tryCatchPattern":"try:\n    result = ark.execute(inputs)\nexcept ValueError as e:\n    if \"reference_video_path is not supported\" in str(e):\n        url = upload_to_https_storage(inputs.pop(\"reference_video_path\"))\n        inputs[\"reference_video_url\"] = url\n        result = ark.execute(inputs)\n    else:\n        raise","preventionTips":["Route local-media workflows to a provider tool that uploads (check registry video_generation entries), or maintain a shared upload helper that converts *_path to *_url","Signed URLs must remain valid until the Ark task finishes fetching the asset"],"tags":["seedance","ark","input-validation","local-file","reference-video"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}