videodraft 0.19.2 → 0.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -24,8 +24,8 @@ function readVersionFromDisk() {
24
24
  }
25
25
  }
26
26
  function resolveVersion() {
27
- if ("0.19.2") {
28
- return "0.19.2";
27
+ if ("0.19.4") {
28
+ return "0.19.4";
29
29
  }
30
30
  return readVersionFromDisk();
31
31
  }
@@ -3146,7 +3146,7 @@ function registerGenerateCommands(program) {
3146
3146
  "Seedance 2.x only: use initially when supplied start/end frames or image/video references visibly contain a real identifiable person. Keep the Byteplus default for text-only, non-person, anime, or clearly synthetic/stylized inputs. Otherwise retry once only after SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED. This permits Fal fallback at its higher tier-specific rate. Use --estimate first."
3147
3147
  ).option("--start-image <url|file>", "start frame (image-to-video)").option("--end-image <url|file>", "end frame (supported models only)").option("--ref <url|file>", "reference image (repeatable)", collect, []).option(
3148
3148
  "--source-video <url|file>",
3149
- "Gemini Omni 1.1 Flash source video for edit (up to 10s) or extend (1-30s); creative --ref-video inputs may accompany it (local file uploaded)"
3149
+ "Gemini Omni 1.1 Flash source video for edit (up to 10s) or extend (1-30s); edit and extend accept exactly one input video, so --ref-video cannot accompany it (local file uploaded)"
3150
3150
  ).option(
3151
3151
  "--ref-video <url|file>",
3152
3152
  "creative reference video (repeatable; Gemini Omni 1.1 Flash accepts up to 3 of <=3s each; one ref with no --source-video remains a legacy source edit; local files uploaded)",
@@ -3205,7 +3205,7 @@ function registerGenerateCommands(program) {
3205
3205
  "Wan 3.0 reference mode: public webpage URL (requires --thinking)"
3206
3206
  ).option(
3207
3207
  "--previous-interaction-id <id>",
3208
- "Gemini Omni 1.1 Flash: continue an earlier official Google interaction; with --extend, append 3-10s up to 40s total (unsupported with Fal BYOK)"
3208
+ "Gemini Omni 1.1 Flash: continue an earlier generation; with --extend, append 3-10s up to 40s total. The prior output becomes the source, so it must be <=30s to extend or <=10s to edit, --ref-video cannot accompany it, and new dialogue needs a silent source (unsupported with Fal BYOK)"
3209
3209
  ).option(
3210
3210
  "--video-task <task>",
3211
3211
  "Gemini Omni 1.1 Flash mode: generate, edit, or extend"
@@ -3408,6 +3408,12 @@ function registerGenerateCommands(program) {
3408
3408
  EXIT.USAGE
3409
3409
  );
3410
3410
  }
3411
+ if (videoCount > 0 && (opts.sourceVideo || opts.previousInteractionId) && geminiVideoTask !== "generate") {
3412
+ throw new CliError(
3413
+ `gemini-omni-1.1-flash accepts exactly one input video for an ${geminiVideoTask ?? "edit"} task, so --ref-video cannot accompany --source-video or --previous-interaction-id. Drop the references, or use --video-task generate to guide a new clip with them.`,
3414
+ EXIT.USAGE
3415
+ );
3416
+ }
3411
3417
  if (opts.sourceVideo && geminiVideoTask === "generate") {
3412
3418
  throw new CliError(
3413
3419
  "--source-video supports --video-task edit or extend, not generate.",
@@ -5762,8 +5768,8 @@ function bundledSkillDir() {
5762
5768
  );
5763
5769
  }
5764
5770
  function bundledSkillFiles() {
5765
- if ('{"SKILL.md":"---\\nname: videodraft\\ndescription: Create and edit AI videos, images, Seed Audio, voiceovers, music, sound effects, dialogue, dubbing, storyboards, avatar videos, media upscales, and product/ad videos with VideoDraft. Use whenever the user mentions VideoDraft; asks to generate a video, image, audio asset, ad, explainer, storyboard, avatar, upscale, or batch/CI workflow; or wants to assemble, cut, caption, mix, lay out, inspect, or export a native VideoDraft Editor timeline. Covers the cloud `videodraft` CLI/MCP and local headless `videodraft_editor` MCP. When the editor MCP is exposed, prefer it for production, timeline assembly, and export; use cloud production/export only when explicitly requested or the editor is unavailable.\\n---\\n\\n# VideoDraft\\n\\nVideoDraft is an AI video creation platform where asset generation is the priority lane:\\n\\n- **Asset generation**: standalone images, video clips, Seed Audio, voiceovers, music, sound effects, dialogue, voice-changed audio, dubbed media, upscales, and image descriptions. This is the fastest and most important lane. Treat these as complete deliverables when the user asks for assets.\\n- **Asset I/O**: upload local files, download outputs, auto-upload local references, and save generated media where the user can see it.\\n- **Native editing**: local `.vdproject` timelines, cuts, layouts, captions, effects, audio, and exports through the headless VideoDraft Editor. Inside VideoDraft ADE, this is the default production and export lane whenever `videodraft_editor` is available.\\n- **Hosted project production**: idea \u2192 script \u2192 storyboard \u2192 hosted production timeline \u2192 exported MP4. Use the early stages for scripts, storyboards, and generated assets when useful. Treat hosted production and export as a fallback when the native editor is unavailable, or as an explicit destination when the user asks for an editable web project or hosted workflow.\\n\\n## How to connect\\n\\nCloud generation has two equivalent surfaces (same backend, credits, and hosted projects). Native timeline editing is a separate local surface:\\n\\n1. **CLI** (preferred when you have a shell): run `videodraft` if it\'s on PATH; otherwise `npx -y videodraft@latest` runs it with no install (needs Node \u226520; the `-y` skips npx\'s install prompt so it runs non-interactively; the package is fetched on first use and cached). For heavy use, `npm install -g videodraft`. If there\'s no Node/shell here but the MCP connector below is available, use that instead; if neither works, tell the user how to install (https://videodraft.ai/cli).\\n - Auth \u2014 pick by context, don\'t guess:\\n \u2022 INTERACTIVE (a human is in the session, e.g. Claude Code / Codex): on exit code 3 (\\"not authenticated\\"), tell the user to run `videodraft login` in their terminal \u2014 it opens their browser for a one-click VideoDraft sign-in (OAuth), no key to copy. Wait for them to confirm it succeeded, then retry the command. This is the preferred path when the user is present.\\n \u2022 HEADLESS / CI (no browser): set `VIDEODRAFT_API_KEY=vd_mcp_...` (a token the user mints at https://app.videodraft.ai/mcp-keys).\\n \u2022 SECURITY: never ask the user to paste a `vd_mcp_...` token into the chat \u2014 use browser `login` or the env var so the token never lands in the transcript.\\n - Every command accepts `--json` (parse this, don\'t scrape text). Exit codes: 0 ok, 1 error, 2 usage, 3 auth (see Auth above), 4 insufficient credits (\u2192 tell the user, don\'t retry).\\n - Tool discovery: start with `videodraft tools list` for the grouped catalog, then narrow with `videodraft tools list --lane assets`, `--lane asset_io`, `--lane project_data`, or `--lane production`.\\n - Asset lane: `videodraft generate ...`, `videodraft edit video|motion`, `videodraft avatar ...`, `videodraft upscale ...`, `videodraft upload`, and `videodraft download`.\\n - Full API access: `videodraft tools schema <name>`, `videodraft call <tool> --args \'<json>\'`.\\n2. **MCP connector**: if VideoDraft MCP tools (e.g. `generate_storyboard_from_idea`) are available, call them directly \u2014 the CLI\'s curated commands map 1:1 onto these tools.\\n3. **Native editor MCP** (`videodraft_editor`): prefer this for project production, timeline assembly, cutting, layouts, transitions, captions, audio placement, and final export. Inside VideoDraft ADE on a supported Mac, Claude and Codex receive it automatically in both Code and VideoDraft modes. It runs headlessly, so an Open Editor click is not required. Start with `project_control` (`list`, `open`, or `create`); standalone asset generation remains in the cloud CLI or MCP.\\n\\nNative editor mutations are revision-guarded. Send them serially and carry forward each result\'s fresh revision. See [references/editor.md](references/editor.md) for project selection, media import, timing units, mutation deltas, verification, export, and the `videodraft-editor` terminal bridge.\\n\\nIf you are reading this skill through `videodraft skills show skill`, run `videodraft skills show editor` before native editor work to load that reference.\\n\\n**VideoDraft ADE routing rule:** the presence of `videodraft_editor` means the native editor is ready, even when no editor window is visible. Use cloud tools to generate or source assets and, when helpful, scripts or storyboards. Do not call hosted `produce_project` / `videodraft produce` or `export_video` / `videodraft export` by default. Import the assets into the native project, assemble there, and call native `export_start`. Use hosted production/export only when the user explicitly asks for the web workflow or the native editor tools are unavailable. Do not silently fall back to hosted production after a native tool error.\\n\\n## First decision: asset, hosted project, or native edit?\\n\\n- **One standalone asset** (image, clip, voiceover, music track, sound effect, dialogue track, voice-changed file, dubbed media file, upscale, or description): generate it directly. Do NOT create a project.\\n - `videodraft generate image \\"a red fox in snow, cinematic\\" --ar 16:9 --download ./out/`\\n - `videodraft generate video \\"slow dolly over a misty lake\\" --model gemini-omni-1.1-flash --duration 6 --download ./out/`\\n- **Any final video, production timeline, existing footage, local `.vdproject`, or hands-on edit**: use `videodraft_editor` when available. List or open the intended local project, or create a native project for a new production. The editor can work without showing its UI.\\n- **A small set of related assets**: still stay in the asset lane. They are grouped automatically (see [AI Studio sessions](#ai-studio-sessions)); give the current group one useful task-specific name with `videodraft sessions name \\"<name>\\"`. Switch to a project only when the deliverable matches the project criteria below or the user asks to attach the assets to one.\\n- **A generated multi-scene video / ad / explainer**: when the editor is available, use hosted tools only for any needed script, storyboard, shot planning, or generated assets; stop before hosted production, import the assets, and build/export the native timeline. A hosted project is optional unless the user wants the web project or its storyboard workflow.\\n- **A hosted web project or hosted export**: use the hosted pipeline only when the user explicitly asks for it or the native editor is unavailable.\\n- **Just a script** (no video asked for): A script-only request creates a script-stage project but stops at the script. Use `videodraft create \\"...\\" --script-only`; do not build a storyboard the user didn\'t ask for.\\n- **Iterating on existing work**: identify the surface first. Use `project_control` with `action:\'list\'` for native projects and `videodraft projects list` only for hosted work. Never create a replacement project just to change an existing one.\\n\\n## Choose the model from the task\\n\\nIf the user names a model, use it when compatible. If it cannot handle the request, explain why and recommend alternatives instead of silently switching. Otherwise inspect the inputs, duration, audio, quality, speed, and cost, check the live catalog, and pass an explicit model.\\n\\n### Seedance 2.x real-person rule\\n\\nSeedance 2.0 and 2.5 require an explicit, higher-priced routing choice for real-person likenesses:\\n\\n- Enable real-person support on the first request when supplied visual input media visibly contains a real identifiable person. This includes a start frame, end frame, reference image, or reference video. Keep the lower-priced Byteplus default for text-only requests, non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. For MCP use `allow_real_people: true`. For the CLI use `--allow-real-people`. Pass the same value to `get_model_costs` or `videodraft costs` so the estimate matches the charge.\\n- The default is false. It uses the lower Byteplus-priced path, and a Byteplus likeness-policy refusal does not fall back to Fal. Enabling the option keeps Byteplus first but permits a submit-time fallback to Fal, which allows real-person likenesses. The request is charged at Fal\'s higher tier-specific rate even if Byteplus serves it.\\n- If a request made without the option fails with code `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the higher rate, follow the user\'s spend-confirmation preference, and retry exactly once with the option enabled. The structured recovery fields are `retryable: true`, `retry_with: { allow_real_people: true }`, `cli_flag: \\"--allow-real-people\\"`, and `retry_policy: \\"once\\"`. CLI `--json` submit errors expose them under `details`; `status` and `wait` include them on the failed job result. Do not treat an unrelated moderation or provider error as that signal.\\n- Do not loop if the option was already enabled. Byteplus can accept a task and reject its generated output later. VideoDraft refunds that failed generation, but the late asynchronous failure cannot be rerouted to Fal. Rephrase the prompt or use different references before trying again.\\n- For hosted AI Production, the same choice applies to every Seedance scene segment. Use `produce_project` with `mode: \\"full_video\\", allow_real_people: true`, or `videodraft produce <project> --mode full_video --allow-real-people`. If an earlier run partially submitted and returns the opt-in code, rerun that same project once with the option. The server reconciles asynchronous results first, preserves running/completed jobs, and resubmits only failed scene-video placeholders carrying the exact opt-in signal. Keep the native-first VideoDraft ADE routing rule above: hosted full-video production is still explicit/fallback-only when the local editor is available.\\n\\nEvery `videodraft models image|video|audio --json` response carries a top-level `recommended` array (best first) and stamps `recommended` / `recommended_for` on each entry. That is the authoritative preference order and it beats this page when they disagree. Preferred today: images `nano-banana-2`, `nano-banana-pro`, `gpt-image-2`; videos `gemini-omni-1.1-flash`, `seedance-2.5`, `seedance-2`, `kling-3.0`, `kling-v3-turbo`, `kling-o3`; video edits `gemini-omni-1.1-flash`; talking heads `veed-fabric`; motion transfer `kling-v3-motion-control`; audio ElevenLabs for anything with a voice and Lyria for instrumental music. Preference applies only when the user did not name a model.\\n\\n**Images:**\\n\\n- `nano-banana-2`: general default, editing, consistency, and references.\\n- `nano-banana-pro`: maximum quality. `nano-banana-2-lite`: fast, inexpensive drafts.\\n- `gpt-image-2`: posters, logos, signs, title cards, readable text, or precise composition/editing.\\n\\n**Videos:**\\n\\n- `gemini-omni-1.1-flash`: general default for 3-10s generation and uploaded source edits up to 10s. It supports first and last frames, up to 10 total image inputs, up to 3 creative reference videos of at most 3 seconds each, uploaded-video extension, and official Google continuation through `--previous-interaction-id`. Output is 360p/720p/1080p/4K at 3/10/15/30 cr/s with audio always on. Use `--source-video` for the uploaded edit/extension source; extension sources must be 1-30s. Creative `--ref-video` inputs may accompany it or `--previous-interaction-id` on official Google. One `--ref-video` with no separate source remains a legacy source edit. A previous interaction defaults to conversational edit; add `--video-task extend` or `--extend` with an explicit 3-10s duration to append at the end, up to 40 seconds total. Uploaded-video extensions cannot add new dialogue, while previous-interaction extensions can. The server safely measures creative-reference durations, or you can repeat `--ref-video-duration` when a host blocks metadata probing. Fal BYOK supports its currently callable v1.1 generation and basic-edit endpoints at zero VideoDraft credits, but Fal does not expose continuation/extension or mixed source-edit references as callable endpoints and VideoDraft must never fall back to paid Google.\\n- `grok-imagine-video-1.5`: 1-15s text, first-frame, or 1-7 reference-image generation with native audio. Text/first-frame modes support 480p, 720p, and 1080p; reference mode supports 480p/720p. Cite references as `<IMAGE_0>` through `<IMAGE_6>`. It has no last frame, seed, negative prompt, quality tier, reference video, or reference audio.\\n- `minimax-h3`: 480p/768p/2K/4K (5/6/13/16 cr/s, 768p default), native stereo audio, and 5-15s text, first/last-frame, or mixed-reference generation. Reference mode accepts up to 9 images, 3 videos, and 3 audio clips, with at most 12 files total. Cite them as `Image 1`, `Video 1`, and `Audio 1` in array order.\\n- `minimax-h3-max`: 480p/768p pricing (5/8 cr/s, 768p default), native audio, and 5-15s text or first/last-frame generation. It supports a reproducibility seed, a safety checker, and `disabled` / `balanced` / `quality` prompt expansion. It does not accept reference media.\\n- `wan-3.0`: unified 2-30s text, first/last-frame, or ordered mixed-reference generation at 480p/720p/1080p (7/14/28 cr/s), with optional native audio. Reference mode accepts up to 10 images, 5 videos, and 5 audio clips, at most 20 media files total; video and audio each total at most 15 seconds. `--auto-duration` reserves 30 seconds and reconciles to the provider-reported output length. Document/web references use `--file-url` or `--web-url` and require `--thinking`.\\n- `flux-3`: Black Forest Labs FLUX 3. 5-20s at 720p/1080p with 24fps native audio, from a prompt, a first frame, first + last frames, or up to 10 keyframes pinned to specific moments (`--keyframe shot.png@2.5`, repeatable). `--quality draft` renders the same shot at 720p for roughly a third of the cost \u2014 use it to check blocking before committing. Auto duration is text/first-frame only.\\n- `seedance-2`: 11-15s, video/audio/mixed references, wider ratios, selectable audio, or first/last frames. Use `mini` for cost, `fast` for speed, `standard` for quality or 1080p/4K.\\n- `seedance-2.5`: 4-30s single takes and up to 50 references (30 image, 10 video, 10 audio). Same modes as 2.0, one quality tier, 480p/720p/1080p. Reach for it when a shot must run past 15s or carry more references than 2.0 allows.\\n- `kling-v3-turbo`: fast polished 3-15s with first frame, multi-prompt, and audio, but no elements. `kling-o3`: reference images plus structured image/video elements, first/last frames, multi-prompt, audio control, or 4K. O3 allows 7 combined image references and image-backed elements, reduced to 4 combined items when a video-backed element is present. `kling-3.0`: image-to-video can use structured image/video elements and bind a custom Kling voice ID to either element form. Kling 2.6 Pro uses top-level voice IDs cited as `<<<voice_1>>>` and `<<<voice_2>>>`.\\n- Existing-video edits use `videodraft edit video`, not generic generation. `gemini-omni-1.1-flash` is the preferred edit model and is chosen automatically when you omit `--model`: source up to 10s, up to 10 reference images, up to 3 creative reference videos of at most 3s each, 360p/720p/1080p/4K with audio. Repeat `--ref-video-duration` only when automatic measurement is unavailable. Omitting `--model` on a longer or unmeasurable source spends nothing and prints a priced menu (what each model edits, what it drops, what it costs) so you can put the choice to the user. **Truncation:** only Gemini refuses an over-length source. Happy Horse silently edits just the first 15s, Kling O3 the first 10s, and Grok the first 8s. The command warns you when that will happen; always relay it to the user. Gemini regenerates the audio track, so use Happy Horse or Kling O3 with `--preserve-audio` when the source audio must survive. Choose Grok for the cheapest prompt-only edit, Happy Horse for up to 5 image references, or Kling O3 for controlled reference-image edits.\\n- To edit a source longer than 10s without losing its tail, cut it into <=10s pieces in the native editor, edit each with Gemini, and reassemble. VideoDraft has no server-side split/concat, so this path needs `videodraft_editor`.\\n- Kling O3 also has a reference-generation mode. Use `videodraft generate video --model kling-o3-video-ref-edit` with exactly one `--ref-video` to generate a new guided clip; use `videodraft edit video` when changing the source itself. Use Wan 3.0 for new mixed-reference generation, not source-video editing.\\n- Motion transfer uses `videodraft edit motion` with Kling V3 by default, or Kling 2.6 when explicitly requested or lower cost matters. It requires a subject image and a motion-reference video.\\n- Use Veo 3.1 when explicitly requested or as a fallback.\\n\\n**Audio and utilities:**\\n\\n- Use Seed Audio 1.0 for open-ended text-to-audio, speech/music/sound synthesis, voice conditioning, or prompt-driven editing with up to three audio references or one image. Use `videodraft generate audio`. Reference clips are `@Audio1`, `@Audio2`, and `@Audio3` in array order. There is no duration input. Output is up to two minutes and settles at 19 credits per actual minute, with up to 38 credits reserved during generation. The CLI automatically retries transient responses with one operation key. To recover after the CLI process itself is interrupted, set `--idempotency-key <uuid>` on the original command and reuse it.\\n- Prefer ElevenLabs for voiceover, dialogue, voice changing, dubbing, and sound effects. Honor an explicitly selected supported TTS voice/provider. Use Lyria for instrumental music and ElevenLabs Music for vocals, lyrics, or exact timing.\\n- A character who needs to TALK, when you have an image of them, splits by FRAMING:\\n - **Talking to camera** (presenter, spokesperson, explainer): the avatar lane, and VEED Fabric is preferred. Use managed `avatar create` then `avatar render` for a reusable avatar record with bundled speech, `avatar fabric` for a one-off portrait plus text or existing audio, and `avatar lipsync` when both the source video and replacement audio already exist.\\n - **Speaking inside a scene** (real blocking, framing, camera movement): not Fabric. It animates a portrait facing the lens, so a cinematic request comes back as a head-on talking headshot. Use `generate video` with `kling-2.6-pro` (one or two voices cited as `<<<voice_1>>>` / `<<<voice_2>>>`), `kling-3.0` (a voice bound per element, so several characters can speak in one shot), or `happy-horse` (strong character identity from a frontal image, native audio, multilingual lip-sync).\\n- Enhancement: use Topaz image/video upscaling only when the content is already correct. Use image 1x for cleanup, 2x by default, 4x when justified; use video 2x by default. Edit or regenerate creative errors.\\n\\nSee [references/models.md](references/models.md) for the detailed routing table and exact capability limits.\\n\\n## Prefer references when continuity matters\\n\\nPure text-to-image or text-to-video is fine for a generic one-off asset. When a specific character, product, location, style, composition, or brand identity must survive generation, use references instead of hoping the prompt recreates it.\\n\\n- If the user supplies reference media, preserve and pass it. Never reduce the request to text alone.\\n- When continuity matters, generate/select a strong still first with the selected image model (`nano-banana-2` by default), wait for its URL, then animate it as a start frame/reference. Confirm the combined image and video cost.\\n- When using a hosted storyboard stage for multiple shots, use `videodraft shots <project_id> --model <selected-image-model> --grid`, then animate the decoded shots. Preserve explicit models. In VideoDraft ADE, import the resulting assets into the native editor instead of continuing into hosted production. A requested non-Seedance video model must use manual per-shot generation instead of Seedance full-video mode.\\n\\n## Cost and credits\\n\\nDo not call `videodraft credits` before routine generations. Paid endpoints validate and deduct atomically; if the balance is insufficient, the request is rejected before the provider job starts (CLI exit code 4). Check the balance only when the user asks, gives a credit budget, or a large workflow needs budget planning.\\n\\nFor expensive work, estimate with `--estimate` or `videodraft costs`, state the selected model/settings/cost, and get a go-ahead. This matters most for shot-image batches, long or high-resolution video, AI Production, and paid audio batches. Honor the user\'s confirmation preference for the session.\\n\\nKling voice creation costs 1 VideoDraft credit on the platform Fal account and 0 credits with Fal BYOK. Preview it with `videodraft kling-voices create <sample> --name <name> --estimate`; the estimate does not create a voice or require consent confirmation. Actual creation requires `--confirm-consent`.\\n\\nMiniMax H3 costs 5 / 6 / 13 / 16 credits per output second at 480p / 768p / 2K / 4K (768p by default). In reference mode the first 5 images are included and each additional image costs 8 credits. Reference video and reference audio are NOT billed.\\n\\nMiniMax H3 Max costs 5 credits per output second at 480p and 8 credits per second at 768p (default). Use `--prompt-expansion-mode disabled|balanced|quality`; balanced is the default. The safety checker defaults on and can be set explicitly with `--safety-checker true|false`.\\n\\nWan 3.0 costs 7 / 14 / 28 credits per output second at 480p / 720p / 1080p. Auto duration reserves the 30-second maximum and refunds the unused reserve after the provider reports the actual whole-second output length. Fal BYOK runs on the connected user key and charges zero VideoDraft credits.\\n\\nGrok Imagine Video 1.5 costs 8 credits per output second at 480p, 14 at 720p, or 25 at 1080p, plus 1 credit for each first-frame or reference image. Native audio is always generated.\\n\\n`videodraft models image|video` lists the live image and video catalogs with supported inputs. Video entries are grouped as `generation`, `video_edit`, `motion_control`, `avatar_lipsync`, and `upscale`, and each reports the exact tool. Use `videodraft models video --category video_edit` to narrow the list. `videodraft models audio` lists Seed Audio, Google Lyria, and ElevenLabs audio/media tools, while `videodraft models voices` lists TTS voices. Consult them instead of guessing capabilities.\\n\\n## Async jobs\\n\\nImage/video generation is asynchronous: commands submit a job and **wait by default**, printing output URLs (and saving files with `--download`). Large downloaded images also get a downscaled copy in `previews/` next to them (the `preview` field / \\"inspect via preview\\" line in the output) \u2014 **look at the preview, deliver the original**; viewing full-resolution images bloats the chat permanently. In scripts/CI prefer explicit control:\\n\\n```bash\\nJOB=$(videodraft generate image \\"...\\" --no-wait --json | jq -r .job_id)\\nvideodraft wait \\"$JOB\\" --download \\"./outputs/{job_id}_{index}.{ext}\\" --json\\n```\\n\\nFor MANY jobs: submit each with `--no-wait`, collect ALL with one command \u2014 `videodraft wait <id1> <id2> ...` polls every job from one process with one batched request per tick. Do NOT spawn parallel `wait`/`generate --wait` processes for a batch.\\n\\nIf a wait times out, the job is still running server-side \u2014 `videodraft status <job_id>` later. Never re-submit just because a wait timed out (that double-spends credits).\\n\\nFor completed Wan 3.0 jobs, MCP `check_generation_status` and CLI `status`/`wait --json` include `outputMetadata` with Fal\'s returned `seed`, `duration`, and `actual_prompt` when present.\\n\\n## AI Studio sessions\\n\\nEvery standalone (project-less) generation is filed into an AI Studio session in the web app. You do not have to create one:\\n\\n- **MCP hosts** (Claude Code, claude.ai, Codex, VideoDraft ADE): the server mints an `Mcp-Session-Id` on `initialize`; your host echoes it, and this conversation\'s generations land in their own session. Tool results echo it as `ai_studio_session_id`.\\n- **CLI**: the same handshake runs once per (profile, server, working directory) and is cached for 12 idle hours, so everything generated from one directory shares one session. `videodraft sessions current` shows it; `videodraft sessions reset` starts a new one.\\n- Project generations (`--project <id>` / `project_id`) always go to that project\'s session.\\n\\nOnce you understand the creative task, name the current automatic session before the first standalone generation:\\n\\n```bash\\nvideodraft sessions name \\"Purple Seal Rescue Short\\"\\n```\\n\\nChoose a concise, specific 3-6 word title for the intended work. Do not copy the client name, date, or exact chat title. Name it once: the operation creates the session with that title. If generation, a user, or an earlier agent created the session first, its existing name is preserved.\\n\\nPass `--session <id>` / `session_id` only to **continue earlier work** or create an explicit separate group:\\n\\n```bash\\nSESSION=$(videodraft sessions create \\"Fox brand explorations\\" --json | jq -r \'.session.id\')\\nvideodraft generate image \\"a red fox in snow, cinematic\\" --session \\"$SESSION\\"\\nvideodraft generations --session \\"$SESSION\\" # what is in it\\nvideodraft sessions list --name fox # find it again later\\n```\\n\\n`VIDEODRAFT_SESSION=<id>` sets the default for every command (ignored when `--project` is given). While it is set, `sessions name` refuses to run because that command names the current automatic connection session, not the pinned override; unset it first or rename the pinned session in AI Studio. `VIDEODRAFT_SESSION_SCOPE=<label>` groups several directories into one connection session; `VIDEODRAFT_CLIENT_NAME=<host>` labels the fallback placeholder used when generation creates the session before `sessions name`; `VIDEODRAFT_NO_SESSION=1` disables the handshake. Generations that reach the server with no session at all fall back to the account-wide \\"Agent (MCP)\\" session; if you see work landing there, pass `--session` explicitly.\\n\\n## Generation history\\n\\nPast work is queryable \u2014 reuse a previous setup instead of guessing. `videodraft generations` lists recent generations; scope with `--session <id>` or `--project <id>` (includes collaborators\' rows in shared scopes; pass one, project wins), and filter with `--type`, `--model`, `--favorites`. `--full --json` returns each row\'s exact parameters (aspect ratio, resolution, duration, references) \u2014 the human table stays compact, so pair `--full` with `--json`. `videodraft generation <id>` prints one generation\'s complete recipe (prompt, input image, parameters, outputs); `--favorite` / `--unfavorite` stars it. `videodraft sessions list` shows AI Studio sessions (owned + shared) with `--name` search \u2014 take a session id from there to read its history.\\n\\n## Local files and reference images\\n\\nReference inputs must be public URLs. The CLI uploads local files automatically wherever a URL is expected (`--ref photo.jpg`, `--start-image frame.png`), or explicitly:\\n\\n```bash\\nURL=$(videodraft upload ./product.png --json | jq -r .url)\\n```\\n\\nNever silently drop a reference you couldn\'t upload \u2014 stop and tell the user. Never upload a user\'s file to a third-party host.\\n\\nWhen the user attaches media for a native production, import actual footage into the editor by default. For hosted generation/storyboarding, classify each item before acting: a recurring **visual asset** (character/product/location/style), actual **footage to place as shots**, or **inspiration only**. See [references/pipeline.md](references/pipeline.md) for the hosted role mapping.\\n\\n## Showing media to the user\\n\\nGenerated media is **not** displayed in the chat automatically \u2014 you decide what to show. To preview an asset inline, save it locally (use `--download` so it lands under `media/`) and reference its **local path** as a Markdown link with a **leading `./`**:\\n\\n```\\n[ferrari shot](./media/ferrari_01.png) \u2190 image card\\n[the clip](./media/clip.mp4) \u2190 video player\\n[voiceover](./media/vo.mp3) \u2190 audio player\\n```\\n\\nPut the Markdown link **in your message text** \u2014 video and audio embed exactly like images. Do **not** use `SendUserFile` (or other file-send tools) to display media: that renders inside a collapsible tool card and gets buried in the tool list. The Markdown link in your prose is what produces the inline card.\\n\\nUse the path you saved to: a **workspace-relative** path (`./media/clip.mp4`, or `./<any-folder>/clip.mp4` \u2014 any folder in the workspace works), or the **absolute** path for a file outside the workspace (e.g. `/Users/you/Desktop/clip.mp4` or another workspace\'s path). Both render. Show the finished results worth showing (and only those \u2014 not every intermediate job). A bare CDN URL or a JSON dump of output URLs does **not** render; the local-path Markdown link is what produces an inline card.\\n\\n## Native-first VideoDraft ADE pipeline (idea \u2192 MP4)\\n\\nWhen `videodraft_editor` is present:\\n\\n1. Generate or source the script, storyboard, shot images, clips, voiceovers, music, and other assets through the cloud CLI/MCP as needed.\\n2. Call native `project_control` to open or create the `.vdproject`.\\n3. Call native `media_import`, wait for imports to become ready, then assemble and refine the timeline with editor tools.\\n4. Call native `export_start` and use `export_status` for progress and results.\\n\\nDo not run the hosted production or export steps in this path unless the user explicitly asks for a web production.\\n\\n## Hosted fallback pipeline (idea \u2192 MP4)\\n\\nUse this only when there is NO native editor at all, or the user explicitly requests the hosted web\\nworkflow. The native surface is not only the injected `videodraft_editor` MCP: a `videodraft-editor`\\nexecutable on PATH is the same editor reached through its terminal bridge, and\\n[references/editor.md](references/editor.md) covers driving it that way. Treating a missing MCP as\\n\\"no editor\\" sends sessions that have the binary into hosted production for no reason.\\n\\n```bash\\nvideodraft create \\"<idea>\\" --ar 9:16 # project: script \u2192 visual assets \u2192 storyboard\\nvideodraft shots <project_id> --grid --estimate # cost preview, confirm with user\\nvideodraft shots <project_id> --grid # batch shot images (waits, writes onto shot cards)\\nvideodraft produce <project_id> # voiceovers + captions + production timeline\\nvideodraft export <project_id> --download final.mp4\\n```\\n\\nOptional between produce and export: per-shot motion clips (`videodraft generate video ... --project <id>` then place it with `videodraft attach <project> --scene N --shot M --media <url|file> --type video --duration <s>`), music (`videodraft generate music \\"...\\" --attach <project_id>`), and standalone audio assets (`generate audio`, `generate sound-effect`, `generate dialogue`, `generate voice-changer`, `generate dub`). Details, per-step tools and editing rules: [references/pipeline.md](references/pipeline.md).\\n\\n## Avatar and talking-head videos (both surfaces)\\n\\nAvatar generation is cloud-only \u2014 the native editor has no avatar or lipsync tools \u2014 so this applies whether or not `videodraft_editor` is present. Generate the avatar in the cloud; in VideoDraft ADE, import the rendered clip and cut it on the native timeline like any other footage.\\n\\nAvatar/talking-head videos use dedicated commands. For a reusable managed avatar, obtain or generate a clear portrait \u2192 `videodraft avatar script` when needed \u2192 `videodraft avatar create` \u2192 `videodraft avatar render --resolution 720p`. For a one-off portrait, use `videodraft avatar fabric <portrait> --text \\"...\\"` or `--audio <file>`. For an existing video plus replacement audio, use `videodraft avatar lipsync <video> --audio <file>`. Managed script/creation is bundled/free; direct Fabric, Sync, the managed Fabric render, and optional portrait generation/upscaling are paid. Confirm expensive steps first.\\n\\n## Working with hosted project data\\n\\nA hosted project is one JSON blob (script, storyboard scenes, shot cards, visual assets, production timeline). To inspect: `videodraft projects get <id>`. To edit: fetch `--raw`, modify, then `videodraft call update_project` \u2014 objects deep-merge, **arrays replace wholesale** (send the complete `storyboard.scenes` array to change one scene). Snapshot first with `videodraft checkpoint create <id>` before risky edits. Schema reference: `videodraft call get_project_schema`. This does not replace native editor tools when `videodraft_editor` is available for the production itself.\\n\\n## More\\n\\n- [references/pipeline.md](references/pipeline.md) \u2014 hosted fallback data model and production workflow\\n- [references/editor.md](references/editor.md) \u2014 native headless editor routing, project selection, import, timeline edits, verification, and export\\n- [references/models.md](references/models.md) \u2014 choosing image/video models, pricing patterns, voices and styles\\n- [references/examples.md](references/examples.md) \u2014 recipes: batch product videos from a CSV, talking-head from a script, changelog video in CI\\n","references/editor.md":"# Native VideoDraft Editor reference\\n\\nUse this reference when the user wants to assemble, cut, caption, mix, lay out, inspect, or export a local VideoDraft Editor project. The native editor is deterministic and local. Cloud generation remains in the `videodraft` CLI or hosted MCP.\\n\\n## VideoDraft ADE preference rule\\n\\nWhen `videodraft_editor` tools are exposed, treat the native editor as available and make it the default surface for production, timeline assembly, and final export. It is headless by design, so a hidden window or an untouched Open Editor button does not justify using hosted production instead.\\n\\nUse cloud tools for asset generation and optional script/storyboard work, then import the results. Do not call hosted `produce_project` / `videodraft produce` or `export_video` / `videodraft export` unless the user explicitly requests an editable web production or the native editor tools are unavailable. If a native tool call fails after the editor was available, report or recover that native failure rather than silently switching surfaces.\\n\\n## Choose the correct surface\\n\\n- `videodraft` and the hosted VideoDraft MCP generate assets and can manage hosted web projects. They use the user\'s VideoDraft account and credits. In VideoDraft ADE, use them mainly as the source of generated media and optional storyboards for the native production.\\n- `videodraft_editor` edits local `.vdproject` packages. It has no generation, account, model, or credit tools.\\n- Inside VideoDraft ADE on a supported Mac, the editor MCP is injected automatically for Claude and Codex in both Code and VideoDraft modes. It starts headlessly before the chat opens. The user does not need to click Open Editor, and closing or hiding the editor window does not stop headless editing.\\n- Outside that environment, use the editor only if `videodraft_editor` MCP tools are already exposed or the `videodraft-editor` executable is on PATH. Do not confuse the public `videodraft` cloud CLI with the separate native editor executable.\\n\\nPrefer the direct MCP tools when they are available. The terminal bridge is useful for scripts, diagnostics, or an agent session where the MCP was not injected.\\n\\n## Start with the intended project\\n\\nAn MCP session can begin without a project selected. Project selection belongs to the session, not to whichever editor window happens to be frontmost.\\n\\n1. If the user named an existing project but its identity is unclear, call `project_control` with `action:\'list\'`.\\n2. Open the exact project by the returned `id`, unambiguous `name`, or `.vdproject` `path`.\\n3. Create only when the user wants a new local edit. `action:\'create\'` accepts optional `name`, `fps`, `aspectRatio`, and `quality`.\\n4. Treat `isActive` as this MCP session\'s target and `isVisible` as the project shown in the UI. Headless editing only needs the session target.\\n5. Use `action:\'close\'` only when closing is part of the task. It saves first and never deletes the project.\\n\\nDo not substitute a hosted project ID for a native project. A hosted project can supply scripts, storyboards, and generated media, but the native edit is a separate `.vdproject` package.\\n\\n## Keep a reliable editing model\\n\\n- Call `timeline_read` once after opening or creating a project, after switching timelines, or after an out-of-band user edit. It returns the revision and current clip/track state.\\n- Call `media_list` before using a `mediaRef`. Poll imports with a filtered read (`ids` for a known asset, `pending:true` for a batch) instead of repeatedly loading the full library.\\n- Timeline placement uses project frames. Source spans, media durations, transcript segments, and search hits use seconds. Pass those values to the relevant tools as returned; do not multiply by fps yourself.\\n- IDs are short stable prefixes. Pass them back exactly as returned. Tracks use stable `trackId` values; indexes can change.\\n- Send project mutations serially. Pass `ifRevision` from the latest read or mutation when available, then replace it with the fresh revision from the next result. Parallel edits against one project can race or invalidate each other\'s revision.\\n- Every mutation returns a delta in `timeline_read` vocabulary. Patch your working model from that delta instead of re-reading after every successful call. Re-read after a stale-state failure or an out-of-band change.\\n- Use `canvas_arrange` for split screens, picture-in-picture, grids, and canvas placement. Use `tracks_edit` to fix stacking. Do not synthesize layouts from generic transforms or keyframes.\\n- Use `media_view` before describing source content, and `transcript_read` to locate a spoken moment. Use `timeline_view` to verify the composited result the viewer will actually see.\\n- Volume inputs, including volume keyframes, are linear values from `0` to `1`. Timeline reads return the same linear scale.\\n\\n## Bring generated or local media into the editor\\n\\nUse cloud generation for new assets, save or download the outputs, then call native `media_import`:\\n\\n- `source.path`: absolute local file or directory. A directory imports recursively and preserves its folder structure.\\n- `source.url`: HTTPS asset URL. Set `mimeType` when a signed URL has no usable extension.\\n- `source.bytes`: small base64 media with a required `mimeType`.\\n- `source.matte`: generated solid-color image.\\n\\nReadiness differs by source, and so does the poll that detects it:\\n\\n- **URL and single-file path** imports return `status:\'downloading\'` with one `mediaRef`. Poll `media_list` with `ids:[mediaRef]` until `generationStatus` is absent.\\n- **Directory** imports also return `status:\'downloading\'` with one placeholder `mediaRef` for the batch. Poll `media_list` with `ids:[mediaRef]` until `generationStatus` clears; the folder\'s assets then appear. (`pending:true` remains a fallback that lists every unresolved import.)\\n- **Inline bytes and matte** imports finish inline and come back `status:\'ready\'`; no polling needed.\\n\\nNever place a pending asset on the timeline. `generationStatus` is the signal: `preparing` and\\n`downloading` mean keep polling, absent means usable, and **`failed` is terminal** \u2014 report it or\\nretry the import explicitly, never poll on. Do not treat \\"not downloading\\" as ready.\\n\\nFor a batch of local outputs, download them into one workspace directory and import that directory once when practical. This is safer and faster than racing many import calls; poll the batch\'s placeholder `mediaRef` with `ids` to know when it is usable.\\n\\n## Edit and verify\\n\\nUse the tool descriptions as the exact schema. A dependable sequence is:\\n\\n1. `project_control` to select or create the local project.\\n2. `timeline_read` and `media_list` to establish current state.\\n3. `media_view` when content selection matters.\\n4. Serialized clip, track, layout, text, caption, audio, color, effect, or cut mutations using the current revision.\\n5. `timeline_view` when visual composition or layer order matters.\\n6. `undo` if the requested result is wrong and the next mutation would not cleanly correct it.\\n\\nEdits are undoable. Do not ask for confirmation before each ordinary edit. Ask one focused question only when the user\'s creative direction is materially ambiguous.\\n\\n## Export\\n\\n`export_start` queues work in the background and returns a `jobId`, destination, and `started` or `queued` status.\\n\\n- Use `video` for H.264, H.265, or ProRes.\\n- Use `xml` for Premiere Pro.\\n- Use `xml` (XMEML) for Premiere Pro **and DaVinci Resolve** \u2014 Resolve reads XMEML natively.\\n Use `fcpxml` only for Final Cut Pro. Sending Resolve an FCPXML produces a package it cannot\\n open cleanly, so the target matters more than the file extension suggests.\\n- Use `videodraft` for a self-contained project package.\\n- Omit `outputPath` unless the user named a destination; the default is `~/Downloads`.\\n- Use `export_status` to list progress, warnings, and results. Cancel only when the user asks or the just-queued settings were wrong. Do not infer that an export is stuck from elapsed time alone.\\n\\n## Terminal bridge\\n\\nVideoDraft desktop terminals expose `videodraft-editor`, which controls the same process and MCP surface:\\n\\n```bash\\nvideodraft-editor status\\nvideodraft-editor list-tools\\nvideodraft-editor tool project_control --json \'{\\"action\\":\\"list\\"}\'\\nvideodraft-editor tool timeline_read --project \\"/path/to/My Video.vdproject\\" --json \'{}\'\\nvideodraft-editor show\\nvideodraft-editor hide\\n```\\n\\nEach `videodraft-editor` invocation is a separate connection, so a project selected by one call (e.g. `project_control` `action:\'open\'`) is NOT remembered by the next. Pass `--project <path>` on every `tool` call that operates on a project \u2014 without it, a follow-up call like `timeline_read` reports \\"No editor is available\\" even though the open succeeded.\\n\\nControl and tool commands auto-start a headless editor if none is running. `show` only reveals the already-running UI. Use `videodraft-editor tool <name> --json -` to read a JSON object from stdin when shell quoting would be fragile. Never read, copy, or expose the editor\'s rotating local authentication secret.\\n","references/examples.md":"# Recipes\\n\\nWorking patterns for common asks. All assume auth (`videodraft login` once, or `VIDEODRAFT_API_KEY` in the environment) and use `--json` for parsing.\\n\\nInside VideoDraft ADE, if a native editor is available, use these recipes for asset generation and\\noptional script/storyboard stages. Hand the results to the editor for production and export ONLY\\nwhen the deliverable the user asked for is a composed production. A standalone output \u2014 the batch\\nproduct clips in recipe 1, the upscale in recipe 7 \u2014 is finished when it is generated; importing it\\ninto a project and exporting a timeline builds an edit nobody asked for. Recipes below that call `videodraft produce` or `videodraft export` are hosted fallbacks only. Do not choose them over the available native editor unless the user explicitly asks for the hosted web workflow.\\n\\n## 1. Batch product videos from a CSV\\n\\nOne 9:16 product clip per row of `products.csv` (`name,image_url,tagline`):\\n\\n```bash\\n#!/usr/bin/env bash\\nset -euo pipefail\\nmkdir -p outputs\\n\\nwhile IFS=, read -r name image tagline; do\\n job=$(videodraft generate video \\\\\\n \\"Premium product shot of ${name}: ${tagline}. Slow orbit, studio lighting.\\" \\\\\\n --model gemini-omni-1.1-flash --ar 9:16 --duration 6 \\\\\\n --start-image \\"$image\\" \\\\\\n --no-wait --json | jq -r .job_id)\\n echo \\"$name,$job\\" >> outputs/jobs.csv\\ndone < <(tail -n +2 products.csv)\\n\\n# Collect ALL results with ONE process (batched polling \u2014 one request per tick)\\nvideodraft wait $(cut -d, -f2 outputs/jobs.csv) \\\\\\n --download \\"outputs/{job_id}_{index}.{ext}\\" --json > outputs/results.json\\n# map job ids back to product names via outputs/jobs.csv\\n```\\n\\nSubmit-then-collect parallelizes server-side generation; the single multi-id `wait` keeps it to one local process and one batched poll request per tick no matter how many jobs. Gemini Omni 1.1 Flash is selected because these are six-second first-frame product clips. Estimate first: `videodraft costs gemini-omni-1.1-flash --type video --duration 6 --resolution 720p --audio` \xD7 rows, and confirm with the user.\\n\\nExtend an uploaded clip or conversationally edit an official Google interaction with Gemini Omni 1.1 Flash:\\n\\nEach extension appends 3-10 seconds at the end, up to 40 seconds total. Uploaded-video extensions cannot add new dialogue; use a previous Google interaction when the extension needs additional speech.\\n\\n```bash\\n# Uploaded-video extension with a separate creative camera reference.\\nvideodraft generate video --model gemini-omni-1.1-flash \\\\\\n --source-video ./ending.mp4 --ref-video ./camera-language.mp4 \\\\\\n --ref-video-duration 3 --extend --duration 6 --resolution 1080p \\\\\\n --download ./media/extended.mp4\\n\\n# Conversational edit from the interaction_id returned by Google. Add --extend to lengthen instead.\\nvideodraft generate video --model gemini-omni-1.1-flash \\\\\\n --previous-interaction-id \\"$INTERACTION_ID\\" \\\\\\n --ref-video ./new-performance-reference.mp4 --ref-video-duration 2.5 \\\\\\n --resolution 720p \\\\\\n --download ./media/continued.mp4\\n```\\n\\nFal BYOK supports the currently callable Gemini Omni 1.1 generation and basic source-edit endpoints at zero VideoDraft credits. Its published callable v1.1 endpoints do not expose continuation, extension, or separate creative references on a source edit. Do not infer a Fal route or retry on paid Google while Fal BYOK is active.\\n\\n## 2. Hosted full marketing video from one idea (fallback)\\n\\n```bash\\nvideodraft create \\"30-second launch video for Solace, a sleep-tracking ring. Calm, premium, dark palette.\\" \\\\\\n --ar 9:16 --style cinematic --json > project.json\\nPROJECT=$(jq -r .project_id project.json)\\n\\nvideodraft shots \\"$PROJECT\\" --grid --estimate # show the user the cost; get a go-ahead\\nvideodraft shots \\"$PROJECT\\" --grid\\nvideodraft produce \\"$PROJECT\\"\\nvideodraft generate music \\"minimal ambient, warm pads, 60 BPM\\" --attach \\"$PROJECT\\"\\nvideodraft generate audio \\"Extend @Audio1 into a 20-second transition\\" --ref-audio ./intro.wav --format wav --download ./transition.wav\\nvideodraft export \\"$PROJECT\\" --download solace-launch.mp4\\n```\\n\\nUse this complete hosted path only when the user requested a web project or the native editor is unavailable. Otherwise stop after the storyboard/assets, import them into the native `.vdproject`, and export with `export_start`. The hosted project stays editable at the URL in `project.json` (`.urls`).\\n\\n## 3. Talking-head (avatar) video\\n\\nWhen the user has no portrait, generate a clear front-facing avatar image first. Skip this step when they supplied one or an existing character should be reused.\\n\\n```bash\\nvideodraft generate image \\\\\\n \\"Front-facing head-and-shoulders portrait of a friendly coffee expert, direct eye contact, natural expression, clean studio background\\" \\\\\\n --model nano-banana-2 --ar 9:16 --download ./media/avatar.png\\n\\nSCRIPT=$(videodraft avatar script \\"why our espresso subscription saves you money\\" --style ad-style --json | jq -r .script)\\nAVATAR=$(videodraft avatar create ./media/avatar.png --script \\"$SCRIPT\\" --voice elevenlabs-kPzsL2i3teMYv0FxEYQ6 --ar 9:16 --json | jq -r .avatar_video_id)\\nvideodraft avatar render \\"$AVATAR\\" --resolution 720p # VEED Fabric paid step; confirm cost first (~20 credits/sec)\\n```\\n\\n`avatar script` and `avatar create` (including speech) are bundled/free. In this example only the optional portrait generation and Fabric render spend credits.\\n\\nIf the portrait is low resolution, enhance it before `avatar create`:\\n\\n```bash\\nvideodraft upscale image ./founder-small.jpg --scale 2x --download ./media/founder-upscaled.png\\n```\\n\\nFor a one-off portrait animation without creating a managed avatar record:\\n\\n```bash\\nvideodraft avatar fabric ./founder.jpg \\\\\\n --text \\"Welcome to the weekly product update.\\" \\\\\\n --voice-description \\"warm, confident American presenter\\" \\\\\\n --resolution 720p --download ./media/presenter.mp4\\n```\\n\\nWhen the user already has both the video and replacement speech:\\n\\n```bash\\nvideodraft avatar lipsync ./presenter.mp4 \\\\\\n --audio ./localized-voiceover.mp3 \\\\\\n --sync-mode loop --download ./media/presenter-localized.mp4\\n```\\n\\nEdit an existing video with a dedicated edit model:\\n\\n```bash\\nvideodraft models video --category video_edit\\nvideodraft edit video ./product-demo.mp4 \\\\\\n \\"Preserve the product but follow the reference camera rhythm\\" \\\\\\n --model gemini-omni-1.1-flash --ref-video ./camera-rhythm.mp4 \\\\\\n --ref-video-duration 2.5 --resolution 1080p \\\\\\n --download ./media/product-demo-reframed.mp4\\n\\nvideodraft edit video ./product-demo.mp4 \\\\\\n \\"Turn the room into a warm evening scene while preserving the product and camera motion\\" \\\\\\n --model kling-o3-video-ref-edit --ref ./evening-style.jpg \\\\\\n --preserve-audio --download ./media/product-demo-evening.mp4\\n```\\n\\nTransfer motion from a reference clip onto a character image:\\n\\n```bash\\nvideodraft edit motion ./character.png \\\\\\n \\"Apply the dancer\'s movement to this character while preserving identity\\" \\\\\\n --motion-video ./dance-reference.mp4 \\\\\\n --model kling-v3-motion-control --quality pro \\\\\\n --download ./media/character-dance.mp4\\n```\\n\\n## 4. Hosted changelog video in CI\\n\\nIn a GitHub Action with `VIDEODRAFT_API_KEY` set as a secret:\\n\\n```bash\\nNOTES=$(git log --oneline v1.2.0..HEAD | head -20)\\nvideodraft create \\"Weekly product update video. Energetic, 20 seconds. Changes: ${NOTES}\\" --ar 16:9 --json > p.json\\nPROJECT=$(jq -r .project_id p.json)\\nvideodraft shots \\"$PROJECT\\" && videodraft produce \\"$PROJECT\\"\\nvideodraft export \\"$PROJECT\\" --download changelog.mp4 --wait-timeout 30m\\n```\\n\\n## 5. Variations and picking a winner\\n\\n```bash\\nvideodraft generate image \\"logo concept: minimalist fox, geometric\\" --num 4 --download \\"./concepts/{job_id}_{index}.{ext}\\" --json\\n# Show all 4 to the user; regenerate the chosen one at higher res:\\nvideodraft generate image \\"<same prompt>\\" --model nano-banana-pro --resolution 4K\\n```\\n\\n## 6. Reaching tools without a curated command\\n\\n```bash\\nvideodraft tools list --json | jq -r \'.[].name\'\\nvideodraft tools schema attach_media_to_shot --json\\nvideodraft call attach_media_to_shot --args \'{\\"project_id\\":\\"...\\",\\"scene_index\\":0,\\"shot_index\\":1,\\"media_url\\":\\"https://...\\",\\"media_type\\":\\"video\\",\\"duration_seconds\\":6}\'\\n```\\n\\nAnything the hosted VideoDraft MCP exposes, including character studio, product studio, and hosted project data, is reachable this way even before it gets a curated command. Native `.vdproject` editing uses the separate `videodraft_editor` MCP described in SKILL.md.\\n\\n## 7. Enhance an existing asset without changing it\\n\\n```bash\\n# Light image cleanup, no enlargement\\nvideodraft upscale image ./poster.png --scale 1x --download ./media/poster-enhanced.png\\n\\n# General image and video enlargement\\nvideodraft upscale image ./frame.png --scale 2x --download ./media/frame-2x.png\\nvideodraft upscale video ./clip.mp4 --scale 2x --download ./media/clip-2x.mp4\\n```\\n\\nUse these when the content is correct and only quality or resolution needs improvement. If the poster text, composition, subject, or motion is wrong, edit or regenerate instead.\\n","references/models.md":"# Choosing models (and predicting cost)\\n\\nAlways consult the live catalog instead of memorizing this page \u2014 models change weekly:\\n\\n```bash\\nvideodraft models image --json # every image model + inputs (aspect ratios, resolutions, max refs)\\nvideodraft models video --json # every video model + inputs + per-second pricing metadata\\nvideodraft models audio --json # standalone audio/media models + pricing inputs\\nvideodraft models voices --json # TTS voices\\nvideodraft models styles --json # visual style presets\\n```\\n\\n## Task-based model selection\\n\\nHonor an explicitly named model when it supports the request. Otherwise choose from the task\'s inputs, duration, audio, quality, speed, and cost. Pass the chosen model explicitly instead of relying on a blind platform fallback.\\n\\nThe catalogs carry the preference order themselves: every `videodraft models image|video|audio --json` response has a top-level `recommended` array (best first) plus `recommended` / `recommended_for` on each entry. Trust that over this page. Preferred today: images `nano-banana-2`, `nano-banana-pro`, `gpt-image-2`; videos `gemini-omni-1.1-flash`, `seedance-2.5`, `seedance-2`, `kling-3.0`, `kling-v3-turbo`, `kling-o3`; video edits `gemini-omni-1.1-flash`; talking heads `veed-fabric`; motion transfer `kling-v3-motion-control`; audio ElevenLabs for voice work and Lyria for instrumental music.\\n\\n### Images\\n\\n| Need | Choose | Why |\\n| -------------------------------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------- |\\n| Most generation, editing, character consistency, or reference work | `nano-banana-2` | Best general default; 1K/2K/4K and up to 14 reference images |\\n| Highest-quality complex generation or reasoning | `nano-banana-pro` | Premium Nano Banana quality and reasoning |\\n| Fast, inexpensive drafts and iteration | `nano-banana-2-lite` | Fastest/cheapest Nano Banana option; 1K only, up to 14 references |\\n| Posters, title cards, signs, logos, or any image with important readable text | `gpt-image-2` | Strong text rendering; up to 16 image inputs and 1K/2K/4K output |\\n| Complex multi-image composition, precise editing, or a strong alternate interpretation | `gpt-image-2` | Strong non-Nano alternative with multi-image input |\\n| Cheapest usable image, or an xAI look | `grok-imagine` | 2 cr flat (3 with a reference); 1 reference image |\\n| xAI at 2K or with a quality tier, up to 3 edit references | `grok-imagine-2.0` | 1K 4 (low) / 6 (medium), 2K 6 / 8, +1 cr per reference image |\\n\\nUse `--num 1..4` for variations of one prompt in a single call. Never loop separate paid calls for variations that fit in one request.\\n\\n### Videos\\n\\n| Need | Choose | Important limits |\\n| ---------------------------------------------------------------------------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| Most generation, first/last-frame, mixed-reference, source-edit, or extension requests | `gemini-omni-1.1-flash` | 3-10s output; 360p/720p/1080p/4K at 3/10/15/30 cr/s; audio always; up to 10 image inputs and 3 reference videos <=3s; edit source <=10s; Google continuation or 3-10s extension of a 1-30s uploaded source up to 40s total |\\n| Grok 1.5 text, first-frame, or 1-7 image-reference clips with native audio and optional 1080p | `grok-imagine-video-1.5` | 1-15s; 480p/720p/1080p for text/first-frame; references are 480p/720p only; no last frame |\\n| Unified text, first/last-frame, mixed-media, document, or webpage reference generation | `wan-3.0` | 2-30s or auto; 480p/720p/1080p at 7/14/28 cr/s; 10 image, 5 video, 5 audio refs, 20 media files total; document/web refs require thinking |\\n| 480p/768p/2K/4K with native stereo audio, first/last frames, or mixed image/video/audio references | `minimax-h3` | 5-15s; 5/6/13/16 cr/s by resolution; up to 9 image, 3 video, 3 audio refs, 12 files total; first 5 reference images free then 8 cr each; reference video/audio each total <=15s |\\n| Text or first/last-frame video with native audio and stronger prompt adherence | `minimax-h3-max` | 5-15s; 5/8 cr/s at 480p/768p; seed, safety checker, and disabled/balanced/quality prompt expansion; no reference media |\\n| Images pinned to specific moments (keyframes), 16-20s clips, or a cheap draft pass before committing | `flux-3` | 5-20s (auto for text/first-frame only); 720p/1080p; up to 10 keyframes; `--quality draft` is 720p-only at ~1/3 the cost |\\n| Video/audio references, mixed reference media, broad aspect ratios, frame-mode first+last frame, or 11-15s | `seedance-2` | 4-15s or auto; up to 9 image, 3 video, and 3 audio refs; audio toggle; Mini/Fast are 480p/720p only |\\n| Single takes past 15s, or more references than Seedance 2.0 allows | `seedance-2.5` | 4-30s or auto; up to 30 image, 10 video, and 10 audio refs (50 files total); one quality tier; 480p/720p/1080p |\\n| Fast polished 3-15s video with first frame, multi-prompt, and native audio | `kling-v3-turbo` | Audio always on; Pro default; no end frame, reference-media mode, or elements |\\n| Cinematic 3-15s with reference images, image/video elements, first+last frame, audio, or 4K | `kling-o3` | 7 combined image refs/elements, reduced to 4 with a video element; Standard/Pro/4K |\\n| Kling 3-15s image-to-video with first+last frame, image/video elements, multi-prompt, audio, or 4K | `kling-3.0` | Elements require a start image; image or video elements can bind voice_id; Standard/Pro/4K |\\n| User explicitly requests Veo, or the selected workflow specifically needs Veo | `google-veo3.1` | Good fallback, but not the preferred general model |\\n\\nRouting rules:\\n\\n- 480p/768p/2K/4K with native stereo audio: use MiniMax H3 (5/6/13/16 cr/s).\\n- 480p/768p text or first/last-frame video with native audio: use MiniMax H3 Max (5/8 cr/s). It has no reference mode.\\n- Grok 1.5 reference mode accepts 1-7 images only. Address them in array order as `<IMAGE_0>` through `<IMAGE_6>`. Do not combine reference images with `--start-image`, `--end-image`, `--ref-video`, or `--ref-audio`.\\n- Grok 1.5 first-frame mode accepts one `--start-image`, derives the output aspect ratio from that image, and does not support `--end-image`. Text and first-frame modes support 480p, 720p, or 1080p. Reference mode supports 480p or 720p.\\n- Grok 1.5 always generates native audio. Do not pass `--no-audio`, `--seed`, `--negative`, or `--quality`.\\n- Around 11-15 seconds with native audio: use MiniMax H3, Kling, or Seedance, not Gemini.\\n- One existing source video that should be edited: use `videodraft edit video`, which auto-selects Gemini Omni 1.1 Flash for a source up to 10s. Generic `generate video --ref-video` retains source-edit behavior when `--video-task` is omitted, but the dedicated edit command is clearer.\\n- Video supplied as a creative reference: Gemini Omni 1.1 Flash accepts up to 3 videos of at most 3 seconds each, including mixed image and video input. Use `--source-video` or `--previous-interaction-id` when those creative clips guide an official-Google edit/extension; use `--video-task generate` for new reference-to-video output. Use Wan 3.0 for up to 5 ordered video/audio references and 1080p, MiniMax H3 for 2K/4K, or Seedance 2.0 when quality-tier control matters.\\n- First and last frame control: Gemini Omni 1.1 Flash, Wan 3.0, MiniMax H3, MiniMax H3 Max, Seedance, Kling O3, and Kling 3.0 support it. For Gemini, every start/end frame counts toward the 10-image total, leaving up to 9 references with a start frame or 8 with both frames.\\n- Extension with a 1-30s uploaded source uses Gemini Omni 1.1 Flash plus `--source-video` and `--video-task extend` (or `--extend`). Pass an explicit 3-10s output duration; the model appends it at the end, up to 40 seconds total. Up to 3 short creative `--ref-video` clips may accompany the source. Uploaded-video extensions cannot add new dialogue. Official Google interaction continuation uses `--previous-interaction-id <id>` and defaults to a conversational edit; it may also carry creative references, and `--video-task extend` lengthens it with speech support. Fal returns interaction IDs, but its currently published callable v1.1 endpoints do not expose continuation/extension or mixed source-edit references; never infer a route or silently fall back to paid Google.\\n- Wan 3.0 reference mode and frame mode are separate. It accepts 10 images, 5 videos, and 5 audio clips, at most 20 media files total. Video and audio each total at most 15 seconds. `--file-url` and `--web-url` require `--thinking`. `--auto-duration` cannot be combined with `--duration`.\\n- MiniMax H3 reference mode and first-plus-last-frame mode are separate. Audio cannot be the only reference. Address references as `Image 1`, `Video 1`, and `Audio 1` in array order.\\n- Seedance reference mode and first-plus-last-frame mode are separate. Do not promise reference video/audio plus a last frame in one generation.\\n- Multi-prompt sequencing: use Kling 3.0 Turbo, Kling O3, or Kling 3.0.\\n- Kling 3.0 image-to-video and Kling O3 reference-to-video accept repeatable structured `--element` JSON. Each element is image-backed (`frontal_image_url` plus 1-3 `reference_image_urls`) or video-backed (`video_url`). Either form may include `voice_id`. Keep the voice ID inside the same element so the association is preserved. Reference them as `@Element1`, `@Element2`. Kling V3 Turbo rejects elements.\\n- Kling 2.6 Pro image-to-video accepts one or two repeatable `--voice-id` values. Cite them as `<<<voice_1>>>` and `<<<voice_2>>>` in the prompt. Voice control costs 17 cr/s. Use `videodraft kling-voices list|create|delete` to manage the separate Kling video-control voice library. Creating a voice requires a clean 5-30 second, up-to-50MB single-speaker `.mp3`, `.wav`, `.mp4`, or `.mov` sample plus `--confirm-consent`. Creation costs 1 VideoDraft credit on the platform Fal account and 0 credits with Fal BYOK; use the create command\'s `--estimate` flag to check without creating.\\n- Kling V3 voice control costs 16 cr/s for Standard and 20 cr/s for Pro.\\n- Seedance quality: `mini` for the lowest cost, `fast` for speed, `standard` for maximum quality and for 1080p/4K. Seedance 2.5 has a single tier and ignores `--quality`.\\n- Longer than 15 seconds, or more than 9 image / 3 video / 3 audio references: use Seedance 2.5. It reaches 30s and 30/10/10 references (50 files total) at 480p/720p/1080p, but has no 4K.\\n- Real identifiable people in Seedance 2.x require an explicit routing and pricing opt-in. Set MCP `allow_real_people: true` or CLI `--allow-real-people` on the first request when supplied visual input media visibly contains one, including a start frame, end frame, reference image, or reference video. Keep the Byteplus default for text-only requests, non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. This keeps Byteplus first, permits a submit-time Fal fallback, and charges Fal\'s higher tier-specific rate.\\n- If a default-priced Seedance request fails with `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the higher rate, follow the user\'s spend policy, and retry once with the option enabled. The response also carries `retry_with: { allow_real_people: true }`, `cli_flag: \\"--allow-real-people\\"`, and `retry_policy: \\"once\\"`. If the option was already enabled, do not repeat the same request. Byteplus may accept a task and reject the output later. VideoDraft refunds that failed generation, but it cannot reroute the asynchronous failure to Fal. Rephrase or change the references instead.\\n\\n### Video edit and motion-control categories\\n\\nUse `videodraft models video --category video_edit` for existing-video transforms and `--category motion_control` for motion transfer.\\n\\n| Need | Command/model | Important limits |\\n| ------------------------------------------ | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| Most edits of a source up to 10s (DEFAULT) | `videodraft edit video <video> \\"...\\"` (auto-selects `gemini-omni-1.1-flash`) | Source <=10s or it REFUSES; up to 10 image refs and 3 creative video refs <=3s each; 360p/720p/1080p/4K; audio always regenerated (no `--preserve-audio`) |\\n| Cheapest simple prompt edit | `videodraft edit video <video> \\"...\\" --model grok-imagine-video-edit` | No image refs; source silently truncated to 8s; auto/480p/720p |\\n| Edit with several image references | `--model happy-horse-video-edit --ref ...` | Up to 5 refs; 720p/1080p; source silently truncated to 15s; highest rate (28-56 cr/s) |\\n| Controlled Kling edit | `--model kling-o3-video-ref-edit --ref ...` | Up to 4 refs; Standard/Pro; source silently clamped to 3-10s |\\n| Transfer reference motion to an image | `videodraft edit motion <image> [direction] --motion-video <video>` | Prompt/direction is optional; Kling V3 default; optional one image-only `--element`; element requires video orientation |\\n\\nIf the user explicitly names one of these models, preserve it. The CLI uploads local source videos and reference images automatically. Editing returns an async job and waits by default.\\n\\n**Omit `--model` and the SERVER chooses**, because only it can measure the source. It picks `gemini-omni-1.1-flash` for any source up to 10s. When that is not safe (source longer than 10s, unmeasurable duration, `--preserve-audio`, more than 10 refs, or Fal BYOK with refs) it spends nothing and returns a priced menu: per model, the seconds it would edit, the seconds it would drop, and the credit cost. The CLI prints that table and exits 2. Show it to the user, then re-run with `--model`.\\n\\n**Truncation is the trap here.** Only Gemini refuses a source it cannot fully consume. Every other edit model accepts a 30s clip and returns an edit of its first 8-15 seconds with no error. `videodraft edit video` now warns when this will happen and the tool response carries `source.truncated` / `source.dropped_seconds`; relay it to the user rather than letting them discover it in the output.\\n\\nTo edit a longer source without losing its tail, cut it into <=10s pieces with `videodraft_editor`, edit each with Gemini, then reassemble and export there. VideoDraft has no server-side split/concat, so this needs the native editor.\\n\\nKling O3 is also exposed for reference generation. `videodraft generate video --model kling-o3-video-ref-edit` requires exactly one `--ref-video` and generates a new reference-guided clip. Wan 3.0 handles new text, frame, and mixed-reference generation, but is not an existing-source edit model.\\n\\n### Reference-first video workflow\\n\\n- Prefer a start frame or reference image whenever a specific character, product, location, style, composition, or brand identity must stay recognizable.\\n- If the user gives a reference, pass it. Never silently replace it with a text description.\\n- If no reference exists and continuity matters, generate a still first with the user\'s explicitly requested compatible image model, otherwise use Nano Banana 2. Wait for the image URL, then animate it with the selected video model. Confirm the combined image plus video cost before starting.\\n- For multi-shot scenes, generate shot images with `videodraft shots <project_id> --model <selected-image-model> --grid`. Preserve an explicitly requested compatible image model; otherwise use `nano-banana-2`. The grid establishes the scene and characters together, then decodes into individual shot images.\\n- Animate the decoded shot images as per-shot start frames or references. Do not independently text-generate each video clip when the shots need to match.\\n- Pure text-to-video remains appropriate for generic one-off footage where no subject, composition, or continuity needs to be preserved.\\n\\n### Audio\\n\\n- **Seed Audio 1.0**: use `videodraft generate audio` for open-ended speech, sound, music, or prompt-driven audio editing. It accepts up to three audio references or one image. Address audio references as `@Audio1`, `@Audio2`, and `@Audio3`. Preset and custom cloned voice IDs are supported. Output is up to 120 seconds. There is no requested-duration input. The CLI automatically retries transient responses with one idempotency key. To recover after the CLI process itself is interrupted, set `--idempotency-key <uuid>` on the original command and reuse it.\\n- **Voiceover/TTS**: prefer ElevenLabs. Brittney is the platform default voice; under ElevenLabs BYOK, use a compatible voice from the user\'s account. Honor another supported voice/provider when the user explicitly selects it.\\n- **Dialogue, voice changing, and dubbing**: ElevenLabs only.\\n- **Sound effects**: ElevenLabs Sound Effects only.\\n- **Music**: use `lyria-3-clip-preview` for a short instrumental/background score, `lyria-3-pro-preview` for a longer or higher-quality instrumental score, and `elevenlabs-music` when vocals/lyrics or a specified 10-120 second length matter.\\n- Voice Changer and Dubbing require the source media duration and currently accept source media up to 300 seconds.\\n\\n### Avatar / talking head\\n\\n**First decide the framing, not just \\"someone talks\\".** This lane animates a PORTRAIT facing the lens. A character delivering a line inside a real scene, with blocking, framing or camera movement, belongs to `generate video` instead: use `kling-2.6-pro` (one or two voices cited as `<<<voice_1>>>` / `<<<voice_2>>>`), `kling-3.0` (a voice bound per element, so several characters can speak in one shot), or `happy-horse` (strong character identity from a frontal image, native audio, multilingual lip-sync). Sending a cinematic shot to Fabric returns a head-on talking headshot, not the shot that was asked for. `videodraft models video --json` lists these under `recommended.in_scene_dialogue`.\\n\\nFor a presenter, spokesperson or explainer speaking to camera, VEED Fabric is the preferred model. Choose the dedicated path from the media the user already has:\\n\\n| Starting media | Command | Use |\\n| ----------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------- |\\n| Portrait + script, reusable avatar record | `videodraft avatar create <portrait> --script \\"...\\"` then `avatar render` | Managed avatar flow with bundled speech preparation |\\n| Portrait + text | `videodraft avatar fabric <portrait> --text \\"...\\"` | One-off direct VEED Fabric text mode |\\n| Portrait + existing audio | `videodraft avatar fabric <portrait> --audio <audio>` | One-off direct VEED Fabric audio lip sync |\\n| Existing video + existing audio | `videodraft avatar lipsync <video> --audio <audio>` | Sync Labs Lipsync 2 |\\n\\nThe managed renderer is VEED Fabric Fast (`veed/fabric-1.0/fast`). Direct Fabric and Sync Labs are paid AI Studio generations and return async job IDs.\\n\\n1. Obtain the avatar image. Prefer the user\'s supplied portrait or an existing character. If none exists, use the user\'s explicitly requested compatible image model, otherwise generate a front-facing head-and-shoulders portrait with `nano-banana-2`, direct eye contact, a natural expression, and a clean background. Match the intended video aspect ratio when practical.\\n2. If the portrait is visibly soft or too small, run Topaz image enhancement/upscaling before animation.\\n3. Generate a script only if needed: `videodraft avatar script \\"<idea>\\"`.\\n4. Create the avatar record and speech: `videodraft avatar create <portrait-url-or-file> --script \\"...\\" --voice <id> --ar 9:16`. Prefer ElevenLabs when unspecified, but honor another explicitly selected supported voice/provider.\\n5. Render with VEED Fabric: `videodraft avatar render <avatar_video_id> --resolution 720p`.\\n\\nThe portrait is passed as the avatar\'s character image, not as a generic video\'s start frame. Prefer rendering directly at 720p. Use 480p only when the user prioritizes lower cost. Avatar script generation and `avatar create` (including speech) are bundled/free. Confirm the Fabric render cost, plus portrait generation or upscaling when needed.\\n\\nDirect Fabric text/audio and Sync Labs do not use the managed avatar record. The CLI uploads local portrait, video, and audio files automatically. `avatar fabric --speed fast` applies only to audio mode. Sync costs 5 credits per verified audio second; under Fal BYOK, `sync_mode` remains available but `temperature` and `active_speaker` are ignored by the provider.\\n\\n### Upscaling / enhancement\\n\\n- **Images**: Topaz via `videodraft upscale image <url-or-file> --scale 1x|2x|4x`. Use 1x for light enhancement without enlargement, 2x as the general default, and 4x only when the source quality and target size justify it. The result is synchronous.\\n- **Videos**: Topaz via `videodraft upscale video <url-or-file> --scale 2x`. Use 2x by default. The job is asynchronous; the CLI waits by default, while MCP callers poll `check_generation_status`. MCP video input must be VideoDraft-hosted, so upload local or external sources first.\\n- Use upscaling to preserve the image/video while improving detail, resolution, or cleanup. It cannot fix the wrong subject, misspelled text, bad framing, unwanted objects, broken continuity, or incorrect motion. Use an edit or regeneration for those problems.\\n- For a new Fabric avatar, render directly at 720p instead of rendering at 480p and then upscaling. Upscale the source portrait first only when the portrait itself is low quality.\\n\\n## Capability gotchas\\n\\n- Each model\'s `inputs` block is authoritative: supported `aspect_ratios`, `resolutions`, `quality_options`, `start_frame`/`end_frame`, `max_reference_images/videos/audio`, `multi_prompt`, `audio_toggle`. Passing an unsupported input fails with a clear error \u2014 check first, don\'t trial-and-error paid calls.\\n- Most video models support only 16:9 / 9:16 / 1:1. A 3:4 request hard-fails on most.\\n- `--seed` reproduces a specific output on models that support it (e.g. Flux, Ideogram V4); everything else ignores it. You do not need a seed for variation \u2014 `--num` already varies.\\n- `--rendering-speed` applies to Ideogram (V3: `Default`/`Turbo`/`Quality`; V4: `Turbo`/`Balanced`/`Quality`) and affects image cost \u2014 pass it to `videodraft costs ... --rendering-speed <tier>` for an accurate estimate. Always trust `videodraft models image --json` over this list; new models and tiers appear there the moment the platform ships them, with no CLI update.\\n- `seedream-v5-pro` supports unified text-to-image and reference-image editing with up to 10 image references. Use `--resolution 1K` for 7 credits/image or `--resolution 2K` for 14 credits/image.\\n- Reference inputs: `--ref <img>` (images, including up to 10 total for Gemini Omni 1.1 Flash and Wan 3.0, and 7 for Grok 1.5), `--source-video <v>` (Gemini uploaded edit/extension source), `--ref-video <v>` (up to 3 creative videos <=3s each for Gemini Omni 1.1 Flash; also Wan 3.0, MiniMax H3, and Seedance 2), `--ref-audio <a>` (Wan 3.0, MiniMax H3, Seedance 2), and `--element \'<json>\'` or `--element @elements.json` for Kling V3/O3. For an exact Seedance 2.x reference-video `--estimate`, add `--ref-video-seconds <combined-seconds>`; Seedance bills input seconds alongside output. Wan 3.0 and MiniMax H3 do not bill input reference seconds. The CLI uploads local media references and every structured element without flattening the source/reference roles. `--segment \\"<prompt>:<seconds>\\"` (repeatable) drives Kling 3.0, Kling 3.0 Turbo, and O3 multi-prompt generation. Use 1-6 segments of 1-15 whole seconds each, with 3-15 seconds total. `generate image --video-ref` is the nano-banana-2 video reference.\\n- The top-level prompt is OPTIONAL for Gemini Omni 1.1 Flash media-input or continuation calls, Wan 3.0 frame/reference modes, `generate video` with multi-prompt models, and Kling 3.0 Turbo (`--model kling-v3-turbo`) image-to-video. Text-only Gemini and Wan calls still require a prompt unless their live schema says otherwise.\\n- Hosted AI Production fallback: `videodraft produce <project> --mode full_video` generates one Seedance 2 video per scene; add `--allow-real-people` when a scene grid visibly contains a real identifiable person. The MCP equivalent is `produce_project` with `mode: \\"full_video\\", allow_real_people: true`. The option applies the higher Fal-tier rate to every submitted scene segment. If a partial run returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, rerun the same project once with the option after cost confirmation. The server reconciles asynchronous results first, preserves running/completed jobs, and retries only failed placeholders carrying that exact code. Poll with `videodraft generations`, then `videodraft finalize <project>` swaps them into the hosted timeline before `export`. In VideoDraft ADE, do not choose this path while `videodraft_editor` is available unless the user explicitly requests hosted production. Generate or download the scene assets, import them, and assemble/export with the native editor instead. If the user explicitly requests another compatible video model for a hosted production, do not use this fixed Seedance path; generate the project shots manually with the requested model and attach them to the hosted timeline.\\n\\n## Cost model\\n\\n- Images: per image (\xD7 `--num`). Matrix-priced models (GPT-Image, Nano Banana Pro, Seedream v5 Pro) vary by resolution/quality.\\n- Video: usually credits/second \xD7 duration; rate depends on model + resolution + quality + native audio on/off.\\n- Gemini Omni 1.1 Flash: 3 / 10 / 15 / 30 credits per output second at 360p / 720p / 1080p / 4K (720p default). Official Google Extend appends an explicit 3-10 seconds to a 1-30s uploaded source or prior interaction, up to 40 seconds total. Fal BYOK generation and basic source edits cost zero VideoDraft credits; continuation, extension, and separate creative references on a source edit are unavailable under Fal BYOK.\\n- MiniMax H3: 5 / 6 / 13 / 16 credits per output second at 480p / 768p / 2K / 4K (768p default). The first 5 reference images are included, then 8 credits for each additional image. Reference video and reference audio are NOT billed.\\n- MiniMax H3 Max: 5 credits per output second at 480p or 8 credits per second at 768p (default).\\n- Wan 3.0: 7 / 14 / 28 credits per output second at 480p / 720p / 1080p. Auto duration reserves 30 seconds and reconciles unused credits from the provider-reported output duration. Fal BYOK charges zero VideoDraft credits.\\n- Grok Imagine Video 1.5: 8 credits/output second at 480p, 14 at 720p, or 25 at 1080p, plus 1 credit for each first-frame or reference image. Native generated audio is part of every output.\\n- Kling voice control: 17 credits/output second for Kling 2.6 Pro, 16 at Kling V3 Standard, and 20 at Kling V3 Pro.\\n- Shot-image batches: one image per shot (+1 grid image per scene in `--grid` mode) \u2014 the largest single spend in the pipeline.\\n- VEED Fabric avatar renders: ~10 credits/sec at 480p, ~20/sec at 720p. Avatar creation and its speech are bundled/free; only optional portrait generation/upscaling adds cost before the render.\\n- Direct VEED Fabric: text or normal audio is 8 credits/sec at 480p and 15/sec at 720p; fast audio is 10/sec at 480p and 20/sec at 720p.\\n- Sync Labs Lipsync 2: 5 credits per verified audio second.\\n- Voiceover TTS: 10 credits per 1000 characters for standard voices, 30 per 1000 for cloned `custom-*` voices (min 1, pro-rated); applies to standalone voiceovers AND per-scene narration during `produce`. Silent tracks are free. Voice cloning itself is a flat 150 credits per clone.\\n- Lyria music: flat per track, 4 credits (clip) / 8 credits (pro).\\n- Seed Audio 1.0: 19 credits per actual output minute, prorated and rounded up to a whole credit. VideoDraft reserves the 120-second maximum of 38 credits and refunds the unused portion after generation. Fal BYOK is free.\\n- ElevenLabs audio: sound effects are per second, dialogue is per character, music/voice-changer/dubbing are per started minute. Voice changer and dubbing reject source media above 300s in the current synchronous flow.\\n- Seedance 2.0 / 2.5 real people: every listed Seedance 2.x rate assumes `--allow-real-people` is OFF, which uses the Byteplus-priced path (2.0 Mini 4/8 cr/s, Fast 6/13, Standard 7/16/38/78, 2.5 11/24/57 for 480p/720p/1080p). Byteplus refuses real-person likenesses, so a likeness-policy failure does not fall back by default. Passing `--allow-real-people` keeps Byteplus first but permits a submit-time Fal fallback, which allows them, and prices at Fal\'s rate for that tier: 2.0 Mini 8/16, Fast 11/25, Standard 14/31/69/156, 2.5 23/48/114. That is roughly 2x but not exactly 2x: the Seedance 2.0 1080p pair is 38/69, or about 1.82x. If Byteplus accepts the task and later rejects the generated output, VideoDraft refunds the failure but does not resubmit it to Fal. Pass the option proactively only when supplied visual input media visibly contains a real identifiable person. Otherwise retry once only after the exact opt-in code.\\n- Grok Imagine images: `grok-imagine` is a flat 2 cr (3 with a reference). `grok-imagine-2.0` is a separate, newer model priced by resolution and quality: 1K 4 (low) / 6 (medium), 2K 6 / 8, plus 1 cr per reference image (up to 3). v1 is NOT superseded \u2014 pick it when cost matters more than 2K.\\n- xAI bills refused requests, so failed Grok generations are not refunded.\\n- Upscales: priced by scale and source size.\\n\\nQuote before spending:\\n\\n```bash\\nvideodraft costs gemini-omni-1.1-flash --type video --duration 8 --resolution 720p --audio\\nvideodraft costs minimax-h3 --type video --duration 10 --resolution 2K --ref-images 7\\nvideodraft costs minimax-h3-max --type video --duration 10 --resolution 768p\\nvideodraft costs grok-imagine-video-1.5 --type video --duration 8 --resolution 720p --ref-images 4\\nvideodraft costs seedance-2 --type video --duration 15 --resolution 720p --quality standard --audio\\nvideodraft costs grok-imagine-2.0 --type image --resolution 2K --quality medium --num 2\\nvideodraft costs seedance-2 --type video --duration 15 --resolution 720p --quality standard --audio --allow-real-people # Fal-tier rate\\nvideodraft costs elevenlabs-dubbing --type audio --duration 60\\nvideodraft costs seed-audio-1.0 --type audio --duration 60 # scenario only; model controls actual length\\nvideodraft costs elevenlabs-dialogue --type audio --chars 350\\nvideodraft costs voiceover --type audio --chars 800 # TTS: 10 cr / 1000 chars\\nvideodraft generate video \\"...\\" --model gemini-omni-1.1-flash --estimate # same quote, inline\\nvideodraft generate video \\"...\\" --model minimax-h3-max --duration 8 --resolution 768p --prompt-expansion-mode balanced --safety-checker true\\n```\\n","references/pipeline.md":"# VideoDraft pipeline reference\\n\\nEverything here describes the hosted fallback pipeline through the CLI (`videodraft <command>` / `videodraft call <tool>`) or hosted MCP connector (tool names in backticks). When the local `videodraft_editor` MCP is available, do not use hosted production or export by default. Use hosted tools only for asset generation and optional script/storyboard stages, then import the results and finish with the native editor reference linked from SKILL.md. Continue through `produce_project` and `export_video` only when the user explicitly requests a hosted web production or the native editor is unavailable.\\n\\nUse direct asset tools for standalone images, clips, audio, upscales, and descriptions. Use a hosted project when the user explicitly wants the editable web project, when a hosted storyboard stage is useful, or when the native editor is unavailable. Script-only uses a script-stage project and stops at the script. In VideoDraft ADE with editor tools present, stop before hosted production, import the generated assets, and build/export the native project.\\n\\n## Stages and their tools\\n\\n| Stage | CLI | Underlying tool |\\n| --------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------ |\\n| Idea \u2192 full storyboard project | `videodraft create \\"<idea>\\"` | `generate_storyboard_from_idea` |\\n| Idea \u2192 script only (stop there) | `videodraft create \\"<idea>\\" --script-only` | `generate_script_from_idea` |\\n| Footage IS the video | `videodraft call generate_storyboard_from_media` | `generate_storyboard_from_media` |\\n| Batch shot images | `videodraft shots <project>` | `generate_shot_images` |\\n| One shot image | `videodraft generate image --project <id> --scene N --shot M` | `generate_image` |\\n| Produce (voiceover, captions, timeline) | `videodraft produce <project>` | `produce_project` |\\n| Seedance full-video production | `videodraft produce <project> --mode full_video` | `produce_project` with `mode: \\"full_video\\"` |\\n| Per-shot motion prompts | `videodraft video-prompts <project>` | `generate_video_prompts` |\\n| Motion clip for a shot | `videodraft generate video --project <id>` | `generate_video` |\\n| Attach a finished clip to the timeline | `videodraft attach <project> --scene N --shot M --media <url> --type video` | `attach_media_to_shot` |\\n| Background music | `videodraft generate music --attach <project>` | `generate_music` / `set_background_music` |\\n| General or reference-driven audio | `videodraft generate audio \\"...\\"` | `generate_audio` |\\n| Sound effect | `videodraft generate sound-effect \\"...\\"` | `generate_sound_effect` |\\n| Dialogue audio | `videodraft generate dialogue --line \\"voice:text\\"` | `generate_dialogue` |\\n| Voice changer | `videodraft generate voice-changer <audio>` | `change_voice` |\\n| Dubbing | `videodraft generate dub <audio_or_video>` | `dub_media` |\\n| Scene voiceover | `videodraft generate voiceover --project <id> --scene N` | `generate_voiceover` |\\n| Avatar script | `videodraft avatar script \\"<idea>\\"` | `generate_avatar_script` |\\n| Avatar + speech | `videodraft avatar create <portrait> --script \\"...\\"` | `create_avatar_video` |\\n| Talking-head render | `videodraft avatar render <avatar_video_id>` | `render_avatar_video` + `get_avatar_video` |\\n| Direct portrait + text/audio | `videodraft avatar fabric <portrait> --text \\"...\\"` or `--audio <file>` | `generate_veed_fabric_video` |\\n| Existing video + replacement audio | `videodraft avatar lipsync <video> --audio <file>` | `generate_sync_lipsync_video` |\\n| Existing-video AI edit | `videodraft edit video <video> \\"<change>\\" --model <video-edit-model>` | `edit_video` |\\n| Motion transfer | `videodraft edit motion <image> [direction] --motion-video <video>` | `generate_motion_control_video` |\\n| Image enhancement/upscale | `videodraft upscale image <image>` | `upscale_image` |\\n| Video enhancement/upscale | `videodraft upscale video <video>` | `upscale_video` |\\n| Final MP4 | `videodraft export <project>` | `export_video` + `check_export_status` |\\n\\n## Rules that prevent broken results\\n\\n- **The storyboard is generated FROM the script**, never from the raw idea. `videodraft create` runs the whole chain correctly. Don\'t call `generate_storyboard_scenes` with a raw idea as the \\"script\\".\\n- **Visual consistency**: never generate a storyboard shot in isolation. Shot prompts carry `[[asset:Name]]` / `[[shot:X-Y]]` tags that `generate_shot_images` resolves against the project\'s visual assets and prior shots. When generating a single shot whose prompt has no tags, pass `--ref` images yourself (the project\'s visual assets and/or the previous shot\'s image; `projects get` exposes both). For scenes with multiple shots or recurring characters, prefer `videodraft shots <project> --model <selected-image-model> --grid`: preserve an explicitly requested compatible image model, otherwise use `nano-banana-2`. It creates one coherent scene grid, then decodes it into individual shot images.\\n- **Reference-first video**: when identity, styling, or composition matters, do not generate each motion clip from text alone. Generate or select the shot still first, then pass the decoded shot image as `--start-image` or `--ref` to the selected video model. AI Production already composes scene grids and sends them to Seedance as references. If the user explicitly requests another compatible video model, bypass fixed Seedance full-video mode and generate the per-shot clips with the requested model, using the individual decoded shot images as anchors.\\n- **Seedance full-video real people**: when a hosted `full_video` scene grid visibly contains a real identifiable person, enable the option before submitting any scene videos. Keep the Byteplus default for non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. Use `videodraft produce <project> --mode full_video --allow-real-people`, or MCP `produce_project` with `mode: \\"full_video\\", allow_real_people: true`. This applies Fal-tier pricing to every submitted segment and permits the Byteplus-to-Fal fallback. If a partial run without the option returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, re-estimate, follow the user\'s spend-confirmation preference, and rerun the same project once with the option. The server reconciles asynchronous results first, preserves running/completed jobs, and retries only failed placeholders carrying that exact code. Do not loop when it was already enabled. VideoDraft refunds a Byteplus task rejected after asynchronous acceptance, but cannot reroute it; rephrase or change the scene references instead.\\n- **Hold off generating shot images while the user is still iterating** on storyboard structure.\\n- **produce \u2192 export ordering**: `export` requires a produced project where every production scene has timeline media. If `produce` returns `generating_shot_images`, poll the job ids it returns, then re-run produce.\\n- **Do not attach motion clips before production exists**: run `produce` successfully first, then attach finished motion clips to the production timeline. Attaching before `production_data` exists cannot place them in the final timeline.\\n- **Generated motion clips do not auto-attach**: after `generate video` completes, attach the clip with `attach_media_to_shot` (`media_type:\\"video\\"`, include `duration_seconds`) \u2014 it replaces the production timeline clip while keeping the storyboard still.\\n- **Talking heads use dedicated avatar tools**: do not use `generate video`. Use managed `avatar create` and `avatar render` for reusable avatars, direct `avatar fabric` for a portrait plus text/audio, and `avatar lipsync` for an existing video plus replacement audio. Reuse a supplied person image or generate a clear front-facing portrait with the explicitly requested compatible image model, otherwise Nano Banana 2. Managed avatar creation and speech are bundled/free; direct Fabric, Sync, and render are paid.\\n- **Existing-video edits use their own category**: call `edit_video` or `videodraft edit video` with a `video_edit` model when transforming the source itself. Kling O3 also has a reference-generation mode that creates a new guided clip. Wan 3.0 is a text/frame/reference generation model, not a source-video editor. Motion transfer similarly uses `generate_motion_control_video` or `videodraft edit motion` with a `motion_control` model.\\n- **Upscaling preserves rather than redesigns**: use Topaz when resolution, detail, or cleanup is the problem. Regenerate or edit when the subject, text, framing, continuity, or motion is wrong. Upscale a low-quality avatar portrait before Fabric; do not render a new avatar at 480p just to upscale the result.\\n- **Timeouts on the one-shot create**: if `create` times out at the transport layer, the project was still created server-side \u2014 `videodraft projects list`, take the most recent, and resume with its id. Don\'t start a duplicate.\\n\\n## User-attached media: classify roles first\\n\\nFor EACH attached file decide:\\n\\n- **visual_asset** \u2014 recurring reference (character / product / location / style). Upload, then pass in `visual_assets` of `generate_storyboard_from_idea` (via `videodraft call`), or add to an existing project with `add_visual_assets`. Type must be one of `character | object | location | style | custom` with a short name + concrete description.\\n- **shot** \u2014 the media IS footage for the video. Whole video = footage \u2192 `generate_storyboard_from_media`. Idea + footage \u2192 `generate_storyboard_from_idea` with `shot_media`. Existing storyboard \u2192 `attach_media_to_shots`.\\n- **reference** \u2014 inspiration only \u2192 fold a description into the idea/instructions; don\'t place it as a shot or asset.\\n\\nAmbiguous (e.g. a person holding a product)? Ask the user.\\n\\nUploads persist in the media library \u2014 recall later with `videodraft media list`.\\n\\n## Editing project data safely\\n\\n1. `videodraft call get_project_schema` \u2014 read the structure once per session.\\n2. `videodraft projects get <id> --raw` \u2014 the exact editable blob.\\n3. Modify; then `videodraft call update_project --stdin` with `{\\"project_id\\": \\"...\\", \\"data\\": {...}}`.\\n - Objects deep-merge key-by-key; **arrays replace wholesale** \u2014 send the complete array you\'re changing (e.g. all of `storyboard.scenes`).\\n - Scene shot arrays (`image_prompt` / `shot_types` / `shot_actions` / `search_prompt` / `preview_media`) are auto-aligned; fix-ups come back as warnings.\\n4. Snapshot before risky edits: `videodraft checkpoint create <id> --name \\"before re-script\\"`. Restore with `videodraft checkpoint restore <id> <version>`.\\n\\n## AI Studio sessions (standalone generations)\\n\\nProject generations group automatically, and standalone work is grouped per conversation (MCP) or per working directory (CLI) by the connection session \u2014 see the \\"AI Studio sessions\\" section of SKILL.md. Once the task is clear, give that automatic session a concise 3-6 word title before the first generation:\\n\\n```bash\\nvideodraft sessions name \\"Fox Brand Explorations\\"\\nvideodraft generate image \\"...\\"\\n```\\n\\nNaming creates the session with that title. If generation, a user, or an earlier agent created it first, the existing name is preserved. The command refuses to run while `VIDEODRAFT_SESSION` is set, because that override would send later generations to a different session. Use `sessions create` plus `--session` only to continue or deliberately create a separate group.\\n"}') {
5766
- return JSON.parse('{"SKILL.md":"---\\nname: videodraft\\ndescription: Create and edit AI videos, images, Seed Audio, voiceovers, music, sound effects, dialogue, dubbing, storyboards, avatar videos, media upscales, and product/ad videos with VideoDraft. Use whenever the user mentions VideoDraft; asks to generate a video, image, audio asset, ad, explainer, storyboard, avatar, upscale, or batch/CI workflow; or wants to assemble, cut, caption, mix, lay out, inspect, or export a native VideoDraft Editor timeline. Covers the cloud `videodraft` CLI/MCP and local headless `videodraft_editor` MCP. When the editor MCP is exposed, prefer it for production, timeline assembly, and export; use cloud production/export only when explicitly requested or the editor is unavailable.\\n---\\n\\n# VideoDraft\\n\\nVideoDraft is an AI video creation platform where asset generation is the priority lane:\\n\\n- **Asset generation**: standalone images, video clips, Seed Audio, voiceovers, music, sound effects, dialogue, voice-changed audio, dubbed media, upscales, and image descriptions. This is the fastest and most important lane. Treat these as complete deliverables when the user asks for assets.\\n- **Asset I/O**: upload local files, download outputs, auto-upload local references, and save generated media where the user can see it.\\n- **Native editing**: local `.vdproject` timelines, cuts, layouts, captions, effects, audio, and exports through the headless VideoDraft Editor. Inside VideoDraft ADE, this is the default production and export lane whenever `videodraft_editor` is available.\\n- **Hosted project production**: idea \u2192 script \u2192 storyboard \u2192 hosted production timeline \u2192 exported MP4. Use the early stages for scripts, storyboards, and generated assets when useful. Treat hosted production and export as a fallback when the native editor is unavailable, or as an explicit destination when the user asks for an editable web project or hosted workflow.\\n\\n## How to connect\\n\\nCloud generation has two equivalent surfaces (same backend, credits, and hosted projects). Native timeline editing is a separate local surface:\\n\\n1. **CLI** (preferred when you have a shell): run `videodraft` if it\'s on PATH; otherwise `npx -y videodraft@latest` runs it with no install (needs Node \u226520; the `-y` skips npx\'s install prompt so it runs non-interactively; the package is fetched on first use and cached). For heavy use, `npm install -g videodraft`. If there\'s no Node/shell here but the MCP connector below is available, use that instead; if neither works, tell the user how to install (https://videodraft.ai/cli).\\n - Auth \u2014 pick by context, don\'t guess:\\n \u2022 INTERACTIVE (a human is in the session, e.g. Claude Code / Codex): on exit code 3 (\\"not authenticated\\"), tell the user to run `videodraft login` in their terminal \u2014 it opens their browser for a one-click VideoDraft sign-in (OAuth), no key to copy. Wait for them to confirm it succeeded, then retry the command. This is the preferred path when the user is present.\\n \u2022 HEADLESS / CI (no browser): set `VIDEODRAFT_API_KEY=vd_mcp_...` (a token the user mints at https://app.videodraft.ai/mcp-keys).\\n \u2022 SECURITY: never ask the user to paste a `vd_mcp_...` token into the chat \u2014 use browser `login` or the env var so the token never lands in the transcript.\\n - Every command accepts `--json` (parse this, don\'t scrape text). Exit codes: 0 ok, 1 error, 2 usage, 3 auth (see Auth above), 4 insufficient credits (\u2192 tell the user, don\'t retry).\\n - Tool discovery: start with `videodraft tools list` for the grouped catalog, then narrow with `videodraft tools list --lane assets`, `--lane asset_io`, `--lane project_data`, or `--lane production`.\\n - Asset lane: `videodraft generate ...`, `videodraft edit video|motion`, `videodraft avatar ...`, `videodraft upscale ...`, `videodraft upload`, and `videodraft download`.\\n - Full API access: `videodraft tools schema <name>`, `videodraft call <tool> --args \'<json>\'`.\\n2. **MCP connector**: if VideoDraft MCP tools (e.g. `generate_storyboard_from_idea`) are available, call them directly \u2014 the CLI\'s curated commands map 1:1 onto these tools.\\n3. **Native editor MCP** (`videodraft_editor`): prefer this for project production, timeline assembly, cutting, layouts, transitions, captions, audio placement, and final export. Inside VideoDraft ADE on a supported Mac, Claude and Codex receive it automatically in both Code and VideoDraft modes. It runs headlessly, so an Open Editor click is not required. Start with `project_control` (`list`, `open`, or `create`); standalone asset generation remains in the cloud CLI or MCP.\\n\\nNative editor mutations are revision-guarded. Send them serially and carry forward each result\'s fresh revision. See [references/editor.md](references/editor.md) for project selection, media import, timing units, mutation deltas, verification, export, and the `videodraft-editor` terminal bridge.\\n\\nIf you are reading this skill through `videodraft skills show skill`, run `videodraft skills show editor` before native editor work to load that reference.\\n\\n**VideoDraft ADE routing rule:** the presence of `videodraft_editor` means the native editor is ready, even when no editor window is visible. Use cloud tools to generate or source assets and, when helpful, scripts or storyboards. Do not call hosted `produce_project` / `videodraft produce` or `export_video` / `videodraft export` by default. Import the assets into the native project, assemble there, and call native `export_start`. Use hosted production/export only when the user explicitly asks for the web workflow or the native editor tools are unavailable. Do not silently fall back to hosted production after a native tool error.\\n\\n## First decision: asset, hosted project, or native edit?\\n\\n- **One standalone asset** (image, clip, voiceover, music track, sound effect, dialogue track, voice-changed file, dubbed media file, upscale, or description): generate it directly. Do NOT create a project.\\n - `videodraft generate image \\"a red fox in snow, cinematic\\" --ar 16:9 --download ./out/`\\n - `videodraft generate video \\"slow dolly over a misty lake\\" --model gemini-omni-1.1-flash --duration 6 --download ./out/`\\n- **Any final video, production timeline, existing footage, local `.vdproject`, or hands-on edit**: use `videodraft_editor` when available. List or open the intended local project, or create a native project for a new production. The editor can work without showing its UI.\\n- **A small set of related assets**: still stay in the asset lane. They are grouped automatically (see [AI Studio sessions](#ai-studio-sessions)); give the current group one useful task-specific name with `videodraft sessions name \\"<name>\\"`. Switch to a project only when the deliverable matches the project criteria below or the user asks to attach the assets to one.\\n- **A generated multi-scene video / ad / explainer**: when the editor is available, use hosted tools only for any needed script, storyboard, shot planning, or generated assets; stop before hosted production, import the assets, and build/export the native timeline. A hosted project is optional unless the user wants the web project or its storyboard workflow.\\n- **A hosted web project or hosted export**: use the hosted pipeline only when the user explicitly asks for it or the native editor is unavailable.\\n- **Just a script** (no video asked for): A script-only request creates a script-stage project but stops at the script. Use `videodraft create \\"...\\" --script-only`; do not build a storyboard the user didn\'t ask for.\\n- **Iterating on existing work**: identify the surface first. Use `project_control` with `action:\'list\'` for native projects and `videodraft projects list` only for hosted work. Never create a replacement project just to change an existing one.\\n\\n## Choose the model from the task\\n\\nIf the user names a model, use it when compatible. If it cannot handle the request, explain why and recommend alternatives instead of silently switching. Otherwise inspect the inputs, duration, audio, quality, speed, and cost, check the live catalog, and pass an explicit model.\\n\\n### Seedance 2.x real-person rule\\n\\nSeedance 2.0 and 2.5 require an explicit, higher-priced routing choice for real-person likenesses:\\n\\n- Enable real-person support on the first request when supplied visual input media visibly contains a real identifiable person. This includes a start frame, end frame, reference image, or reference video. Keep the lower-priced Byteplus default for text-only requests, non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. For MCP use `allow_real_people: true`. For the CLI use `--allow-real-people`. Pass the same value to `get_model_costs` or `videodraft costs` so the estimate matches the charge.\\n- The default is false. It uses the lower Byteplus-priced path, and a Byteplus likeness-policy refusal does not fall back to Fal. Enabling the option keeps Byteplus first but permits a submit-time fallback to Fal, which allows real-person likenesses. The request is charged at Fal\'s higher tier-specific rate even if Byteplus serves it.\\n- If a request made without the option fails with code `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the higher rate, follow the user\'s spend-confirmation preference, and retry exactly once with the option enabled. The structured recovery fields are `retryable: true`, `retry_with: { allow_real_people: true }`, `cli_flag: \\"--allow-real-people\\"`, and `retry_policy: \\"once\\"`. CLI `--json` submit errors expose them under `details`; `status` and `wait` include them on the failed job result. Do not treat an unrelated moderation or provider error as that signal.\\n- Do not loop if the option was already enabled. Byteplus can accept a task and reject its generated output later. VideoDraft refunds that failed generation, but the late asynchronous failure cannot be rerouted to Fal. Rephrase the prompt or use different references before trying again.\\n- For hosted AI Production, the same choice applies to every Seedance scene segment. Use `produce_project` with `mode: \\"full_video\\", allow_real_people: true`, or `videodraft produce <project> --mode full_video --allow-real-people`. If an earlier run partially submitted and returns the opt-in code, rerun that same project once with the option. The server reconciles asynchronous results first, preserves running/completed jobs, and resubmits only failed scene-video placeholders carrying the exact opt-in signal. Keep the native-first VideoDraft ADE routing rule above: hosted full-video production is still explicit/fallback-only when the local editor is available.\\n\\nEvery `videodraft models image|video|audio --json` response carries a top-level `recommended` array (best first) and stamps `recommended` / `recommended_for` on each entry. That is the authoritative preference order and it beats this page when they disagree. Preferred today: images `nano-banana-2`, `nano-banana-pro`, `gpt-image-2`; videos `gemini-omni-1.1-flash`, `seedance-2.5`, `seedance-2`, `kling-3.0`, `kling-v3-turbo`, `kling-o3`; video edits `gemini-omni-1.1-flash`; talking heads `veed-fabric`; motion transfer `kling-v3-motion-control`; audio ElevenLabs for anything with a voice and Lyria for instrumental music. Preference applies only when the user did not name a model.\\n\\n**Images:**\\n\\n- `nano-banana-2`: general default, editing, consistency, and references.\\n- `nano-banana-pro`: maximum quality. `nano-banana-2-lite`: fast, inexpensive drafts.\\n- `gpt-image-2`: posters, logos, signs, title cards, readable text, or precise composition/editing.\\n\\n**Videos:**\\n\\n- `gemini-omni-1.1-flash`: general default for 3-10s generation and uploaded source edits up to 10s. It supports first and last frames, up to 10 total image inputs, up to 3 creative reference videos of at most 3 seconds each, uploaded-video extension, and official Google continuation through `--previous-interaction-id`. Output is 360p/720p/1080p/4K at 3/10/15/30 cr/s with audio always on. Use `--source-video` for the uploaded edit/extension source; extension sources must be 1-30s. Creative `--ref-video` inputs may accompany it or `--previous-interaction-id` on official Google. One `--ref-video` with no separate source remains a legacy source edit. A previous interaction defaults to conversational edit; add `--video-task extend` or `--extend` with an explicit 3-10s duration to append at the end, up to 40 seconds total. Uploaded-video extensions cannot add new dialogue, while previous-interaction extensions can. The server safely measures creative-reference durations, or you can repeat `--ref-video-duration` when a host blocks metadata probing. Fal BYOK supports its currently callable v1.1 generation and basic-edit endpoints at zero VideoDraft credits, but Fal does not expose continuation/extension or mixed source-edit references as callable endpoints and VideoDraft must never fall back to paid Google.\\n- `grok-imagine-video-1.5`: 1-15s text, first-frame, or 1-7 reference-image generation with native audio. Text/first-frame modes support 480p, 720p, and 1080p; reference mode supports 480p/720p. Cite references as `<IMAGE_0>` through `<IMAGE_6>`. It has no last frame, seed, negative prompt, quality tier, reference video, or reference audio.\\n- `minimax-h3`: 480p/768p/2K/4K (5/6/13/16 cr/s, 768p default), native stereo audio, and 5-15s text, first/last-frame, or mixed-reference generation. Reference mode accepts up to 9 images, 3 videos, and 3 audio clips, with at most 12 files total. Cite them as `Image 1`, `Video 1`, and `Audio 1` in array order.\\n- `minimax-h3-max`: 480p/768p pricing (5/8 cr/s, 768p default), native audio, and 5-15s text or first/last-frame generation. It supports a reproducibility seed, a safety checker, and `disabled` / `balanced` / `quality` prompt expansion. It does not accept reference media.\\n- `wan-3.0`: unified 2-30s text, first/last-frame, or ordered mixed-reference generation at 480p/720p/1080p (7/14/28 cr/s), with optional native audio. Reference mode accepts up to 10 images, 5 videos, and 5 audio clips, at most 20 media files total; video and audio each total at most 15 seconds. `--auto-duration` reserves 30 seconds and reconciles to the provider-reported output length. Document/web references use `--file-url` or `--web-url` and require `--thinking`.\\n- `flux-3`: Black Forest Labs FLUX 3. 5-20s at 720p/1080p with 24fps native audio, from a prompt, a first frame, first + last frames, or up to 10 keyframes pinned to specific moments (`--keyframe shot.png@2.5`, repeatable). `--quality draft` renders the same shot at 720p for roughly a third of the cost \u2014 use it to check blocking before committing. Auto duration is text/first-frame only.\\n- `seedance-2`: 11-15s, video/audio/mixed references, wider ratios, selectable audio, or first/last frames. Use `mini` for cost, `fast` for speed, `standard` for quality or 1080p/4K.\\n- `seedance-2.5`: 4-30s single takes and up to 50 references (30 image, 10 video, 10 audio). Same modes as 2.0, one quality tier, 480p/720p/1080p. Reach for it when a shot must run past 15s or carry more references than 2.0 allows.\\n- `kling-v3-turbo`: fast polished 3-15s with first frame, multi-prompt, and audio, but no elements. `kling-o3`: reference images plus structured image/video elements, first/last frames, multi-prompt, audio control, or 4K. O3 allows 7 combined image references and image-backed elements, reduced to 4 combined items when a video-backed element is present. `kling-3.0`: image-to-video can use structured image/video elements and bind a custom Kling voice ID to either element form. Kling 2.6 Pro uses top-level voice IDs cited as `<<<voice_1>>>` and `<<<voice_2>>>`.\\n- Existing-video edits use `videodraft edit video`, not generic generation. `gemini-omni-1.1-flash` is the preferred edit model and is chosen automatically when you omit `--model`: source up to 10s, up to 10 reference images, up to 3 creative reference videos of at most 3s each, 360p/720p/1080p/4K with audio. Repeat `--ref-video-duration` only when automatic measurement is unavailable. Omitting `--model` on a longer or unmeasurable source spends nothing and prints a priced menu (what each model edits, what it drops, what it costs) so you can put the choice to the user. **Truncation:** only Gemini refuses an over-length source. Happy Horse silently edits just the first 15s, Kling O3 the first 10s, and Grok the first 8s. The command warns you when that will happen; always relay it to the user. Gemini regenerates the audio track, so use Happy Horse or Kling O3 with `--preserve-audio` when the source audio must survive. Choose Grok for the cheapest prompt-only edit, Happy Horse for up to 5 image references, or Kling O3 for controlled reference-image edits.\\n- To edit a source longer than 10s without losing its tail, cut it into <=10s pieces in the native editor, edit each with Gemini, and reassemble. VideoDraft has no server-side split/concat, so this path needs `videodraft_editor`.\\n- Kling O3 also has a reference-generation mode. Use `videodraft generate video --model kling-o3-video-ref-edit` with exactly one `--ref-video` to generate a new guided clip; use `videodraft edit video` when changing the source itself. Use Wan 3.0 for new mixed-reference generation, not source-video editing.\\n- Motion transfer uses `videodraft edit motion` with Kling V3 by default, or Kling 2.6 when explicitly requested or lower cost matters. It requires a subject image and a motion-reference video.\\n- Use Veo 3.1 when explicitly requested or as a fallback.\\n\\n**Audio and utilities:**\\n\\n- Use Seed Audio 1.0 for open-ended text-to-audio, speech/music/sound synthesis, voice conditioning, or prompt-driven editing with up to three audio references or one image. Use `videodraft generate audio`. Reference clips are `@Audio1`, `@Audio2`, and `@Audio3` in array order. There is no duration input. Output is up to two minutes and settles at 19 credits per actual minute, with up to 38 credits reserved during generation. The CLI automatically retries transient responses with one operation key. To recover after the CLI process itself is interrupted, set `--idempotency-key <uuid>` on the original command and reuse it.\\n- Prefer ElevenLabs for voiceover, dialogue, voice changing, dubbing, and sound effects. Honor an explicitly selected supported TTS voice/provider. Use Lyria for instrumental music and ElevenLabs Music for vocals, lyrics, or exact timing.\\n- A character who needs to TALK, when you have an image of them, splits by FRAMING:\\n - **Talking to camera** (presenter, spokesperson, explainer): the avatar lane, and VEED Fabric is preferred. Use managed `avatar create` then `avatar render` for a reusable avatar record with bundled speech, `avatar fabric` for a one-off portrait plus text or existing audio, and `avatar lipsync` when both the source video and replacement audio already exist.\\n - **Speaking inside a scene** (real blocking, framing, camera movement): not Fabric. It animates a portrait facing the lens, so a cinematic request comes back as a head-on talking headshot. Use `generate video` with `kling-2.6-pro` (one or two voices cited as `<<<voice_1>>>` / `<<<voice_2>>>`), `kling-3.0` (a voice bound per element, so several characters can speak in one shot), or `happy-horse` (strong character identity from a frontal image, native audio, multilingual lip-sync).\\n- Enhancement: use Topaz image/video upscaling only when the content is already correct. Use image 1x for cleanup, 2x by default, 4x when justified; use video 2x by default. Edit or regenerate creative errors.\\n\\nSee [references/models.md](references/models.md) for the detailed routing table and exact capability limits.\\n\\n## Prefer references when continuity matters\\n\\nPure text-to-image or text-to-video is fine for a generic one-off asset. When a specific character, product, location, style, composition, or brand identity must survive generation, use references instead of hoping the prompt recreates it.\\n\\n- If the user supplies reference media, preserve and pass it. Never reduce the request to text alone.\\n- When continuity matters, generate/select a strong still first with the selected image model (`nano-banana-2` by default), wait for its URL, then animate it as a start frame/reference. Confirm the combined image and video cost.\\n- When using a hosted storyboard stage for multiple shots, use `videodraft shots <project_id> --model <selected-image-model> --grid`, then animate the decoded shots. Preserve explicit models. In VideoDraft ADE, import the resulting assets into the native editor instead of continuing into hosted production. A requested non-Seedance video model must use manual per-shot generation instead of Seedance full-video mode.\\n\\n## Cost and credits\\n\\nDo not call `videodraft credits` before routine generations. Paid endpoints validate and deduct atomically; if the balance is insufficient, the request is rejected before the provider job starts (CLI exit code 4). Check the balance only when the user asks, gives a credit budget, or a large workflow needs budget planning.\\n\\nFor expensive work, estimate with `--estimate` or `videodraft costs`, state the selected model/settings/cost, and get a go-ahead. This matters most for shot-image batches, long or high-resolution video, AI Production, and paid audio batches. Honor the user\'s confirmation preference for the session.\\n\\nKling voice creation costs 1 VideoDraft credit on the platform Fal account and 0 credits with Fal BYOK. Preview it with `videodraft kling-voices create <sample> --name <name> --estimate`; the estimate does not create a voice or require consent confirmation. Actual creation requires `--confirm-consent`.\\n\\nMiniMax H3 costs 5 / 6 / 13 / 16 credits per output second at 480p / 768p / 2K / 4K (768p by default). In reference mode the first 5 images are included and each additional image costs 8 credits. Reference video and reference audio are NOT billed.\\n\\nMiniMax H3 Max costs 5 credits per output second at 480p and 8 credits per second at 768p (default). Use `--prompt-expansion-mode disabled|balanced|quality`; balanced is the default. The safety checker defaults on and can be set explicitly with `--safety-checker true|false`.\\n\\nWan 3.0 costs 7 / 14 / 28 credits per output second at 480p / 720p / 1080p. Auto duration reserves the 30-second maximum and refunds the unused reserve after the provider reports the actual whole-second output length. Fal BYOK runs on the connected user key and charges zero VideoDraft credits.\\n\\nGrok Imagine Video 1.5 costs 8 credits per output second at 480p, 14 at 720p, or 25 at 1080p, plus 1 credit for each first-frame or reference image. Native audio is always generated.\\n\\n`videodraft models image|video` lists the live image and video catalogs with supported inputs. Video entries are grouped as `generation`, `video_edit`, `motion_control`, `avatar_lipsync`, and `upscale`, and each reports the exact tool. Use `videodraft models video --category video_edit` to narrow the list. `videodraft models audio` lists Seed Audio, Google Lyria, and ElevenLabs audio/media tools, while `videodraft models voices` lists TTS voices. Consult them instead of guessing capabilities.\\n\\n## Async jobs\\n\\nImage/video generation is asynchronous: commands submit a job and **wait by default**, printing output URLs (and saving files with `--download`). Large downloaded images also get a downscaled copy in `previews/` next to them (the `preview` field / \\"inspect via preview\\" line in the output) \u2014 **look at the preview, deliver the original**; viewing full-resolution images bloats the chat permanently. In scripts/CI prefer explicit control:\\n\\n```bash\\nJOB=$(videodraft generate image \\"...\\" --no-wait --json | jq -r .job_id)\\nvideodraft wait \\"$JOB\\" --download \\"./outputs/{job_id}_{index}.{ext}\\" --json\\n```\\n\\nFor MANY jobs: submit each with `--no-wait`, collect ALL with one command \u2014 `videodraft wait <id1> <id2> ...` polls every job from one process with one batched request per tick. Do NOT spawn parallel `wait`/`generate --wait` processes for a batch.\\n\\nIf a wait times out, the job is still running server-side \u2014 `videodraft status <job_id>` later. Never re-submit just because a wait timed out (that double-spends credits).\\n\\nFor completed Wan 3.0 jobs, MCP `check_generation_status` and CLI `status`/`wait --json` include `outputMetadata` with Fal\'s returned `seed`, `duration`, and `actual_prompt` when present.\\n\\n## AI Studio sessions\\n\\nEvery standalone (project-less) generation is filed into an AI Studio session in the web app. You do not have to create one:\\n\\n- **MCP hosts** (Claude Code, claude.ai, Codex, VideoDraft ADE): the server mints an `Mcp-Session-Id` on `initialize`; your host echoes it, and this conversation\'s generations land in their own session. Tool results echo it as `ai_studio_session_id`.\\n- **CLI**: the same handshake runs once per (profile, server, working directory) and is cached for 12 idle hours, so everything generated from one directory shares one session. `videodraft sessions current` shows it; `videodraft sessions reset` starts a new one.\\n- Project generations (`--project <id>` / `project_id`) always go to that project\'s session.\\n\\nOnce you understand the creative task, name the current automatic session before the first standalone generation:\\n\\n```bash\\nvideodraft sessions name \\"Purple Seal Rescue Short\\"\\n```\\n\\nChoose a concise, specific 3-6 word title for the intended work. Do not copy the client name, date, or exact chat title. Name it once: the operation creates the session with that title. If generation, a user, or an earlier agent created the session first, its existing name is preserved.\\n\\nPass `--session <id>` / `session_id` only to **continue earlier work** or create an explicit separate group:\\n\\n```bash\\nSESSION=$(videodraft sessions create \\"Fox brand explorations\\" --json | jq -r \'.session.id\')\\nvideodraft generate image \\"a red fox in snow, cinematic\\" --session \\"$SESSION\\"\\nvideodraft generations --session \\"$SESSION\\" # what is in it\\nvideodraft sessions list --name fox # find it again later\\n```\\n\\n`VIDEODRAFT_SESSION=<id>` sets the default for every command (ignored when `--project` is given). While it is set, `sessions name` refuses to run because that command names the current automatic connection session, not the pinned override; unset it first or rename the pinned session in AI Studio. `VIDEODRAFT_SESSION_SCOPE=<label>` groups several directories into one connection session; `VIDEODRAFT_CLIENT_NAME=<host>` labels the fallback placeholder used when generation creates the session before `sessions name`; `VIDEODRAFT_NO_SESSION=1` disables the handshake. Generations that reach the server with no session at all fall back to the account-wide \\"Agent (MCP)\\" session; if you see work landing there, pass `--session` explicitly.\\n\\n## Generation history\\n\\nPast work is queryable \u2014 reuse a previous setup instead of guessing. `videodraft generations` lists recent generations; scope with `--session <id>` or `--project <id>` (includes collaborators\' rows in shared scopes; pass one, project wins), and filter with `--type`, `--model`, `--favorites`. `--full --json` returns each row\'s exact parameters (aspect ratio, resolution, duration, references) \u2014 the human table stays compact, so pair `--full` with `--json`. `videodraft generation <id>` prints one generation\'s complete recipe (prompt, input image, parameters, outputs); `--favorite` / `--unfavorite` stars it. `videodraft sessions list` shows AI Studio sessions (owned + shared) with `--name` search \u2014 take a session id from there to read its history.\\n\\n## Local files and reference images\\n\\nReference inputs must be public URLs. The CLI uploads local files automatically wherever a URL is expected (`--ref photo.jpg`, `--start-image frame.png`), or explicitly:\\n\\n```bash\\nURL=$(videodraft upload ./product.png --json | jq -r .url)\\n```\\n\\nNever silently drop a reference you couldn\'t upload \u2014 stop and tell the user. Never upload a user\'s file to a third-party host.\\n\\nWhen the user attaches media for a native production, import actual footage into the editor by default. For hosted generation/storyboarding, classify each item before acting: a recurring **visual asset** (character/product/location/style), actual **footage to place as shots**, or **inspiration only**. See [references/pipeline.md](references/pipeline.md) for the hosted role mapping.\\n\\n## Showing media to the user\\n\\nGenerated media is **not** displayed in the chat automatically \u2014 you decide what to show. To preview an asset inline, save it locally (use `--download` so it lands under `media/`) and reference its **local path** as a Markdown link with a **leading `./`**:\\n\\n```\\n[ferrari shot](./media/ferrari_01.png) \u2190 image card\\n[the clip](./media/clip.mp4) \u2190 video player\\n[voiceover](./media/vo.mp3) \u2190 audio player\\n```\\n\\nPut the Markdown link **in your message text** \u2014 video and audio embed exactly like images. Do **not** use `SendUserFile` (or other file-send tools) to display media: that renders inside a collapsible tool card and gets buried in the tool list. The Markdown link in your prose is what produces the inline card.\\n\\nUse the path you saved to: a **workspace-relative** path (`./media/clip.mp4`, or `./<any-folder>/clip.mp4` \u2014 any folder in the workspace works), or the **absolute** path for a file outside the workspace (e.g. `/Users/you/Desktop/clip.mp4` or another workspace\'s path). Both render. Show the finished results worth showing (and only those \u2014 not every intermediate job). A bare CDN URL or a JSON dump of output URLs does **not** render; the local-path Markdown link is what produces an inline card.\\n\\n## Native-first VideoDraft ADE pipeline (idea \u2192 MP4)\\n\\nWhen `videodraft_editor` is present:\\n\\n1. Generate or source the script, storyboard, shot images, clips, voiceovers, music, and other assets through the cloud CLI/MCP as needed.\\n2. Call native `project_control` to open or create the `.vdproject`.\\n3. Call native `media_import`, wait for imports to become ready, then assemble and refine the timeline with editor tools.\\n4. Call native `export_start` and use `export_status` for progress and results.\\n\\nDo not run the hosted production or export steps in this path unless the user explicitly asks for a web production.\\n\\n## Hosted fallback pipeline (idea \u2192 MP4)\\n\\nUse this only when there is NO native editor at all, or the user explicitly requests the hosted web\\nworkflow. The native surface is not only the injected `videodraft_editor` MCP: a `videodraft-editor`\\nexecutable on PATH is the same editor reached through its terminal bridge, and\\n[references/editor.md](references/editor.md) covers driving it that way. Treating a missing MCP as\\n\\"no editor\\" sends sessions that have the binary into hosted production for no reason.\\n\\n```bash\\nvideodraft create \\"<idea>\\" --ar 9:16 # project: script \u2192 visual assets \u2192 storyboard\\nvideodraft shots <project_id> --grid --estimate # cost preview, confirm with user\\nvideodraft shots <project_id> --grid # batch shot images (waits, writes onto shot cards)\\nvideodraft produce <project_id> # voiceovers + captions + production timeline\\nvideodraft export <project_id> --download final.mp4\\n```\\n\\nOptional between produce and export: per-shot motion clips (`videodraft generate video ... --project <id>` then place it with `videodraft attach <project> --scene N --shot M --media <url|file> --type video --duration <s>`), music (`videodraft generate music \\"...\\" --attach <project_id>`), and standalone audio assets (`generate audio`, `generate sound-effect`, `generate dialogue`, `generate voice-changer`, `generate dub`). Details, per-step tools and editing rules: [references/pipeline.md](references/pipeline.md).\\n\\n## Avatar and talking-head videos (both surfaces)\\n\\nAvatar generation is cloud-only \u2014 the native editor has no avatar or lipsync tools \u2014 so this applies whether or not `videodraft_editor` is present. Generate the avatar in the cloud; in VideoDraft ADE, import the rendered clip and cut it on the native timeline like any other footage.\\n\\nAvatar/talking-head videos use dedicated commands. For a reusable managed avatar, obtain or generate a clear portrait \u2192 `videodraft avatar script` when needed \u2192 `videodraft avatar create` \u2192 `videodraft avatar render --resolution 720p`. For a one-off portrait, use `videodraft avatar fabric <portrait> --text \\"...\\"` or `--audio <file>`. For an existing video plus replacement audio, use `videodraft avatar lipsync <video> --audio <file>`. Managed script/creation is bundled/free; direct Fabric, Sync, the managed Fabric render, and optional portrait generation/upscaling are paid. Confirm expensive steps first.\\n\\n## Working with hosted project data\\n\\nA hosted project is one JSON blob (script, storyboard scenes, shot cards, visual assets, production timeline). To inspect: `videodraft projects get <id>`. To edit: fetch `--raw`, modify, then `videodraft call update_project` \u2014 objects deep-merge, **arrays replace wholesale** (send the complete `storyboard.scenes` array to change one scene). Snapshot first with `videodraft checkpoint create <id>` before risky edits. Schema reference: `videodraft call get_project_schema`. This does not replace native editor tools when `videodraft_editor` is available for the production itself.\\n\\n## More\\n\\n- [references/pipeline.md](references/pipeline.md) \u2014 hosted fallback data model and production workflow\\n- [references/editor.md](references/editor.md) \u2014 native headless editor routing, project selection, import, timeline edits, verification, and export\\n- [references/models.md](references/models.md) \u2014 choosing image/video models, pricing patterns, voices and styles\\n- [references/examples.md](references/examples.md) \u2014 recipes: batch product videos from a CSV, talking-head from a script, changelog video in CI\\n","references/editor.md":"# Native VideoDraft Editor reference\\n\\nUse this reference when the user wants to assemble, cut, caption, mix, lay out, inspect, or export a local VideoDraft Editor project. The native editor is deterministic and local. Cloud generation remains in the `videodraft` CLI or hosted MCP.\\n\\n## VideoDraft ADE preference rule\\n\\nWhen `videodraft_editor` tools are exposed, treat the native editor as available and make it the default surface for production, timeline assembly, and final export. It is headless by design, so a hidden window or an untouched Open Editor button does not justify using hosted production instead.\\n\\nUse cloud tools for asset generation and optional script/storyboard work, then import the results. Do not call hosted `produce_project` / `videodraft produce` or `export_video` / `videodraft export` unless the user explicitly requests an editable web production or the native editor tools are unavailable. If a native tool call fails after the editor was available, report or recover that native failure rather than silently switching surfaces.\\n\\n## Choose the correct surface\\n\\n- `videodraft` and the hosted VideoDraft MCP generate assets and can manage hosted web projects. They use the user\'s VideoDraft account and credits. In VideoDraft ADE, use them mainly as the source of generated media and optional storyboards for the native production.\\n- `videodraft_editor` edits local `.vdproject` packages. It has no generation, account, model, or credit tools.\\n- Inside VideoDraft ADE on a supported Mac, the editor MCP is injected automatically for Claude and Codex in both Code and VideoDraft modes. It starts headlessly before the chat opens. The user does not need to click Open Editor, and closing or hiding the editor window does not stop headless editing.\\n- Outside that environment, use the editor only if `videodraft_editor` MCP tools are already exposed or the `videodraft-editor` executable is on PATH. Do not confuse the public `videodraft` cloud CLI with the separate native editor executable.\\n\\nPrefer the direct MCP tools when they are available. The terminal bridge is useful for scripts, diagnostics, or an agent session where the MCP was not injected.\\n\\n## Start with the intended project\\n\\nAn MCP session can begin without a project selected. Project selection belongs to the session, not to whichever editor window happens to be frontmost.\\n\\n1. If the user named an existing project but its identity is unclear, call `project_control` with `action:\'list\'`.\\n2. Open the exact project by the returned `id`, unambiguous `name`, or `.vdproject` `path`.\\n3. Create only when the user wants a new local edit. `action:\'create\'` accepts optional `name`, `fps`, `aspectRatio`, and `quality`.\\n4. Treat `isActive` as this MCP session\'s target and `isVisible` as the project shown in the UI. Headless editing only needs the session target.\\n5. Use `action:\'close\'` only when closing is part of the task. It saves first and never deletes the project.\\n\\nDo not substitute a hosted project ID for a native project. A hosted project can supply scripts, storyboards, and generated media, but the native edit is a separate `.vdproject` package.\\n\\n## Keep a reliable editing model\\n\\n- Call `timeline_read` once after opening or creating a project, after switching timelines, or after an out-of-band user edit. It returns the revision and current clip/track state.\\n- Call `media_list` before using a `mediaRef`. Poll imports with a filtered read (`ids` for a known asset, `pending:true` for a batch) instead of repeatedly loading the full library.\\n- Timeline placement uses project frames. Source spans, media durations, transcript segments, and search hits use seconds. Pass those values to the relevant tools as returned; do not multiply by fps yourself.\\n- IDs are short stable prefixes. Pass them back exactly as returned. Tracks use stable `trackId` values; indexes can change.\\n- Send project mutations serially. Pass `ifRevision` from the latest read or mutation when available, then replace it with the fresh revision from the next result. Parallel edits against one project can race or invalidate each other\'s revision.\\n- Every mutation returns a delta in `timeline_read` vocabulary. Patch your working model from that delta instead of re-reading after every successful call. Re-read after a stale-state failure or an out-of-band change.\\n- Use `canvas_arrange` for split screens, picture-in-picture, grids, and canvas placement. Use `tracks_edit` to fix stacking. Do not synthesize layouts from generic transforms or keyframes.\\n- Use `media_view` before describing source content, and `transcript_read` to locate a spoken moment. Use `timeline_view` to verify the composited result the viewer will actually see.\\n- Volume inputs, including volume keyframes, are linear values from `0` to `1`. Timeline reads return the same linear scale.\\n\\n## Bring generated or local media into the editor\\n\\nUse cloud generation for new assets, save or download the outputs, then call native `media_import`:\\n\\n- `source.path`: absolute local file or directory. A directory imports recursively and preserves its folder structure.\\n- `source.url`: HTTPS asset URL. Set `mimeType` when a signed URL has no usable extension.\\n- `source.bytes`: small base64 media with a required `mimeType`.\\n- `source.matte`: generated solid-color image.\\n\\nReadiness differs by source, and so does the poll that detects it:\\n\\n- **URL and single-file path** imports return `status:\'downloading\'` with one `mediaRef`. Poll `media_list` with `ids:[mediaRef]` until `generationStatus` is absent.\\n- **Directory** imports also return `status:\'downloading\'` with one placeholder `mediaRef` for the batch. Poll `media_list` with `ids:[mediaRef]` until `generationStatus` clears; the folder\'s assets then appear. (`pending:true` remains a fallback that lists every unresolved import.)\\n- **Inline bytes and matte** imports finish inline and come back `status:\'ready\'`; no polling needed.\\n\\nNever place a pending asset on the timeline. `generationStatus` is the signal: `preparing` and\\n`downloading` mean keep polling, absent means usable, and **`failed` is terminal** \u2014 report it or\\nretry the import explicitly, never poll on. Do not treat \\"not downloading\\" as ready.\\n\\nFor a batch of local outputs, download them into one workspace directory and import that directory once when practical. This is safer and faster than racing many import calls; poll the batch\'s placeholder `mediaRef` with `ids` to know when it is usable.\\n\\n## Edit and verify\\n\\nUse the tool descriptions as the exact schema. A dependable sequence is:\\n\\n1. `project_control` to select or create the local project.\\n2. `timeline_read` and `media_list` to establish current state.\\n3. `media_view` when content selection matters.\\n4. Serialized clip, track, layout, text, caption, audio, color, effect, or cut mutations using the current revision.\\n5. `timeline_view` when visual composition or layer order matters.\\n6. `undo` if the requested result is wrong and the next mutation would not cleanly correct it.\\n\\nEdits are undoable. Do not ask for confirmation before each ordinary edit. Ask one focused question only when the user\'s creative direction is materially ambiguous.\\n\\n## Export\\n\\n`export_start` queues work in the background and returns a `jobId`, destination, and `started` or `queued` status.\\n\\n- Use `video` for H.264, H.265, or ProRes.\\n- Use `xml` for Premiere Pro.\\n- Use `xml` (XMEML) for Premiere Pro **and DaVinci Resolve** \u2014 Resolve reads XMEML natively.\\n Use `fcpxml` only for Final Cut Pro. Sending Resolve an FCPXML produces a package it cannot\\n open cleanly, so the target matters more than the file extension suggests.\\n- Use `videodraft` for a self-contained project package.\\n- Omit `outputPath` unless the user named a destination; the default is `~/Downloads`.\\n- Use `export_status` to list progress, warnings, and results. Cancel only when the user asks or the just-queued settings were wrong. Do not infer that an export is stuck from elapsed time alone.\\n\\n## Terminal bridge\\n\\nVideoDraft desktop terminals expose `videodraft-editor`, which controls the same process and MCP surface:\\n\\n```bash\\nvideodraft-editor status\\nvideodraft-editor list-tools\\nvideodraft-editor tool project_control --json \'{\\"action\\":\\"list\\"}\'\\nvideodraft-editor tool timeline_read --project \\"/path/to/My Video.vdproject\\" --json \'{}\'\\nvideodraft-editor show\\nvideodraft-editor hide\\n```\\n\\nEach `videodraft-editor` invocation is a separate connection, so a project selected by one call (e.g. `project_control` `action:\'open\'`) is NOT remembered by the next. Pass `--project <path>` on every `tool` call that operates on a project \u2014 without it, a follow-up call like `timeline_read` reports \\"No editor is available\\" even though the open succeeded.\\n\\nControl and tool commands auto-start a headless editor if none is running. `show` only reveals the already-running UI. Use `videodraft-editor tool <name> --json -` to read a JSON object from stdin when shell quoting would be fragile. Never read, copy, or expose the editor\'s rotating local authentication secret.\\n","references/examples.md":"# Recipes\\n\\nWorking patterns for common asks. All assume auth (`videodraft login` once, or `VIDEODRAFT_API_KEY` in the environment) and use `--json` for parsing.\\n\\nInside VideoDraft ADE, if a native editor is available, use these recipes for asset generation and\\noptional script/storyboard stages. Hand the results to the editor for production and export ONLY\\nwhen the deliverable the user asked for is a composed production. A standalone output \u2014 the batch\\nproduct clips in recipe 1, the upscale in recipe 7 \u2014 is finished when it is generated; importing it\\ninto a project and exporting a timeline builds an edit nobody asked for. Recipes below that call `videodraft produce` or `videodraft export` are hosted fallbacks only. Do not choose them over the available native editor unless the user explicitly asks for the hosted web workflow.\\n\\n## 1. Batch product videos from a CSV\\n\\nOne 9:16 product clip per row of `products.csv` (`name,image_url,tagline`):\\n\\n```bash\\n#!/usr/bin/env bash\\nset -euo pipefail\\nmkdir -p outputs\\n\\nwhile IFS=, read -r name image tagline; do\\n job=$(videodraft generate video \\\\\\n \\"Premium product shot of ${name}: ${tagline}. Slow orbit, studio lighting.\\" \\\\\\n --model gemini-omni-1.1-flash --ar 9:16 --duration 6 \\\\\\n --start-image \\"$image\\" \\\\\\n --no-wait --json | jq -r .job_id)\\n echo \\"$name,$job\\" >> outputs/jobs.csv\\ndone < <(tail -n +2 products.csv)\\n\\n# Collect ALL results with ONE process (batched polling \u2014 one request per tick)\\nvideodraft wait $(cut -d, -f2 outputs/jobs.csv) \\\\\\n --download \\"outputs/{job_id}_{index}.{ext}\\" --json > outputs/results.json\\n# map job ids back to product names via outputs/jobs.csv\\n```\\n\\nSubmit-then-collect parallelizes server-side generation; the single multi-id `wait` keeps it to one local process and one batched poll request per tick no matter how many jobs. Gemini Omni 1.1 Flash is selected because these are six-second first-frame product clips. Estimate first: `videodraft costs gemini-omni-1.1-flash --type video --duration 6 --resolution 720p --audio` \xD7 rows, and confirm with the user.\\n\\nExtend an uploaded clip or conversationally edit an official Google interaction with Gemini Omni 1.1 Flash:\\n\\nEach extension appends 3-10 seconds at the end, up to 40 seconds total. Uploaded-video extensions cannot add new dialogue; use a previous Google interaction when the extension needs additional speech.\\n\\n```bash\\n# Uploaded-video extension with a separate creative camera reference.\\nvideodraft generate video --model gemini-omni-1.1-flash \\\\\\n --source-video ./ending.mp4 --ref-video ./camera-language.mp4 \\\\\\n --ref-video-duration 3 --extend --duration 6 --resolution 1080p \\\\\\n --download ./media/extended.mp4\\n\\n# Conversational edit from the interaction_id returned by Google. Add --extend to lengthen instead.\\nvideodraft generate video --model gemini-omni-1.1-flash \\\\\\n --previous-interaction-id \\"$INTERACTION_ID\\" \\\\\\n --ref-video ./new-performance-reference.mp4 --ref-video-duration 2.5 \\\\\\n --resolution 720p \\\\\\n --download ./media/continued.mp4\\n```\\n\\nFal BYOK supports the currently callable Gemini Omni 1.1 generation and basic source-edit endpoints at zero VideoDraft credits. Its published callable v1.1 endpoints do not expose continuation, extension, or separate creative references on a source edit. Do not infer a Fal route or retry on paid Google while Fal BYOK is active.\\n\\n## 2. Hosted full marketing video from one idea (fallback)\\n\\n```bash\\nvideodraft create \\"30-second launch video for Solace, a sleep-tracking ring. Calm, premium, dark palette.\\" \\\\\\n --ar 9:16 --style cinematic --json > project.json\\nPROJECT=$(jq -r .project_id project.json)\\n\\nvideodraft shots \\"$PROJECT\\" --grid --estimate # show the user the cost; get a go-ahead\\nvideodraft shots \\"$PROJECT\\" --grid\\nvideodraft produce \\"$PROJECT\\"\\nvideodraft generate music \\"minimal ambient, warm pads, 60 BPM\\" --attach \\"$PROJECT\\"\\nvideodraft generate audio \\"Extend @Audio1 into a 20-second transition\\" --ref-audio ./intro.wav --format wav --download ./transition.wav\\nvideodraft export \\"$PROJECT\\" --download solace-launch.mp4\\n```\\n\\nUse this complete hosted path only when the user requested a web project or the native editor is unavailable. Otherwise stop after the storyboard/assets, import them into the native `.vdproject`, and export with `export_start`. The hosted project stays editable at the URL in `project.json` (`.urls`).\\n\\n## 3. Talking-head (avatar) video\\n\\nWhen the user has no portrait, generate a clear front-facing avatar image first. Skip this step when they supplied one or an existing character should be reused.\\n\\n```bash\\nvideodraft generate image \\\\\\n \\"Front-facing head-and-shoulders portrait of a friendly coffee expert, direct eye contact, natural expression, clean studio background\\" \\\\\\n --model nano-banana-2 --ar 9:16 --download ./media/avatar.png\\n\\nSCRIPT=$(videodraft avatar script \\"why our espresso subscription saves you money\\" --style ad-style --json | jq -r .script)\\nAVATAR=$(videodraft avatar create ./media/avatar.png --script \\"$SCRIPT\\" --voice elevenlabs-kPzsL2i3teMYv0FxEYQ6 --ar 9:16 --json | jq -r .avatar_video_id)\\nvideodraft avatar render \\"$AVATAR\\" --resolution 720p # VEED Fabric paid step; confirm cost first (~20 credits/sec)\\n```\\n\\n`avatar script` and `avatar create` (including speech) are bundled/free. In this example only the optional portrait generation and Fabric render spend credits.\\n\\nIf the portrait is low resolution, enhance it before `avatar create`:\\n\\n```bash\\nvideodraft upscale image ./founder-small.jpg --scale 2x --download ./media/founder-upscaled.png\\n```\\n\\nFor a one-off portrait animation without creating a managed avatar record:\\n\\n```bash\\nvideodraft avatar fabric ./founder.jpg \\\\\\n --text \\"Welcome to the weekly product update.\\" \\\\\\n --voice-description \\"warm, confident American presenter\\" \\\\\\n --resolution 720p --download ./media/presenter.mp4\\n```\\n\\nWhen the user already has both the video and replacement speech:\\n\\n```bash\\nvideodraft avatar lipsync ./presenter.mp4 \\\\\\n --audio ./localized-voiceover.mp3 \\\\\\n --sync-mode loop --download ./media/presenter-localized.mp4\\n```\\n\\nEdit an existing video with a dedicated edit model:\\n\\n```bash\\nvideodraft models video --category video_edit\\nvideodraft edit video ./product-demo.mp4 \\\\\\n \\"Preserve the product but follow the reference camera rhythm\\" \\\\\\n --model gemini-omni-1.1-flash --ref-video ./camera-rhythm.mp4 \\\\\\n --ref-video-duration 2.5 --resolution 1080p \\\\\\n --download ./media/product-demo-reframed.mp4\\n\\nvideodraft edit video ./product-demo.mp4 \\\\\\n \\"Turn the room into a warm evening scene while preserving the product and camera motion\\" \\\\\\n --model kling-o3-video-ref-edit --ref ./evening-style.jpg \\\\\\n --preserve-audio --download ./media/product-demo-evening.mp4\\n```\\n\\nTransfer motion from a reference clip onto a character image:\\n\\n```bash\\nvideodraft edit motion ./character.png \\\\\\n \\"Apply the dancer\'s movement to this character while preserving identity\\" \\\\\\n --motion-video ./dance-reference.mp4 \\\\\\n --model kling-v3-motion-control --quality pro \\\\\\n --download ./media/character-dance.mp4\\n```\\n\\n## 4. Hosted changelog video in CI\\n\\nIn a GitHub Action with `VIDEODRAFT_API_KEY` set as a secret:\\n\\n```bash\\nNOTES=$(git log --oneline v1.2.0..HEAD | head -20)\\nvideodraft create \\"Weekly product update video. Energetic, 20 seconds. Changes: ${NOTES}\\" --ar 16:9 --json > p.json\\nPROJECT=$(jq -r .project_id p.json)\\nvideodraft shots \\"$PROJECT\\" && videodraft produce \\"$PROJECT\\"\\nvideodraft export \\"$PROJECT\\" --download changelog.mp4 --wait-timeout 30m\\n```\\n\\n## 5. Variations and picking a winner\\n\\n```bash\\nvideodraft generate image \\"logo concept: minimalist fox, geometric\\" --num 4 --download \\"./concepts/{job_id}_{index}.{ext}\\" --json\\n# Show all 4 to the user; regenerate the chosen one at higher res:\\nvideodraft generate image \\"<same prompt>\\" --model nano-banana-pro --resolution 4K\\n```\\n\\n## 6. Reaching tools without a curated command\\n\\n```bash\\nvideodraft tools list --json | jq -r \'.[].name\'\\nvideodraft tools schema attach_media_to_shot --json\\nvideodraft call attach_media_to_shot --args \'{\\"project_id\\":\\"...\\",\\"scene_index\\":0,\\"shot_index\\":1,\\"media_url\\":\\"https://...\\",\\"media_type\\":\\"video\\",\\"duration_seconds\\":6}\'\\n```\\n\\nAnything the hosted VideoDraft MCP exposes, including character studio, product studio, and hosted project data, is reachable this way even before it gets a curated command. Native `.vdproject` editing uses the separate `videodraft_editor` MCP described in SKILL.md.\\n\\n## 7. Enhance an existing asset without changing it\\n\\n```bash\\n# Light image cleanup, no enlargement\\nvideodraft upscale image ./poster.png --scale 1x --download ./media/poster-enhanced.png\\n\\n# General image and video enlargement\\nvideodraft upscale image ./frame.png --scale 2x --download ./media/frame-2x.png\\nvideodraft upscale video ./clip.mp4 --scale 2x --download ./media/clip-2x.mp4\\n```\\n\\nUse these when the content is correct and only quality or resolution needs improvement. If the poster text, composition, subject, or motion is wrong, edit or regenerate instead.\\n","references/models.md":"# Choosing models (and predicting cost)\\n\\nAlways consult the live catalog instead of memorizing this page \u2014 models change weekly:\\n\\n```bash\\nvideodraft models image --json # every image model + inputs (aspect ratios, resolutions, max refs)\\nvideodraft models video --json # every video model + inputs + per-second pricing metadata\\nvideodraft models audio --json # standalone audio/media models + pricing inputs\\nvideodraft models voices --json # TTS voices\\nvideodraft models styles --json # visual style presets\\n```\\n\\n## Task-based model selection\\n\\nHonor an explicitly named model when it supports the request. Otherwise choose from the task\'s inputs, duration, audio, quality, speed, and cost. Pass the chosen model explicitly instead of relying on a blind platform fallback.\\n\\nThe catalogs carry the preference order themselves: every `videodraft models image|video|audio --json` response has a top-level `recommended` array (best first) plus `recommended` / `recommended_for` on each entry. Trust that over this page. Preferred today: images `nano-banana-2`, `nano-banana-pro`, `gpt-image-2`; videos `gemini-omni-1.1-flash`, `seedance-2.5`, `seedance-2`, `kling-3.0`, `kling-v3-turbo`, `kling-o3`; video edits `gemini-omni-1.1-flash`; talking heads `veed-fabric`; motion transfer `kling-v3-motion-control`; audio ElevenLabs for voice work and Lyria for instrumental music.\\n\\n### Images\\n\\n| Need | Choose | Why |\\n| -------------------------------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------- |\\n| Most generation, editing, character consistency, or reference work | `nano-banana-2` | Best general default; 1K/2K/4K and up to 14 reference images |\\n| Highest-quality complex generation or reasoning | `nano-banana-pro` | Premium Nano Banana quality and reasoning |\\n| Fast, inexpensive drafts and iteration | `nano-banana-2-lite` | Fastest/cheapest Nano Banana option; 1K only, up to 14 references |\\n| Posters, title cards, signs, logos, or any image with important readable text | `gpt-image-2` | Strong text rendering; up to 16 image inputs and 1K/2K/4K output |\\n| Complex multi-image composition, precise editing, or a strong alternate interpretation | `gpt-image-2` | Strong non-Nano alternative with multi-image input |\\n| Cheapest usable image, or an xAI look | `grok-imagine` | 2 cr flat (3 with a reference); 1 reference image |\\n| xAI at 2K or with a quality tier, up to 3 edit references | `grok-imagine-2.0` | 1K 4 (low) / 6 (medium), 2K 6 / 8, +1 cr per reference image |\\n\\nUse `--num 1..4` for variations of one prompt in a single call. Never loop separate paid calls for variations that fit in one request.\\n\\n### Videos\\n\\n| Need | Choose | Important limits |\\n| ---------------------------------------------------------------------------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| Most generation, first/last-frame, mixed-reference, source-edit, or extension requests | `gemini-omni-1.1-flash` | 3-10s output; 360p/720p/1080p/4K at 3/10/15/30 cr/s; audio always; up to 10 image inputs and 3 reference videos <=3s; edit source <=10s; Google continuation or 3-10s extension of a 1-30s uploaded source up to 40s total |\\n| Grok 1.5 text, first-frame, or 1-7 image-reference clips with native audio and optional 1080p | `grok-imagine-video-1.5` | 1-15s; 480p/720p/1080p for text/first-frame; references are 480p/720p only; no last frame |\\n| Unified text, first/last-frame, mixed-media, document, or webpage reference generation | `wan-3.0` | 2-30s or auto; 480p/720p/1080p at 7/14/28 cr/s; 10 image, 5 video, 5 audio refs, 20 media files total; document/web refs require thinking |\\n| 480p/768p/2K/4K with native stereo audio, first/last frames, or mixed image/video/audio references | `minimax-h3` | 5-15s; 5/6/13/16 cr/s by resolution; up to 9 image, 3 video, 3 audio refs, 12 files total; first 5 reference images free then 8 cr each; reference video/audio each total <=15s |\\n| Text or first/last-frame video with native audio and stronger prompt adherence | `minimax-h3-max` | 5-15s; 5/8 cr/s at 480p/768p; seed, safety checker, and disabled/balanced/quality prompt expansion; no reference media |\\n| Images pinned to specific moments (keyframes), 16-20s clips, or a cheap draft pass before committing | `flux-3` | 5-20s (auto for text/first-frame only); 720p/1080p; up to 10 keyframes; `--quality draft` is 720p-only at ~1/3 the cost |\\n| Video/audio references, mixed reference media, broad aspect ratios, frame-mode first+last frame, or 11-15s | `seedance-2` | 4-15s or auto; up to 9 image, 3 video, and 3 audio refs; audio toggle; Mini/Fast are 480p/720p only |\\n| Single takes past 15s, or more references than Seedance 2.0 allows | `seedance-2.5` | 4-30s or auto; up to 30 image, 10 video, and 10 audio refs (50 files total); one quality tier; 480p/720p/1080p |\\n| Fast polished 3-15s video with first frame, multi-prompt, and native audio | `kling-v3-turbo` | Audio always on; Pro default; no end frame, reference-media mode, or elements |\\n| Cinematic 3-15s with reference images, image/video elements, first+last frame, audio, or 4K | `kling-o3` | 7 combined image refs/elements, reduced to 4 with a video element; Standard/Pro/4K |\\n| Kling 3-15s image-to-video with first+last frame, image/video elements, multi-prompt, audio, or 4K | `kling-3.0` | Elements require a start image; image or video elements can bind voice_id; Standard/Pro/4K |\\n| User explicitly requests Veo, or the selected workflow specifically needs Veo | `google-veo3.1` | Good fallback, but not the preferred general model |\\n\\nRouting rules:\\n\\n- 480p/768p/2K/4K with native stereo audio: use MiniMax H3 (5/6/13/16 cr/s).\\n- 480p/768p text or first/last-frame video with native audio: use MiniMax H3 Max (5/8 cr/s). It has no reference mode.\\n- Grok 1.5 reference mode accepts 1-7 images only. Address them in array order as `<IMAGE_0>` through `<IMAGE_6>`. Do not combine reference images with `--start-image`, `--end-image`, `--ref-video`, or `--ref-audio`.\\n- Grok 1.5 first-frame mode accepts one `--start-image`, derives the output aspect ratio from that image, and does not support `--end-image`. Text and first-frame modes support 480p, 720p, or 1080p. Reference mode supports 480p or 720p.\\n- Grok 1.5 always generates native audio. Do not pass `--no-audio`, `--seed`, `--negative`, or `--quality`.\\n- Around 11-15 seconds with native audio: use MiniMax H3, Kling, or Seedance, not Gemini.\\n- One existing source video that should be edited: use `videodraft edit video`, which auto-selects Gemini Omni 1.1 Flash for a source up to 10s. Generic `generate video --ref-video` retains source-edit behavior when `--video-task` is omitted, but the dedicated edit command is clearer.\\n- Video supplied as a creative reference: Gemini Omni 1.1 Flash accepts up to 3 videos of at most 3 seconds each, including mixed image and video input. Use `--source-video` or `--previous-interaction-id` when those creative clips guide an official-Google edit/extension; use `--video-task generate` for new reference-to-video output. Use Wan 3.0 for up to 5 ordered video/audio references and 1080p, MiniMax H3 for 2K/4K, or Seedance 2.0 when quality-tier control matters.\\n- First and last frame control: Gemini Omni 1.1 Flash, Wan 3.0, MiniMax H3, MiniMax H3 Max, Seedance, Kling O3, and Kling 3.0 support it. For Gemini, every start/end frame counts toward the 10-image total, leaving up to 9 references with a start frame or 8 with both frames.\\n- Extension with a 1-30s uploaded source uses Gemini Omni 1.1 Flash plus `--source-video` and `--video-task extend` (or `--extend`). Pass an explicit 3-10s output duration; the model appends it at the end, up to 40 seconds total. Up to 3 short creative `--ref-video` clips may accompany the source. Uploaded-video extensions cannot add new dialogue. Official Google interaction continuation uses `--previous-interaction-id <id>` and defaults to a conversational edit; it may also carry creative references, and `--video-task extend` lengthens it with speech support. Fal returns interaction IDs, but its currently published callable v1.1 endpoints do not expose continuation/extension or mixed source-edit references; never infer a route or silently fall back to paid Google.\\n- Wan 3.0 reference mode and frame mode are separate. It accepts 10 images, 5 videos, and 5 audio clips, at most 20 media files total. Video and audio each total at most 15 seconds. `--file-url` and `--web-url` require `--thinking`. `--auto-duration` cannot be combined with `--duration`.\\n- MiniMax H3 reference mode and first-plus-last-frame mode are separate. Audio cannot be the only reference. Address references as `Image 1`, `Video 1`, and `Audio 1` in array order.\\n- Seedance reference mode and first-plus-last-frame mode are separate. Do not promise reference video/audio plus a last frame in one generation.\\n- Multi-prompt sequencing: use Kling 3.0 Turbo, Kling O3, or Kling 3.0.\\n- Kling 3.0 image-to-video and Kling O3 reference-to-video accept repeatable structured `--element` JSON. Each element is image-backed (`frontal_image_url` plus 1-3 `reference_image_urls`) or video-backed (`video_url`). Either form may include `voice_id`. Keep the voice ID inside the same element so the association is preserved. Reference them as `@Element1`, `@Element2`. Kling V3 Turbo rejects elements.\\n- Kling 2.6 Pro image-to-video accepts one or two repeatable `--voice-id` values. Cite them as `<<<voice_1>>>` and `<<<voice_2>>>` in the prompt. Voice control costs 17 cr/s. Use `videodraft kling-voices list|create|delete` to manage the separate Kling video-control voice library. Creating a voice requires a clean 5-30 second, up-to-50MB single-speaker `.mp3`, `.wav`, `.mp4`, or `.mov` sample plus `--confirm-consent`. Creation costs 1 VideoDraft credit on the platform Fal account and 0 credits with Fal BYOK; use the create command\'s `--estimate` flag to check without creating.\\n- Kling V3 voice control costs 16 cr/s for Standard and 20 cr/s for Pro.\\n- Seedance quality: `mini` for the lowest cost, `fast` for speed, `standard` for maximum quality and for 1080p/4K. Seedance 2.5 has a single tier and ignores `--quality`.\\n- Longer than 15 seconds, or more than 9 image / 3 video / 3 audio references: use Seedance 2.5. It reaches 30s and 30/10/10 references (50 files total) at 480p/720p/1080p, but has no 4K.\\n- Real identifiable people in Seedance 2.x require an explicit routing and pricing opt-in. Set MCP `allow_real_people: true` or CLI `--allow-real-people` on the first request when supplied visual input media visibly contains one, including a start frame, end frame, reference image, or reference video. Keep the Byteplus default for text-only requests, non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. This keeps Byteplus first, permits a submit-time Fal fallback, and charges Fal\'s higher tier-specific rate.\\n- If a default-priced Seedance request fails with `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the higher rate, follow the user\'s spend policy, and retry once with the option enabled. The response also carries `retry_with: { allow_real_people: true }`, `cli_flag: \\"--allow-real-people\\"`, and `retry_policy: \\"once\\"`. If the option was already enabled, do not repeat the same request. Byteplus may accept a task and reject the output later. VideoDraft refunds that failed generation, but it cannot reroute the asynchronous failure to Fal. Rephrase or change the references instead.\\n\\n### Video edit and motion-control categories\\n\\nUse `videodraft models video --category video_edit` for existing-video transforms and `--category motion_control` for motion transfer.\\n\\n| Need | Command/model | Important limits |\\n| ------------------------------------------ | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| Most edits of a source up to 10s (DEFAULT) | `videodraft edit video <video> \\"...\\"` (auto-selects `gemini-omni-1.1-flash`) | Source <=10s or it REFUSES; up to 10 image refs and 3 creative video refs <=3s each; 360p/720p/1080p/4K; audio always regenerated (no `--preserve-audio`) |\\n| Cheapest simple prompt edit | `videodraft edit video <video> \\"...\\" --model grok-imagine-video-edit` | No image refs; source silently truncated to 8s; auto/480p/720p |\\n| Edit with several image references | `--model happy-horse-video-edit --ref ...` | Up to 5 refs; 720p/1080p; source silently truncated to 15s; highest rate (28-56 cr/s) |\\n| Controlled Kling edit | `--model kling-o3-video-ref-edit --ref ...` | Up to 4 refs; Standard/Pro; source silently clamped to 3-10s |\\n| Transfer reference motion to an image | `videodraft edit motion <image> [direction] --motion-video <video>` | Prompt/direction is optional; Kling V3 default; optional one image-only `--element`; element requires video orientation |\\n\\nIf the user explicitly names one of these models, preserve it. The CLI uploads local source videos and reference images automatically. Editing returns an async job and waits by default.\\n\\n**Omit `--model` and the SERVER chooses**, because only it can measure the source. It picks `gemini-omni-1.1-flash` for any source up to 10s. When that is not safe (source longer than 10s, unmeasurable duration, `--preserve-audio`, more than 10 refs, or Fal BYOK with refs) it spends nothing and returns a priced menu: per model, the seconds it would edit, the seconds it would drop, and the credit cost. The CLI prints that table and exits 2. Show it to the user, then re-run with `--model`.\\n\\n**Truncation is the trap here.** Only Gemini refuses a source it cannot fully consume. Every other edit model accepts a 30s clip and returns an edit of its first 8-15 seconds with no error. `videodraft edit video` now warns when this will happen and the tool response carries `source.truncated` / `source.dropped_seconds`; relay it to the user rather than letting them discover it in the output.\\n\\nTo edit a longer source without losing its tail, cut it into <=10s pieces with `videodraft_editor`, edit each with Gemini, then reassemble and export there. VideoDraft has no server-side split/concat, so this needs the native editor.\\n\\nKling O3 is also exposed for reference generation. `videodraft generate video --model kling-o3-video-ref-edit` requires exactly one `--ref-video` and generates a new reference-guided clip. Wan 3.0 handles new text, frame, and mixed-reference generation, but is not an existing-source edit model.\\n\\n### Reference-first video workflow\\n\\n- Prefer a start frame or reference image whenever a specific character, product, location, style, composition, or brand identity must stay recognizable.\\n- If the user gives a reference, pass it. Never silently replace it with a text description.\\n- If no reference exists and continuity matters, generate a still first with the user\'s explicitly requested compatible image model, otherwise use Nano Banana 2. Wait for the image URL, then animate it with the selected video model. Confirm the combined image plus video cost before starting.\\n- For multi-shot scenes, generate shot images with `videodraft shots <project_id> --model <selected-image-model> --grid`. Preserve an explicitly requested compatible image model; otherwise use `nano-banana-2`. The grid establishes the scene and characters together, then decodes into individual shot images.\\n- Animate the decoded shot images as per-shot start frames or references. Do not independently text-generate each video clip when the shots need to match.\\n- Pure text-to-video remains appropriate for generic one-off footage where no subject, composition, or continuity needs to be preserved.\\n\\n### Audio\\n\\n- **Seed Audio 1.0**: use `videodraft generate audio` for open-ended speech, sound, music, or prompt-driven audio editing. It accepts up to three audio references or one image. Address audio references as `@Audio1`, `@Audio2`, and `@Audio3`. Preset and custom cloned voice IDs are supported. Output is up to 120 seconds. There is no requested-duration input. The CLI automatically retries transient responses with one idempotency key. To recover after the CLI process itself is interrupted, set `--idempotency-key <uuid>` on the original command and reuse it.\\n- **Voiceover/TTS**: prefer ElevenLabs. Brittney is the platform default voice; under ElevenLabs BYOK, use a compatible voice from the user\'s account. Honor another supported voice/provider when the user explicitly selects it.\\n- **Dialogue, voice changing, and dubbing**: ElevenLabs only.\\n- **Sound effects**: ElevenLabs Sound Effects only.\\n- **Music**: use `lyria-3-clip-preview` for a short instrumental/background score, `lyria-3-pro-preview` for a longer or higher-quality instrumental score, and `elevenlabs-music` when vocals/lyrics or a specified 10-120 second length matter.\\n- Voice Changer and Dubbing require the source media duration and currently accept source media up to 300 seconds.\\n\\n### Avatar / talking head\\n\\n**First decide the framing, not just \\"someone talks\\".** This lane animates a PORTRAIT facing the lens. A character delivering a line inside a real scene, with blocking, framing or camera movement, belongs to `generate video` instead: use `kling-2.6-pro` (one or two voices cited as `<<<voice_1>>>` / `<<<voice_2>>>`), `kling-3.0` (a voice bound per element, so several characters can speak in one shot), or `happy-horse` (strong character identity from a frontal image, native audio, multilingual lip-sync). Sending a cinematic shot to Fabric returns a head-on talking headshot, not the shot that was asked for. `videodraft models video --json` lists these under `recommended.in_scene_dialogue`.\\n\\nFor a presenter, spokesperson or explainer speaking to camera, VEED Fabric is the preferred model. Choose the dedicated path from the media the user already has:\\n\\n| Starting media | Command | Use |\\n| ----------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------- |\\n| Portrait + script, reusable avatar record | `videodraft avatar create <portrait> --script \\"...\\"` then `avatar render` | Managed avatar flow with bundled speech preparation |\\n| Portrait + text | `videodraft avatar fabric <portrait> --text \\"...\\"` | One-off direct VEED Fabric text mode |\\n| Portrait + existing audio | `videodraft avatar fabric <portrait> --audio <audio>` | One-off direct VEED Fabric audio lip sync |\\n| Existing video + existing audio | `videodraft avatar lipsync <video> --audio <audio>` | Sync Labs Lipsync 2 |\\n\\nThe managed renderer is VEED Fabric Fast (`veed/fabric-1.0/fast`). Direct Fabric and Sync Labs are paid AI Studio generations and return async job IDs.\\n\\n1. Obtain the avatar image. Prefer the user\'s supplied portrait or an existing character. If none exists, use the user\'s explicitly requested compatible image model, otherwise generate a front-facing head-and-shoulders portrait with `nano-banana-2`, direct eye contact, a natural expression, and a clean background. Match the intended video aspect ratio when practical.\\n2. If the portrait is visibly soft or too small, run Topaz image enhancement/upscaling before animation.\\n3. Generate a script only if needed: `videodraft avatar script \\"<idea>\\"`.\\n4. Create the avatar record and speech: `videodraft avatar create <portrait-url-or-file> --script \\"...\\" --voice <id> --ar 9:16`. Prefer ElevenLabs when unspecified, but honor another explicitly selected supported voice/provider.\\n5. Render with VEED Fabric: `videodraft avatar render <avatar_video_id> --resolution 720p`.\\n\\nThe portrait is passed as the avatar\'s character image, not as a generic video\'s start frame. Prefer rendering directly at 720p. Use 480p only when the user prioritizes lower cost. Avatar script generation and `avatar create` (including speech) are bundled/free. Confirm the Fabric render cost, plus portrait generation or upscaling when needed.\\n\\nDirect Fabric text/audio and Sync Labs do not use the managed avatar record. The CLI uploads local portrait, video, and audio files automatically. `avatar fabric --speed fast` applies only to audio mode. Sync costs 5 credits per verified audio second; under Fal BYOK, `sync_mode` remains available but `temperature` and `active_speaker` are ignored by the provider.\\n\\n### Upscaling / enhancement\\n\\n- **Images**: Topaz via `videodraft upscale image <url-or-file> --scale 1x|2x|4x`. Use 1x for light enhancement without enlargement, 2x as the general default, and 4x only when the source quality and target size justify it. The result is synchronous.\\n- **Videos**: Topaz via `videodraft upscale video <url-or-file> --scale 2x`. Use 2x by default. The job is asynchronous; the CLI waits by default, while MCP callers poll `check_generation_status`. MCP video input must be VideoDraft-hosted, so upload local or external sources first.\\n- Use upscaling to preserve the image/video while improving detail, resolution, or cleanup. It cannot fix the wrong subject, misspelled text, bad framing, unwanted objects, broken continuity, or incorrect motion. Use an edit or regeneration for those problems.\\n- For a new Fabric avatar, render directly at 720p instead of rendering at 480p and then upscaling. Upscale the source portrait first only when the portrait itself is low quality.\\n\\n## Capability gotchas\\n\\n- Each model\'s `inputs` block is authoritative: supported `aspect_ratios`, `resolutions`, `quality_options`, `start_frame`/`end_frame`, `max_reference_images/videos/audio`, `multi_prompt`, `audio_toggle`. Passing an unsupported input fails with a clear error \u2014 check first, don\'t trial-and-error paid calls.\\n- Most video models support only 16:9 / 9:16 / 1:1. A 3:4 request hard-fails on most.\\n- `--seed` reproduces a specific output on models that support it (e.g. Flux, Ideogram V4); everything else ignores it. You do not need a seed for variation \u2014 `--num` already varies.\\n- `--rendering-speed` applies to Ideogram (V3: `Default`/`Turbo`/`Quality`; V4: `Turbo`/`Balanced`/`Quality`) and affects image cost \u2014 pass it to `videodraft costs ... --rendering-speed <tier>` for an accurate estimate. Always trust `videodraft models image --json` over this list; new models and tiers appear there the moment the platform ships them, with no CLI update.\\n- `seedream-v5-pro` supports unified text-to-image and reference-image editing with up to 10 image references. Use `--resolution 1K` for 7 credits/image or `--resolution 2K` for 14 credits/image.\\n- Reference inputs: `--ref <img>` (images, including up to 10 total for Gemini Omni 1.1 Flash and Wan 3.0, and 7 for Grok 1.5), `--source-video <v>` (Gemini uploaded edit/extension source), `--ref-video <v>` (up to 3 creative videos <=3s each for Gemini Omni 1.1 Flash; also Wan 3.0, MiniMax H3, and Seedance 2), `--ref-audio <a>` (Wan 3.0, MiniMax H3, Seedance 2), and `--element \'<json>\'` or `--element @elements.json` for Kling V3/O3. For an exact Seedance 2.x reference-video `--estimate`, add `--ref-video-seconds <combined-seconds>`; Seedance bills input seconds alongside output. Wan 3.0 and MiniMax H3 do not bill input reference seconds. The CLI uploads local media references and every structured element without flattening the source/reference roles. `--segment \\"<prompt>:<seconds>\\"` (repeatable) drives Kling 3.0, Kling 3.0 Turbo, and O3 multi-prompt generation. Use 1-6 segments of 1-15 whole seconds each, with 3-15 seconds total. `generate image --video-ref` is the nano-banana-2 video reference.\\n- The top-level prompt is OPTIONAL for Gemini Omni 1.1 Flash media-input or continuation calls, Wan 3.0 frame/reference modes, `generate video` with multi-prompt models, and Kling 3.0 Turbo (`--model kling-v3-turbo`) image-to-video. Text-only Gemini and Wan calls still require a prompt unless their live schema says otherwise.\\n- Hosted AI Production fallback: `videodraft produce <project> --mode full_video` generates one Seedance 2 video per scene; add `--allow-real-people` when a scene grid visibly contains a real identifiable person. The MCP equivalent is `produce_project` with `mode: \\"full_video\\", allow_real_people: true`. The option applies the higher Fal-tier rate to every submitted scene segment. If a partial run returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, rerun the same project once with the option after cost confirmation. The server reconciles asynchronous results first, preserves running/completed jobs, and retries only failed placeholders carrying that exact code. Poll with `videodraft generations`, then `videodraft finalize <project>` swaps them into the hosted timeline before `export`. In VideoDraft ADE, do not choose this path while `videodraft_editor` is available unless the user explicitly requests hosted production. Generate or download the scene assets, import them, and assemble/export with the native editor instead. If the user explicitly requests another compatible video model for a hosted production, do not use this fixed Seedance path; generate the project shots manually with the requested model and attach them to the hosted timeline.\\n\\n## Cost model\\n\\n- Images: per image (\xD7 `--num`). Matrix-priced models (GPT-Image, Nano Banana Pro, Seedream v5 Pro) vary by resolution/quality.\\n- Video: usually credits/second \xD7 duration; rate depends on model + resolution + quality + native audio on/off.\\n- Gemini Omni 1.1 Flash: 3 / 10 / 15 / 30 credits per output second at 360p / 720p / 1080p / 4K (720p default). Official Google Extend appends an explicit 3-10 seconds to a 1-30s uploaded source or prior interaction, up to 40 seconds total. Fal BYOK generation and basic source edits cost zero VideoDraft credits; continuation, extension, and separate creative references on a source edit are unavailable under Fal BYOK.\\n- MiniMax H3: 5 / 6 / 13 / 16 credits per output second at 480p / 768p / 2K / 4K (768p default). The first 5 reference images are included, then 8 credits for each additional image. Reference video and reference audio are NOT billed.\\n- MiniMax H3 Max: 5 credits per output second at 480p or 8 credits per second at 768p (default).\\n- Wan 3.0: 7 / 14 / 28 credits per output second at 480p / 720p / 1080p. Auto duration reserves 30 seconds and reconciles unused credits from the provider-reported output duration. Fal BYOK charges zero VideoDraft credits.\\n- Grok Imagine Video 1.5: 8 credits/output second at 480p, 14 at 720p, or 25 at 1080p, plus 1 credit for each first-frame or reference image. Native generated audio is part of every output.\\n- Kling voice control: 17 credits/output second for Kling 2.6 Pro, 16 at Kling V3 Standard, and 20 at Kling V3 Pro.\\n- Shot-image batches: one image per shot (+1 grid image per scene in `--grid` mode) \u2014 the largest single spend in the pipeline.\\n- VEED Fabric avatar renders: ~10 credits/sec at 480p, ~20/sec at 720p. Avatar creation and its speech are bundled/free; only optional portrait generation/upscaling adds cost before the render.\\n- Direct VEED Fabric: text or normal audio is 8 credits/sec at 480p and 15/sec at 720p; fast audio is 10/sec at 480p and 20/sec at 720p.\\n- Sync Labs Lipsync 2: 5 credits per verified audio second.\\n- Voiceover TTS: 10 credits per 1000 characters for standard voices, 30 per 1000 for cloned `custom-*` voices (min 1, pro-rated); applies to standalone voiceovers AND per-scene narration during `produce`. Silent tracks are free. Voice cloning itself is a flat 150 credits per clone.\\n- Lyria music: flat per track, 4 credits (clip) / 8 credits (pro).\\n- Seed Audio 1.0: 19 credits per actual output minute, prorated and rounded up to a whole credit. VideoDraft reserves the 120-second maximum of 38 credits and refunds the unused portion after generation. Fal BYOK is free.\\n- ElevenLabs audio: sound effects are per second, dialogue is per character, music/voice-changer/dubbing are per started minute. Voice changer and dubbing reject source media above 300s in the current synchronous flow.\\n- Seedance 2.0 / 2.5 real people: every listed Seedance 2.x rate assumes `--allow-real-people` is OFF, which uses the Byteplus-priced path (2.0 Mini 4/8 cr/s, Fast 6/13, Standard 7/16/38/78, 2.5 11/24/57 for 480p/720p/1080p). Byteplus refuses real-person likenesses, so a likeness-policy failure does not fall back by default. Passing `--allow-real-people` keeps Byteplus first but permits a submit-time Fal fallback, which allows them, and prices at Fal\'s rate for that tier: 2.0 Mini 8/16, Fast 11/25, Standard 14/31/69/156, 2.5 23/48/114. That is roughly 2x but not exactly 2x: the Seedance 2.0 1080p pair is 38/69, or about 1.82x. If Byteplus accepts the task and later rejects the generated output, VideoDraft refunds the failure but does not resubmit it to Fal. Pass the option proactively only when supplied visual input media visibly contains a real identifiable person. Otherwise retry once only after the exact opt-in code.\\n- Grok Imagine images: `grok-imagine` is a flat 2 cr (3 with a reference). `grok-imagine-2.0` is a separate, newer model priced by resolution and quality: 1K 4 (low) / 6 (medium), 2K 6 / 8, plus 1 cr per reference image (up to 3). v1 is NOT superseded \u2014 pick it when cost matters more than 2K.\\n- xAI bills refused requests, so failed Grok generations are not refunded.\\n- Upscales: priced by scale and source size.\\n\\nQuote before spending:\\n\\n```bash\\nvideodraft costs gemini-omni-1.1-flash --type video --duration 8 --resolution 720p --audio\\nvideodraft costs minimax-h3 --type video --duration 10 --resolution 2K --ref-images 7\\nvideodraft costs minimax-h3-max --type video --duration 10 --resolution 768p\\nvideodraft costs grok-imagine-video-1.5 --type video --duration 8 --resolution 720p --ref-images 4\\nvideodraft costs seedance-2 --type video --duration 15 --resolution 720p --quality standard --audio\\nvideodraft costs grok-imagine-2.0 --type image --resolution 2K --quality medium --num 2\\nvideodraft costs seedance-2 --type video --duration 15 --resolution 720p --quality standard --audio --allow-real-people # Fal-tier rate\\nvideodraft costs elevenlabs-dubbing --type audio --duration 60\\nvideodraft costs seed-audio-1.0 --type audio --duration 60 # scenario only; model controls actual length\\nvideodraft costs elevenlabs-dialogue --type audio --chars 350\\nvideodraft costs voiceover --type audio --chars 800 # TTS: 10 cr / 1000 chars\\nvideodraft generate video \\"...\\" --model gemini-omni-1.1-flash --estimate # same quote, inline\\nvideodraft generate video \\"...\\" --model minimax-h3-max --duration 8 --resolution 768p --prompt-expansion-mode balanced --safety-checker true\\n```\\n","references/pipeline.md":"# VideoDraft pipeline reference\\n\\nEverything here describes the hosted fallback pipeline through the CLI (`videodraft <command>` / `videodraft call <tool>`) or hosted MCP connector (tool names in backticks). When the local `videodraft_editor` MCP is available, do not use hosted production or export by default. Use hosted tools only for asset generation and optional script/storyboard stages, then import the results and finish with the native editor reference linked from SKILL.md. Continue through `produce_project` and `export_video` only when the user explicitly requests a hosted web production or the native editor is unavailable.\\n\\nUse direct asset tools for standalone images, clips, audio, upscales, and descriptions. Use a hosted project when the user explicitly wants the editable web project, when a hosted storyboard stage is useful, or when the native editor is unavailable. Script-only uses a script-stage project and stops at the script. In VideoDraft ADE with editor tools present, stop before hosted production, import the generated assets, and build/export the native project.\\n\\n## Stages and their tools\\n\\n| Stage | CLI | Underlying tool |\\n| --------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------ |\\n| Idea \u2192 full storyboard project | `videodraft create \\"<idea>\\"` | `generate_storyboard_from_idea` |\\n| Idea \u2192 script only (stop there) | `videodraft create \\"<idea>\\" --script-only` | `generate_script_from_idea` |\\n| Footage IS the video | `videodraft call generate_storyboard_from_media` | `generate_storyboard_from_media` |\\n| Batch shot images | `videodraft shots <project>` | `generate_shot_images` |\\n| One shot image | `videodraft generate image --project <id> --scene N --shot M` | `generate_image` |\\n| Produce (voiceover, captions, timeline) | `videodraft produce <project>` | `produce_project` |\\n| Seedance full-video production | `videodraft produce <project> --mode full_video` | `produce_project` with `mode: \\"full_video\\"` |\\n| Per-shot motion prompts | `videodraft video-prompts <project>` | `generate_video_prompts` |\\n| Motion clip for a shot | `videodraft generate video --project <id>` | `generate_video` |\\n| Attach a finished clip to the timeline | `videodraft attach <project> --scene N --shot M --media <url> --type video` | `attach_media_to_shot` |\\n| Background music | `videodraft generate music --attach <project>` | `generate_music` / `set_background_music` |\\n| General or reference-driven audio | `videodraft generate audio \\"...\\"` | `generate_audio` |\\n| Sound effect | `videodraft generate sound-effect \\"...\\"` | `generate_sound_effect` |\\n| Dialogue audio | `videodraft generate dialogue --line \\"voice:text\\"` | `generate_dialogue` |\\n| Voice changer | `videodraft generate voice-changer <audio>` | `change_voice` |\\n| Dubbing | `videodraft generate dub <audio_or_video>` | `dub_media` |\\n| Scene voiceover | `videodraft generate voiceover --project <id> --scene N` | `generate_voiceover` |\\n| Avatar script | `videodraft avatar script \\"<idea>\\"` | `generate_avatar_script` |\\n| Avatar + speech | `videodraft avatar create <portrait> --script \\"...\\"` | `create_avatar_video` |\\n| Talking-head render | `videodraft avatar render <avatar_video_id>` | `render_avatar_video` + `get_avatar_video` |\\n| Direct portrait + text/audio | `videodraft avatar fabric <portrait> --text \\"...\\"` or `--audio <file>` | `generate_veed_fabric_video` |\\n| Existing video + replacement audio | `videodraft avatar lipsync <video> --audio <file>` | `generate_sync_lipsync_video` |\\n| Existing-video AI edit | `videodraft edit video <video> \\"<change>\\" --model <video-edit-model>` | `edit_video` |\\n| Motion transfer | `videodraft edit motion <image> [direction] --motion-video <video>` | `generate_motion_control_video` |\\n| Image enhancement/upscale | `videodraft upscale image <image>` | `upscale_image` |\\n| Video enhancement/upscale | `videodraft upscale video <video>` | `upscale_video` |\\n| Final MP4 | `videodraft export <project>` | `export_video` + `check_export_status` |\\n\\n## Rules that prevent broken results\\n\\n- **The storyboard is generated FROM the script**, never from the raw idea. `videodraft create` runs the whole chain correctly. Don\'t call `generate_storyboard_scenes` with a raw idea as the \\"script\\".\\n- **Visual consistency**: never generate a storyboard shot in isolation. Shot prompts carry `[[asset:Name]]` / `[[shot:X-Y]]` tags that `generate_shot_images` resolves against the project\'s visual assets and prior shots. When generating a single shot whose prompt has no tags, pass `--ref` images yourself (the project\'s visual assets and/or the previous shot\'s image; `projects get` exposes both). For scenes with multiple shots or recurring characters, prefer `videodraft shots <project> --model <selected-image-model> --grid`: preserve an explicitly requested compatible image model, otherwise use `nano-banana-2`. It creates one coherent scene grid, then decodes it into individual shot images.\\n- **Reference-first video**: when identity, styling, or composition matters, do not generate each motion clip from text alone. Generate or select the shot still first, then pass the decoded shot image as `--start-image` or `--ref` to the selected video model. AI Production already composes scene grids and sends them to Seedance as references. If the user explicitly requests another compatible video model, bypass fixed Seedance full-video mode and generate the per-shot clips with the requested model, using the individual decoded shot images as anchors.\\n- **Seedance full-video real people**: when a hosted `full_video` scene grid visibly contains a real identifiable person, enable the option before submitting any scene videos. Keep the Byteplus default for non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. Use `videodraft produce <project> --mode full_video --allow-real-people`, or MCP `produce_project` with `mode: \\"full_video\\", allow_real_people: true`. This applies Fal-tier pricing to every submitted segment and permits the Byteplus-to-Fal fallback. If a partial run without the option returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, re-estimate, follow the user\'s spend-confirmation preference, and rerun the same project once with the option. The server reconciles asynchronous results first, preserves running/completed jobs, and retries only failed placeholders carrying that exact code. Do not loop when it was already enabled. VideoDraft refunds a Byteplus task rejected after asynchronous acceptance, but cannot reroute it; rephrase or change the scene references instead.\\n- **Hold off generating shot images while the user is still iterating** on storyboard structure.\\n- **produce \u2192 export ordering**: `export` requires a produced project where every production scene has timeline media. If `produce` returns `generating_shot_images`, poll the job ids it returns, then re-run produce.\\n- **Do not attach motion clips before production exists**: run `produce` successfully first, then attach finished motion clips to the production timeline. Attaching before `production_data` exists cannot place them in the final timeline.\\n- **Generated motion clips do not auto-attach**: after `generate video` completes, attach the clip with `attach_media_to_shot` (`media_type:\\"video\\"`, include `duration_seconds`) \u2014 it replaces the production timeline clip while keeping the storyboard still.\\n- **Talking heads use dedicated avatar tools**: do not use `generate video`. Use managed `avatar create` and `avatar render` for reusable avatars, direct `avatar fabric` for a portrait plus text/audio, and `avatar lipsync` for an existing video plus replacement audio. Reuse a supplied person image or generate a clear front-facing portrait with the explicitly requested compatible image model, otherwise Nano Banana 2. Managed avatar creation and speech are bundled/free; direct Fabric, Sync, and render are paid.\\n- **Existing-video edits use their own category**: call `edit_video` or `videodraft edit video` with a `video_edit` model when transforming the source itself. Kling O3 also has a reference-generation mode that creates a new guided clip. Wan 3.0 is a text/frame/reference generation model, not a source-video editor. Motion transfer similarly uses `generate_motion_control_video` or `videodraft edit motion` with a `motion_control` model.\\n- **Upscaling preserves rather than redesigns**: use Topaz when resolution, detail, or cleanup is the problem. Regenerate or edit when the subject, text, framing, continuity, or motion is wrong. Upscale a low-quality avatar portrait before Fabric; do not render a new avatar at 480p just to upscale the result.\\n- **Timeouts on the one-shot create**: if `create` times out at the transport layer, the project was still created server-side \u2014 `videodraft projects list`, take the most recent, and resume with its id. Don\'t start a duplicate.\\n\\n## User-attached media: classify roles first\\n\\nFor EACH attached file decide:\\n\\n- **visual_asset** \u2014 recurring reference (character / product / location / style). Upload, then pass in `visual_assets` of `generate_storyboard_from_idea` (via `videodraft call`), or add to an existing project with `add_visual_assets`. Type must be one of `character | object | location | style | custom` with a short name + concrete description.\\n- **shot** \u2014 the media IS footage for the video. Whole video = footage \u2192 `generate_storyboard_from_media`. Idea + footage \u2192 `generate_storyboard_from_idea` with `shot_media`. Existing storyboard \u2192 `attach_media_to_shots`.\\n- **reference** \u2014 inspiration only \u2192 fold a description into the idea/instructions; don\'t place it as a shot or asset.\\n\\nAmbiguous (e.g. a person holding a product)? Ask the user.\\n\\nUploads persist in the media library \u2014 recall later with `videodraft media list`.\\n\\n## Editing project data safely\\n\\n1. `videodraft call get_project_schema` \u2014 read the structure once per session.\\n2. `videodraft projects get <id> --raw` \u2014 the exact editable blob.\\n3. Modify; then `videodraft call update_project --stdin` with `{\\"project_id\\": \\"...\\", \\"data\\": {...}}`.\\n - Objects deep-merge key-by-key; **arrays replace wholesale** \u2014 send the complete array you\'re changing (e.g. all of `storyboard.scenes`).\\n - Scene shot arrays (`image_prompt` / `shot_types` / `shot_actions` / `search_prompt` / `preview_media`) are auto-aligned; fix-ups come back as warnings.\\n4. Snapshot before risky edits: `videodraft checkpoint create <id> --name \\"before re-script\\"`. Restore with `videodraft checkpoint restore <id> <version>`.\\n\\n## AI Studio sessions (standalone generations)\\n\\nProject generations group automatically, and standalone work is grouped per conversation (MCP) or per working directory (CLI) by the connection session \u2014 see the \\"AI Studio sessions\\" section of SKILL.md. Once the task is clear, give that automatic session a concise 3-6 word title before the first generation:\\n\\n```bash\\nvideodraft sessions name \\"Fox Brand Explorations\\"\\nvideodraft generate image \\"...\\"\\n```\\n\\nNaming creates the session with that title. If generation, a user, or an earlier agent created it first, the existing name is preserved. The command refuses to run while `VIDEODRAFT_SESSION` is set, because that override would send later generations to a different session. Use `sessions create` plus `--session` only to continue or deliberately create a separate group.\\n"}');
5771
+ if ('{"SKILL.md":"---\\nname: videodraft\\ndescription: Create and edit AI videos, images, Seed Audio, voiceovers, music, sound effects, dialogue, dubbing, storyboards, avatar videos, media upscales, and product/ad videos with VideoDraft. Use whenever the user mentions VideoDraft; asks to generate a video, image, audio asset, ad, explainer, storyboard, avatar, upscale, or batch/CI workflow; or wants to assemble, cut, caption, mix, lay out, inspect, or export a native VideoDraft Editor timeline. Covers the cloud `videodraft` CLI/MCP and local headless `videodraft_editor` MCP. When the editor MCP is exposed, prefer it for production, timeline assembly, and export; use cloud production/export only when explicitly requested or the editor is unavailable.\\n---\\n\\n# VideoDraft\\n\\nVideoDraft is an AI video creation platform where asset generation is the priority lane:\\n\\n- **Asset generation**: standalone images, video clips, Seed Audio, voiceovers, music, sound effects, dialogue, voice-changed audio, dubbed media, upscales, and image descriptions. This is the fastest and most important lane. Treat these as complete deliverables when the user asks for assets.\\n- **Asset I/O**: upload local files, download outputs, auto-upload local references, and save generated media where the user can see it.\\n- **Native editing**: local `.vdproject` timelines, cuts, layouts, captions, effects, audio, and exports through the headless VideoDraft Editor. Inside VideoDraft ADE, this is the default production and export lane whenever `videodraft_editor` is available.\\n- **Hosted project production**: idea \u2192 script \u2192 storyboard \u2192 hosted production timeline \u2192 exported MP4. Use the early stages for scripts, storyboards, and generated assets when useful. Treat hosted production and export as a fallback when the native editor is unavailable, or as an explicit destination when the user asks for an editable web project or hosted workflow.\\n\\n## How to connect\\n\\nCloud generation has two equivalent surfaces (same backend, credits, and hosted projects). Native timeline editing is a separate local surface:\\n\\n1. **CLI** (preferred when you have a shell): run `videodraft` if it\'s on PATH; otherwise `npx -y videodraft@latest` runs it with no install (needs Node \u226520; the `-y` skips npx\'s install prompt so it runs non-interactively; the package is fetched on first use and cached). For heavy use, `npm install -g videodraft`. If there\'s no Node/shell here but the MCP connector below is available, use that instead; if neither works, tell the user how to install (https://videodraft.ai/cli).\\n - Auth \u2014 pick by context, don\'t guess:\\n \u2022 INTERACTIVE (a human is in the session, e.g. Claude Code / Codex): on exit code 3 (\\"not authenticated\\"), tell the user to run `videodraft login` in their terminal \u2014 it opens their browser for a one-click VideoDraft sign-in (OAuth), no key to copy. Wait for them to confirm it succeeded, then retry the command. This is the preferred path when the user is present.\\n \u2022 HEADLESS / CI (no browser): set `VIDEODRAFT_API_KEY=vd_mcp_...` (a token the user mints at https://app.videodraft.ai/mcp-keys).\\n \u2022 SECURITY: never ask the user to paste a `vd_mcp_...` token into the chat \u2014 use browser `login` or the env var so the token never lands in the transcript.\\n - Every command accepts `--json` (parse this, don\'t scrape text). Exit codes: 0 ok, 1 error, 2 usage, 3 auth (see Auth above), 4 insufficient credits (\u2192 tell the user, don\'t retry).\\n - Tool discovery: start with `videodraft tools list` for the grouped catalog, then narrow with `videodraft tools list --lane assets`, `--lane asset_io`, `--lane project_data`, or `--lane production`.\\n - Asset lane: `videodraft generate ...`, `videodraft edit video|motion`, `videodraft avatar ...`, `videodraft upscale ...`, `videodraft upload`, and `videodraft download`.\\n - Full API access: `videodraft tools schema <name>`, `videodraft call <tool> --args \'<json>\'`.\\n2. **MCP connector**: if VideoDraft MCP tools (e.g. `generate_storyboard_from_idea`) are available, call them directly \u2014 the CLI\'s curated commands map 1:1 onto these tools.\\n3. **Native editor MCP** (`videodraft_editor`): prefer this for project production, timeline assembly, cutting, layouts, transitions, captions, audio placement, and final export. Inside VideoDraft ADE on a supported Mac, Claude and Codex receive it automatically in both Code and VideoDraft modes. It runs headlessly, so an Open Editor click is not required. Start with `project_control` (`list`, `open`, or `create`); standalone asset generation remains in the cloud CLI or MCP.\\n\\nNative editor mutations are revision-guarded. Send them serially and carry forward each result\'s fresh revision. See [references/editor.md](references/editor.md) for project selection, media import, timing units, mutation deltas, verification, export, and the `videodraft-editor` terminal bridge.\\n\\nIf you are reading this skill through `videodraft skills show skill`, run `videodraft skills show editor` before native editor work to load that reference.\\n\\n**VideoDraft ADE routing rule:** the presence of `videodraft_editor` means the native editor is ready, even when no editor window is visible. Use cloud tools to generate or source assets and, when helpful, scripts or storyboards. Do not call hosted `produce_project` / `videodraft produce` or `export_video` / `videodraft export` by default. Import the assets into the native project, assemble there, and call native `export_start`. Use hosted production/export only when the user explicitly asks for the web workflow or the native editor tools are unavailable. Do not silently fall back to hosted production after a native tool error.\\n\\n## First decision: asset, hosted project, or native edit?\\n\\n- **One standalone asset** (image, clip, voiceover, music track, sound effect, dialogue track, voice-changed file, dubbed media file, upscale, or description): generate it directly. Do NOT create a project.\\n - `videodraft generate image \\"a red fox in snow, cinematic\\" --ar 16:9 --download ./out/`\\n - `videodraft generate video \\"slow dolly over a misty lake\\" --model gemini-omni-1.1-flash --duration 6 --download ./out/`\\n- **Any final video, production timeline, existing footage, local `.vdproject`, or hands-on edit**: use `videodraft_editor` when available. List or open the intended local project, or create a native project for a new production. The editor can work without showing its UI.\\n- **A small set of related assets**: still stay in the asset lane. They are grouped automatically (see [AI Studio sessions](#ai-studio-sessions)); give the current group one useful task-specific name with `videodraft sessions name \\"<name>\\"`. Switch to a project only when the deliverable matches the project criteria below or the user asks to attach the assets to one.\\n- **A generated multi-scene video / ad / explainer**: when the editor is available, use hosted tools only for any needed script, storyboard, shot planning, or generated assets; stop before hosted production, import the assets, and build/export the native timeline. A hosted project is optional unless the user wants the web project or its storyboard workflow.\\n- **A hosted web project or hosted export**: use the hosted pipeline only when the user explicitly asks for it or the native editor is unavailable.\\n- **Just a script** (no video asked for): A script-only request creates a script-stage project but stops at the script. Use `videodraft create \\"...\\" --script-only`; do not build a storyboard the user didn\'t ask for.\\n- **Iterating on existing work**: identify the surface first. Use `project_control` with `action:\'list\'` for native projects and `videodraft projects list` only for hosted work. Never create a replacement project just to change an existing one.\\n\\n## Choose the model from the task\\n\\nIf the user names a model, use it when compatible. If it cannot handle the request, explain why and recommend alternatives instead of silently switching. Otherwise inspect the inputs, duration, audio, quality, speed, and cost, check the live catalog, and pass an explicit model.\\n\\n### Seedance 2.x real-person rule\\n\\nSeedance 2.0 and 2.5 require an explicit, higher-priced routing choice for real-person likenesses:\\n\\n- Enable real-person support on the first request when supplied visual input media visibly contains a real identifiable person. This includes a start frame, end frame, reference image, or reference video. Keep the lower-priced Byteplus default for text-only requests, non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. For MCP use `allow_real_people: true`. For the CLI use `--allow-real-people`. Pass the same value to `get_model_costs` or `videodraft costs` so the estimate matches the charge.\\n- The default is false. It uses the lower Byteplus-priced path, and a Byteplus likeness-policy refusal does not fall back to Fal. Enabling the option keeps Byteplus first but permits a submit-time fallback to Fal, which allows real-person likenesses. The request is charged at Fal\'s higher tier-specific rate even if Byteplus serves it.\\n- If a request made without the option fails with code `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the higher rate, follow the user\'s spend-confirmation preference, and retry exactly once with the option enabled. The structured recovery fields are `retryable: true`, `retry_with: { allow_real_people: true }`, `cli_flag: \\"--allow-real-people\\"`, and `retry_policy: \\"once\\"`. CLI `--json` submit errors expose them under `details`; `status` and `wait` include them on the failed job result. Do not treat an unrelated moderation or provider error as that signal.\\n- Do not loop if the option was already enabled. Byteplus can accept a task and reject its generated output later. VideoDraft refunds that failed generation, but the late asynchronous failure cannot be rerouted to Fal. Rephrase the prompt or use different references before trying again.\\n- For hosted AI Production, the same choice applies to every Seedance scene segment. Use `produce_project` with `mode: \\"full_video\\", allow_real_people: true`, or `videodraft produce <project> --mode full_video --allow-real-people`. If an earlier run partially submitted and returns the opt-in code, rerun that same project once with the option. The server reconciles asynchronous results first, preserves running/completed jobs, and resubmits only failed scene-video placeholders carrying the exact opt-in signal. Keep the native-first VideoDraft ADE routing rule above: hosted full-video production is still explicit/fallback-only when the local editor is available.\\n\\nEvery `videodraft models image|video|audio --json` response carries a top-level `recommended` array (best first) and stamps `recommended` / `recommended_for` on each entry. That is the authoritative preference order and it beats this page when they disagree. Preferred today: images `nano-banana-2`, `nano-banana-pro`, `gpt-image-2`; videos `gemini-omni-1.1-flash`, `seedance-2.5`, `seedance-2`, `kling-3.0`, `kling-v3-turbo`, `kling-o3`; video edits `gemini-omni-1.1-flash`; talking heads `veed-fabric`; motion transfer `kling-v3-motion-control`; audio ElevenLabs for anything with a voice and Lyria for instrumental music. Preference applies only when the user did not name a model.\\n\\n**Images:**\\n\\n- `nano-banana-2`: general default, editing, consistency, and references.\\n- `nano-banana-pro`: maximum quality. `nano-banana-2-lite`: fast, inexpensive drafts.\\n- `gpt-image-2`: posters, logos, signs, title cards, readable text, or precise composition/editing.\\n\\n**Videos:**\\n\\n- `gemini-omni-1.1-flash`: general default for 3-10s generation and uploaded source edits up to 10s. It supports first and last frames, up to 10 total image inputs, up to 3 creative reference videos of at most 3 seconds each on `--video-task generate` ONLY, uploaded-video extension, and continuation of an earlier generation through `--previous-interaction-id`. Output is 360p/720p/1080p/4K at 3/10/15/30 cr/s with audio always on. Use `--source-video` for the uploaded edit/extension source; extension sources must be 1-30s. Edit and extend accept EXACTLY ONE input video, so `--ref-video` cannot accompany `--source-video` or `--previous-interaction-id`; only `--ref` images can. One `--ref-video` with no separate source remains a legacy source edit. A previous interaction defaults to conversational edit; add `--video-task extend` or `--extend` with an explicit 3-10s duration to append at the end. A continuation resolves to the prior turn\'s output and is submitted as an ordinary source, so the same limits apply to it: at most 30s to extend, at most 10s to edit. 40 seconds total is reachable, but only by extending from a source of 30s or less, so a ladder dead-ends once it passes 30s. New dialogue can only be added when the SOURCE video is silent; adding speech on top of a source that already contains speech is refused with \\"the model is currently unable to process speech edits\\". The server safely measures creative-reference durations, or you can repeat `--ref-video-duration` when a host blocks metadata probing. Fal BYOK supports its currently callable v1.1 generation and basic-edit endpoints at zero VideoDraft credits, but Fal does not expose continuation/extension or mixed source-edit references as callable endpoints and VideoDraft must never fall back to paid Google.\\n- `grok-imagine-video-1.5`: 1-15s text, first-frame, or 1-7 reference-image generation with native audio. Text/first-frame modes support 480p, 720p, and 1080p; reference mode supports 480p/720p. Cite references as `<IMAGE_0>` through `<IMAGE_6>`. It has no last frame, seed, negative prompt, quality tier, reference video, or reference audio.\\n- `minimax-h3`: 480p/768p/2K/4K (5/6/13/16 cr/s, 768p default), native stereo audio, and 5-15s text, first/last-frame, or mixed-reference generation. Reference mode accepts up to 9 images, 3 videos, and 3 audio clips, with at most 12 files total. Cite them as `Image 1`, `Video 1`, and `Audio 1` in array order.\\n- `minimax-h3-max`: 480p/768p pricing (5/8 cr/s, 768p default), native audio, and 5-15s text or first/last-frame generation. It supports a reproducibility seed, a safety checker, and `disabled` / `balanced` / `quality` prompt expansion. It does not accept reference media.\\n- `wan-3.0`: unified 2-30s text, first/last-frame, or ordered mixed-reference generation at 480p/720p/1080p (7/14/28 cr/s), with optional native audio. Reference mode accepts up to 10 images, 5 videos, and 5 audio clips, at most 20 media files total; video and audio each total at most 15 seconds. `--auto-duration` reserves 30 seconds and reconciles to the provider-reported output length. Document/web references use `--file-url` or `--web-url` and require `--thinking`.\\n- `flux-3`: Black Forest Labs FLUX 3. 5-20s at 720p/1080p with 24fps native audio, from a prompt, a first frame, first + last frames, or up to 10 keyframes pinned to specific moments (`--keyframe shot.png@2.5`, repeatable). `--quality draft` renders the same shot at 720p for roughly a third of the cost \u2014 use it to check blocking before committing. Auto duration is text/first-frame only.\\n- `seedance-2`: 11-15s, video/audio/mixed references, wider ratios, selectable audio, or first/last frames. Use `mini` for cost, `fast` for speed, `standard` for quality or 1080p/4K.\\n- `seedance-2.5`: 4-30s single takes and up to 50 references (30 image, 10 video, 10 audio). Same modes as 2.0, one quality tier, 480p/720p/1080p. Reach for it when a shot must run past 15s or carry more references than 2.0 allows.\\n- `kling-v3-turbo`: fast polished 3-15s with first frame, multi-prompt, and audio, but no elements. `kling-o3`: reference images plus structured image/video elements, first/last frames, multi-prompt, audio control, or 4K. O3 allows 7 combined image references and image-backed elements, reduced to 4 combined items when a video-backed element is present. `kling-3.0`: image-to-video can use structured image/video elements and bind a custom Kling voice ID to either element form. Kling 2.6 Pro uses top-level voice IDs cited as `<<<voice_1>>>` and `<<<voice_2>>>`.\\n- Existing-video edits use `videodraft edit video`, not generic generation. `gemini-omni-1.1-flash` is the preferred edit model and is chosen automatically when you omit `--model`: source up to 10s, up to 10 reference images, 360p/720p/1080p/4K with audio. Creative `--ref-video` inputs are NOT accepted on an edit, because an edit takes exactly one input video; use `generate video --video-task generate` to guide a new clip with video references instead. Omitting `--model` on a longer or unmeasurable source spends nothing and prints a priced menu (what each model edits, what it drops, what it costs) so you can put the choice to the user. **Truncation:** only Gemini refuses an over-length source. Happy Horse silently edits just the first 15s, Kling O3 the first 10s, and Grok the first 8s. The command warns you when that will happen; always relay it to the user. Gemini regenerates the audio track, so use Happy Horse or Kling O3 with `--preserve-audio` when the source audio must survive. Choose Grok for the cheapest prompt-only edit, Happy Horse for up to 5 image references, or Kling O3 for controlled reference-image edits.\\n- To edit a source longer than 10s without losing its tail, cut it into <=10s pieces in the native editor, edit each with Gemini, and reassemble. VideoDraft has no server-side split/concat, so this path needs `videodraft_editor`.\\n- Kling O3 also has a reference-generation mode. Use `videodraft generate video --model kling-o3-video-ref-edit` with exactly one `--ref-video` to generate a new guided clip; use `videodraft edit video` when changing the source itself. Use Wan 3.0 for new mixed-reference generation, not source-video editing.\\n- Motion transfer uses `videodraft edit motion` with Kling V3 by default, or Kling 2.6 when explicitly requested or lower cost matters. It requires a subject image and a motion-reference video.\\n- Use Veo 3.1 when explicitly requested or as a fallback.\\n\\n**Audio and utilities:**\\n\\n- Use Seed Audio 1.0 for open-ended text-to-audio, speech/music/sound synthesis, voice conditioning, or prompt-driven editing with up to three audio references or one image. Use `videodraft generate audio`. Reference clips are `@Audio1`, `@Audio2`, and `@Audio3` in array order. There is no duration input. Output is up to two minutes and settles at 19 credits per actual minute, with up to 38 credits reserved during generation. The CLI automatically retries transient responses with one operation key. To recover after the CLI process itself is interrupted, set `--idempotency-key <uuid>` on the original command and reuse it.\\n- Prefer ElevenLabs for voiceover, dialogue, voice changing, dubbing, and sound effects. Honor an explicitly selected supported TTS voice/provider. Use Lyria for instrumental music and ElevenLabs Music for vocals, lyrics, or exact timing.\\n- A character who needs to TALK, when you have an image of them, splits by FRAMING:\\n - **Talking to camera** (presenter, spokesperson, explainer): the avatar lane, and VEED Fabric is preferred. Use managed `avatar create` then `avatar render` for a reusable avatar record with bundled speech, `avatar fabric` for a one-off portrait plus text or existing audio, and `avatar lipsync` when both the source video and replacement audio already exist.\\n - **Speaking inside a scene** (real blocking, framing, camera movement): not Fabric. It animates a portrait facing the lens, so a cinematic request comes back as a head-on talking headshot. Use `generate video` with `kling-2.6-pro` (one or two voices cited as `<<<voice_1>>>` / `<<<voice_2>>>`), `kling-3.0` (a voice bound per element, so several characters can speak in one shot), or `happy-horse` (strong character identity from a frontal image, native audio, multilingual lip-sync).\\n- Enhancement: use Topaz image/video upscaling only when the content is already correct. Use image 1x for cleanup, 2x by default, 4x when justified; use video 2x by default. Edit or regenerate creative errors.\\n\\nSee [references/models.md](references/models.md) for the detailed routing table and exact capability limits.\\n\\n## Prefer references when continuity matters\\n\\nPure text-to-image or text-to-video is fine for a generic one-off asset. When a specific character, product, location, style, composition, or brand identity must survive generation, use references instead of hoping the prompt recreates it.\\n\\n- If the user supplies reference media, preserve and pass it. Never reduce the request to text alone.\\n- When continuity matters, generate/select a strong still first with the selected image model (`nano-banana-2` by default), wait for its URL, then animate it as a start frame/reference. Confirm the combined image and video cost.\\n- When using a hosted storyboard stage for multiple shots, use `videodraft shots <project_id> --model <selected-image-model> --grid`, then animate the decoded shots. Preserve explicit models. In VideoDraft ADE, import the resulting assets into the native editor instead of continuing into hosted production. A requested non-Seedance video model must use manual per-shot generation instead of Seedance full-video mode.\\n\\n## Cost and credits\\n\\nDo not call `videodraft credits` before routine generations. Paid endpoints validate and deduct atomically; if the balance is insufficient, the request is rejected before the provider job starts (CLI exit code 4). Check the balance only when the user asks, gives a credit budget, or a large workflow needs budget planning.\\n\\nFor expensive work, estimate with `--estimate` or `videodraft costs`, state the selected model/settings/cost, and get a go-ahead. This matters most for shot-image batches, long or high-resolution video, AI Production, and paid audio batches. Honor the user\'s confirmation preference for the session.\\n\\nKling voice creation costs 1 VideoDraft credit on the platform Fal account and 0 credits with Fal BYOK. Preview it with `videodraft kling-voices create <sample> --name <name> --estimate`; the estimate does not create a voice or require consent confirmation. Actual creation requires `--confirm-consent`.\\n\\nMiniMax H3 costs 5 / 6 / 13 / 16 credits per output second at 480p / 768p / 2K / 4K (768p by default). In reference mode the first 5 images are included and each additional image costs 8 credits. Reference video and reference audio are NOT billed.\\n\\nMiniMax H3 Max costs 5 credits per output second at 480p and 8 credits per second at 768p (default). Use `--prompt-expansion-mode disabled|balanced|quality`; balanced is the default. The safety checker defaults on and can be set explicitly with `--safety-checker true|false`.\\n\\nWan 3.0 costs 7 / 14 / 28 credits per output second at 480p / 720p / 1080p. Auto duration reserves the 30-second maximum and refunds the unused reserve after the provider reports the actual whole-second output length. Fal BYOK runs on the connected user key and charges zero VideoDraft credits.\\n\\nGrok Imagine Video 1.5 costs 8 credits per output second at 480p, 14 at 720p, or 25 at 1080p, plus 1 credit for each first-frame or reference image. Native audio is always generated.\\n\\n`videodraft models image|video` lists the live image and video catalogs with supported inputs. Video entries are grouped as `generation`, `video_edit`, `motion_control`, `avatar_lipsync`, and `upscale`, and each reports the exact tool. Use `videodraft models video --category video_edit` to narrow the list. `videodraft models audio` lists Seed Audio, Google Lyria, and ElevenLabs audio/media tools, while `videodraft models voices` lists TTS voices. Consult them instead of guessing capabilities.\\n\\n## Async jobs\\n\\nImage/video generation is asynchronous: commands submit a job and **wait by default**, printing output URLs (and saving files with `--download`). Large downloaded images also get a downscaled copy in `previews/` next to them (the `preview` field / \\"inspect via preview\\" line in the output) \u2014 **look at the preview, deliver the original**; viewing full-resolution images bloats the chat permanently. In scripts/CI prefer explicit control:\\n\\n```bash\\nJOB=$(videodraft generate image \\"...\\" --no-wait --json | jq -r .job_id)\\nvideodraft wait \\"$JOB\\" --download \\"./outputs/{job_id}_{index}.{ext}\\" --json\\n```\\n\\nFor MANY jobs: submit each with `--no-wait`, collect ALL with one command \u2014 `videodraft wait <id1> <id2> ...` polls every job from one process with one batched request per tick. Do NOT spawn parallel `wait`/`generate --wait` processes for a batch.\\n\\nIf a wait times out, the job is still running server-side \u2014 `videodraft status <job_id>` later. Never re-submit just because a wait timed out (that double-spends credits).\\n\\nFor completed Wan 3.0 jobs, MCP `check_generation_status` and CLI `status`/`wait --json` include `outputMetadata` with Fal\'s returned `seed`, `duration`, and `actual_prompt` when present.\\n\\n## AI Studio sessions\\n\\nEvery standalone (project-less) generation is filed into an AI Studio session in the web app. You do not have to create one:\\n\\n- **MCP hosts** (Claude Code, claude.ai, Codex, VideoDraft ADE): the server mints an `Mcp-Session-Id` on `initialize`; your host echoes it, and this conversation\'s generations land in their own session. Tool results echo it as `ai_studio_session_id`.\\n- **CLI**: the same handshake runs once per (profile, server, working directory) and is cached for 12 idle hours, so everything generated from one directory shares one session. `videodraft sessions current` shows it; `videodraft sessions reset` starts a new one.\\n- Project generations (`--project <id>` / `project_id`) always go to that project\'s session.\\n\\nOnce you understand the creative task, name the current automatic session before the first standalone generation:\\n\\n```bash\\nvideodraft sessions name \\"Purple Seal Rescue Short\\"\\n```\\n\\nChoose a concise, specific 3-6 word title for the intended work. Do not copy the client name, date, or exact chat title. Name it once: the operation creates the session with that title. If generation, a user, or an earlier agent created the session first, its existing name is preserved.\\n\\nPass `--session <id>` / `session_id` only to **continue earlier work** or create an explicit separate group:\\n\\n```bash\\nSESSION=$(videodraft sessions create \\"Fox brand explorations\\" --json | jq -r \'.session.id\')\\nvideodraft generate image \\"a red fox in snow, cinematic\\" --session \\"$SESSION\\"\\nvideodraft generations --session \\"$SESSION\\" # what is in it\\nvideodraft sessions list --name fox # find it again later\\n```\\n\\n`VIDEODRAFT_SESSION=<id>` sets the default for every command (ignored when `--project` is given). While it is set, `sessions name` refuses to run because that command names the current automatic connection session, not the pinned override; unset it first or rename the pinned session in AI Studio. `VIDEODRAFT_SESSION_SCOPE=<label>` groups several directories into one connection session; `VIDEODRAFT_CLIENT_NAME=<host>` labels the fallback placeholder used when generation creates the session before `sessions name`; `VIDEODRAFT_NO_SESSION=1` disables the handshake. Generations that reach the server with no session at all fall back to the account-wide \\"Agent (MCP)\\" session; if you see work landing there, pass `--session` explicitly.\\n\\n## Generation history\\n\\nPast work is queryable \u2014 reuse a previous setup instead of guessing. `videodraft generations` lists recent generations; scope with `--session <id>` or `--project <id>` (includes collaborators\' rows in shared scopes; pass one, project wins), and filter with `--type`, `--model`, `--favorites`. `--full --json` returns each row\'s exact parameters (aspect ratio, resolution, duration, references) \u2014 the human table stays compact, so pair `--full` with `--json`. `videodraft generation <id>` prints one generation\'s complete recipe (prompt, input image, parameters, outputs); `--favorite` / `--unfavorite` stars it. `videodraft sessions list` shows AI Studio sessions (owned + shared) with `--name` search \u2014 take a session id from there to read its history.\\n\\n## Local files and reference images\\n\\nReference inputs must be public URLs. The CLI uploads local files automatically wherever a URL is expected (`--ref photo.jpg`, `--start-image frame.png`), or explicitly:\\n\\n```bash\\nURL=$(videodraft upload ./product.png --json | jq -r .url)\\n```\\n\\nNever silently drop a reference you couldn\'t upload \u2014 stop and tell the user. Never upload a user\'s file to a third-party host.\\n\\nWhen the user attaches media for a native production, import actual footage into the editor by default. For hosted generation/storyboarding, classify each item before acting: a recurring **visual asset** (character/product/location/style), actual **footage to place as shots**, or **inspiration only**. See [references/pipeline.md](references/pipeline.md) for the hosted role mapping.\\n\\n## Showing media to the user\\n\\nGenerated media is **not** displayed in the chat automatically \u2014 you decide what to show. To preview an asset inline, save it locally (use `--download` so it lands under `media/`) and reference its **local path** as a Markdown link with a **leading `./`**:\\n\\n```\\n[ferrari shot](./media/ferrari_01.png) \u2190 image card\\n[the clip](./media/clip.mp4) \u2190 video player\\n[voiceover](./media/vo.mp3) \u2190 audio player\\n```\\n\\nPut the Markdown link **in your message text** \u2014 video and audio embed exactly like images. Do **not** use `SendUserFile` (or other file-send tools) to display media: that renders inside a collapsible tool card and gets buried in the tool list. The Markdown link in your prose is what produces the inline card.\\n\\nUse the path you saved to: a **workspace-relative** path (`./media/clip.mp4`, or `./<any-folder>/clip.mp4` \u2014 any folder in the workspace works), or the **absolute** path for a file outside the workspace (e.g. `/Users/you/Desktop/clip.mp4` or another workspace\'s path). Both render. Show the finished results worth showing (and only those \u2014 not every intermediate job). A bare CDN URL or a JSON dump of output URLs does **not** render; the local-path Markdown link is what produces an inline card.\\n\\n## Native-first VideoDraft ADE pipeline (idea \u2192 MP4)\\n\\nWhen `videodraft_editor` is present:\\n\\n1. Generate or source the script, storyboard, shot images, clips, voiceovers, music, and other assets through the cloud CLI/MCP as needed.\\n2. Call native `project_control` to open or create the `.vdproject`.\\n3. Call native `media_import`, wait for imports to become ready, then assemble and refine the timeline with editor tools.\\n4. Call native `export_start` and use `export_status` for progress and results.\\n\\nDo not run the hosted production or export steps in this path unless the user explicitly asks for a web production.\\n\\n## Hosted fallback pipeline (idea \u2192 MP4)\\n\\nUse this only when there is NO native editor at all, or the user explicitly requests the hosted web\\nworkflow. The native surface is not only the injected `videodraft_editor` MCP: a `videodraft-editor`\\nexecutable on PATH is the same editor reached through its terminal bridge, and\\n[references/editor.md](references/editor.md) covers driving it that way. Treating a missing MCP as\\n\\"no editor\\" sends sessions that have the binary into hosted production for no reason.\\n\\n```bash\\nvideodraft create \\"<idea>\\" --ar 9:16 # project: script \u2192 visual assets \u2192 storyboard\\nvideodraft shots <project_id> --grid --estimate # cost preview, confirm with user\\nvideodraft shots <project_id> --grid # batch shot images (waits, writes onto shot cards)\\nvideodraft produce <project_id> # voiceovers + captions + production timeline\\nvideodraft export <project_id> --download final.mp4\\n```\\n\\nOptional between produce and export: per-shot motion clips (`videodraft generate video ... --project <id>` then place it with `videodraft attach <project> --scene N --shot M --media <url|file> --type video --duration <s>`), music (`videodraft generate music \\"...\\" --attach <project_id>`), and standalone audio assets (`generate audio`, `generate sound-effect`, `generate dialogue`, `generate voice-changer`, `generate dub`). Details, per-step tools and editing rules: [references/pipeline.md](references/pipeline.md).\\n\\n## Avatar and talking-head videos (both surfaces)\\n\\nAvatar generation is cloud-only \u2014 the native editor has no avatar or lipsync tools \u2014 so this applies whether or not `videodraft_editor` is present. Generate the avatar in the cloud; in VideoDraft ADE, import the rendered clip and cut it on the native timeline like any other footage.\\n\\nAvatar/talking-head videos use dedicated commands. For a reusable managed avatar, obtain or generate a clear portrait \u2192 `videodraft avatar script` when needed \u2192 `videodraft avatar create` \u2192 `videodraft avatar render --resolution 720p`. For a one-off portrait, use `videodraft avatar fabric <portrait> --text \\"...\\"` or `--audio <file>`. For an existing video plus replacement audio, use `videodraft avatar lipsync <video> --audio <file>`. Managed script/creation is bundled/free; direct Fabric, Sync, the managed Fabric render, and optional portrait generation/upscaling are paid. Confirm expensive steps first.\\n\\n## Working with hosted project data\\n\\nA hosted project is one JSON blob (script, storyboard scenes, shot cards, visual assets, production timeline). To inspect: `videodraft projects get <id>`. To edit: fetch `--raw`, modify, then `videodraft call update_project` \u2014 objects deep-merge, **arrays replace wholesale** (send the complete `storyboard.scenes` array to change one scene). Snapshot first with `videodraft checkpoint create <id>` before risky edits. Schema reference: `videodraft call get_project_schema`. This does not replace native editor tools when `videodraft_editor` is available for the production itself.\\n\\n## More\\n\\n- [references/pipeline.md](references/pipeline.md) \u2014 hosted fallback data model and production workflow\\n- [references/editor.md](references/editor.md) \u2014 native headless editor routing, project selection, import, timeline edits, verification, and export\\n- [references/models.md](references/models.md) \u2014 choosing image/video models, pricing patterns, voices and styles\\n- [references/examples.md](references/examples.md) \u2014 recipes: batch product videos from a CSV, talking-head from a script, changelog video in CI\\n","references/editor.md":"# Native VideoDraft Editor reference\\n\\nUse this reference when the user wants to assemble, cut, caption, mix, lay out, inspect, or export a local VideoDraft Editor project. The native editor is deterministic and local. Cloud generation remains in the `videodraft` CLI or hosted MCP.\\n\\n## VideoDraft ADE preference rule\\n\\nWhen `videodraft_editor` tools are exposed, treat the native editor as available and make it the default surface for production, timeline assembly, and final export. It is headless by design, so a hidden window or an untouched Open Editor button does not justify using hosted production instead.\\n\\nUse cloud tools for asset generation and optional script/storyboard work, then import the results. Do not call hosted `produce_project` / `videodraft produce` or `export_video` / `videodraft export` unless the user explicitly requests an editable web production or the native editor tools are unavailable. If a native tool call fails after the editor was available, report or recover that native failure rather than silently switching surfaces.\\n\\n## Choose the correct surface\\n\\n- `videodraft` and the hosted VideoDraft MCP generate assets and can manage hosted web projects. They use the user\'s VideoDraft account and credits. In VideoDraft ADE, use them mainly as the source of generated media and optional storyboards for the native production.\\n- `videodraft_editor` edits local `.vdproject` packages. It has no generation, account, model, or credit tools.\\n- Inside VideoDraft ADE on a supported Mac, the editor MCP is injected automatically for Claude and Codex in both Code and VideoDraft modes. It starts headlessly before the chat opens. The user does not need to click Open Editor, and closing or hiding the editor window does not stop headless editing.\\n- Outside that environment, use the editor only if `videodraft_editor` MCP tools are already exposed or the `videodraft-editor` executable is on PATH. Do not confuse the public `videodraft` cloud CLI with the separate native editor executable.\\n\\nPrefer the direct MCP tools when they are available. The terminal bridge is useful for scripts, diagnostics, or an agent session where the MCP was not injected.\\n\\n## Start with the intended project\\n\\nAn MCP session can begin without a project selected. Project selection belongs to the session, not to whichever editor window happens to be frontmost.\\n\\n1. If the user named an existing project but its identity is unclear, call `project_control` with `action:\'list\'`.\\n2. Open the exact project by the returned `id`, unambiguous `name`, or `.vdproject` `path`.\\n3. Create only when the user wants a new local edit. `action:\'create\'` accepts optional `name`, `fps`, `aspectRatio`, and `quality`.\\n4. Treat `isActive` as this MCP session\'s target and `isVisible` as the project shown in the UI. Headless editing only needs the session target.\\n5. Use `action:\'close\'` only when closing is part of the task. It saves first and never deletes the project.\\n\\nDo not substitute a hosted project ID for a native project. A hosted project can supply scripts, storyboards, and generated media, but the native edit is a separate `.vdproject` package.\\n\\n## Keep a reliable editing model\\n\\n- Call `timeline_read` once after opening or creating a project, after switching timelines, or after an out-of-band user edit. It returns the revision and current clip/track state.\\n- Call `media_list` before using a `mediaRef`. Poll imports with a filtered read (`ids` for a known asset, `pending:true` for a batch) instead of repeatedly loading the full library.\\n- Timeline placement uses project frames. Source spans, media durations, transcript segments, and search hits use seconds. Pass those values to the relevant tools as returned; do not multiply by fps yourself.\\n- IDs are short stable prefixes. Pass them back exactly as returned. Tracks use stable `trackId` values; indexes can change.\\n- Send project mutations serially. Pass `ifRevision` from the latest read or mutation when available, then replace it with the fresh revision from the next result. Parallel edits against one project can race or invalidate each other\'s revision.\\n- Every mutation returns a delta in `timeline_read` vocabulary. Patch your working model from that delta instead of re-reading after every successful call. Re-read after a stale-state failure or an out-of-band change.\\n- Use `canvas_arrange` for split screens, picture-in-picture, grids, and canvas placement. Use `tracks_edit` to fix stacking. Do not synthesize layouts from generic transforms or keyframes.\\n- Use `media_view` before describing source content, and `transcript_read` to locate a spoken moment. Use `timeline_view` to verify the composited result the viewer will actually see.\\n- Volume inputs, including volume keyframes, are linear values from `0` to `1`. Timeline reads return the same linear scale.\\n\\n## Bring generated or local media into the editor\\n\\nUse cloud generation for new assets, save or download the outputs, then call native `media_import`:\\n\\n- `source.path`: absolute local file or directory. A directory imports recursively and preserves its folder structure.\\n- `source.url`: HTTPS asset URL. Set `mimeType` when a signed URL has no usable extension.\\n- `source.bytes`: small base64 media with a required `mimeType`.\\n- `source.matte`: generated solid-color image.\\n\\nReadiness differs by source, and so does the poll that detects it:\\n\\n- **URL and single-file path** imports return `status:\'downloading\'` with one `mediaRef`. Poll `media_list` with `ids:[mediaRef]` until `generationStatus` is absent.\\n- **Directory** imports also return `status:\'downloading\'` with one placeholder `mediaRef` for the batch. Poll `media_list` with `ids:[mediaRef]` until `generationStatus` clears; the folder\'s assets then appear. (`pending:true` remains a fallback that lists every unresolved import.)\\n- **Inline bytes and matte** imports finish inline and come back `status:\'ready\'`; no polling needed.\\n\\nNever place a pending asset on the timeline. `generationStatus` is the signal: `preparing` and\\n`downloading` mean keep polling, absent means usable, and **`failed` is terminal** \u2014 report it or\\nretry the import explicitly, never poll on. Do not treat \\"not downloading\\" as ready.\\n\\nFor a batch of local outputs, download them into one workspace directory and import that directory once when practical. This is safer and faster than racing many import calls; poll the batch\'s placeholder `mediaRef` with `ids` to know when it is usable.\\n\\n## Edit and verify\\n\\nUse the tool descriptions as the exact schema. A dependable sequence is:\\n\\n1. `project_control` to select or create the local project.\\n2. `timeline_read` and `media_list` to establish current state.\\n3. `media_view` when content selection matters.\\n4. Serialized clip, track, layout, text, caption, audio, color, effect, or cut mutations using the current revision.\\n5. `timeline_view` when visual composition or layer order matters.\\n6. `undo` if the requested result is wrong and the next mutation would not cleanly correct it.\\n\\nEdits are undoable. Do not ask for confirmation before each ordinary edit. Ask one focused question only when the user\'s creative direction is materially ambiguous.\\n\\n## Export\\n\\n`export_start` queues work in the background and returns a `jobId`, destination, and `started` or `queued` status.\\n\\n- Use `video` for H.264, H.265, or ProRes.\\n- Use `xml` for Premiere Pro.\\n- Use `xml` (XMEML) for Premiere Pro **and DaVinci Resolve** \u2014 Resolve reads XMEML natively.\\n Use `fcpxml` only for Final Cut Pro. Sending Resolve an FCPXML produces a package it cannot\\n open cleanly, so the target matters more than the file extension suggests.\\n- Use `videodraft` for a self-contained project package.\\n- Omit `outputPath` unless the user named a destination; the default is `~/Downloads`.\\n- Use `export_status` to list progress, warnings, and results. Cancel only when the user asks or the just-queued settings were wrong. Do not infer that an export is stuck from elapsed time alone.\\n\\n## Terminal bridge\\n\\nVideoDraft desktop terminals expose `videodraft-editor`, which controls the same process and MCP surface:\\n\\n```bash\\nvideodraft-editor status\\nvideodraft-editor list-tools\\nvideodraft-editor tool project_control --json \'{\\"action\\":\\"list\\"}\'\\nvideodraft-editor tool timeline_read --project \\"/path/to/My Video.vdproject\\" --json \'{}\'\\nvideodraft-editor show\\nvideodraft-editor hide\\n```\\n\\nEach `videodraft-editor` invocation is a separate connection, so a project selected by one call (e.g. `project_control` `action:\'open\'`) is NOT remembered by the next. Pass `--project <path>` on every `tool` call that operates on a project \u2014 without it, a follow-up call like `timeline_read` reports \\"No editor is available\\" even though the open succeeded.\\n\\nControl and tool commands auto-start a headless editor if none is running. `show` only reveals the already-running UI. Use `videodraft-editor tool <name> --json -` to read a JSON object from stdin when shell quoting would be fragile. Never read, copy, or expose the editor\'s rotating local authentication secret.\\n","references/examples.md":"# Recipes\\n\\nWorking patterns for common asks. All assume auth (`videodraft login` once, or `VIDEODRAFT_API_KEY` in the environment) and use `--json` for parsing.\\n\\nInside VideoDraft ADE, if a native editor is available, use these recipes for asset generation and\\noptional script/storyboard stages. Hand the results to the editor for production and export ONLY\\nwhen the deliverable the user asked for is a composed production. A standalone output \u2014 the batch\\nproduct clips in recipe 1, the upscale in recipe 7 \u2014 is finished when it is generated; importing it\\ninto a project and exporting a timeline builds an edit nobody asked for. Recipes below that call `videodraft produce` or `videodraft export` are hosted fallbacks only. Do not choose them over the available native editor unless the user explicitly asks for the hosted web workflow.\\n\\n## 1. Batch product videos from a CSV\\n\\nOne 9:16 product clip per row of `products.csv` (`name,image_url,tagline`):\\n\\n```bash\\n#!/usr/bin/env bash\\nset -euo pipefail\\nmkdir -p outputs\\n\\nwhile IFS=, read -r name image tagline; do\\n job=$(videodraft generate video \\\\\\n \\"Premium product shot of ${name}: ${tagline}. Slow orbit, studio lighting.\\" \\\\\\n --model gemini-omni-1.1-flash --ar 9:16 --duration 6 \\\\\\n --start-image \\"$image\\" \\\\\\n --no-wait --json | jq -r .job_id)\\n echo \\"$name,$job\\" >> outputs/jobs.csv\\ndone < <(tail -n +2 products.csv)\\n\\n# Collect ALL results with ONE process (batched polling \u2014 one request per tick)\\nvideodraft wait $(cut -d, -f2 outputs/jobs.csv) \\\\\\n --download \\"outputs/{job_id}_{index}.{ext}\\" --json > outputs/results.json\\n# map job ids back to product names via outputs/jobs.csv\\n```\\n\\nSubmit-then-collect parallelizes server-side generation; the single multi-id `wait` keeps it to one local process and one batched poll request per tick no matter how many jobs. Gemini Omni 1.1 Flash is selected because these are six-second first-frame product clips. Estimate first: `videodraft costs gemini-omni-1.1-flash --type video --duration 6 --resolution 720p --audio` \xD7 rows, and confirm with the user.\\n\\nExtend an uploaded clip or conversationally edit an official Google interaction with Gemini Omni 1.1 Flash:\\n\\nEach extension appends 3-10 seconds at the end. Edit and extend accept EXACTLY ONE input video, so `--ref-video` cannot accompany `--source-video` or `--previous-interaction-id`; only `--ref` images can. New dialogue is allowed only when the source video is silent, so a chain of spoken beats must carry its speech in the first turn. A continuation is submitted as the prior turn\'s output, so 40 seconds total is reachable only by extending from a source of 30s or less, and a ladder dead-ends past 30s.\\n\\n```bash\\n# Uploaded-video extension. Reference IMAGES are fine here; reference videos are not.\\nvideodraft generate video --model gemini-omni-1.1-flash \\\\\\n --source-video ./ending.mp4 --ref ./wardrobe.png \\\\\\n --extend --duration 6 --resolution 1080p \\\\\\n --download ./media/extended.mp4\\n\\n# Conversational edit from the interaction_id of an earlier generation. Add --extend to lengthen instead.\\nvideodraft generate video --model gemini-omni-1.1-flash \\\\\\n --previous-interaction-id \\"$INTERACTION_ID\\" \\\\\\n --resolution 720p \\\\\\n --download ./media/continued.mp4\\n```\\n\\nFal BYOK supports the currently callable Gemini Omni 1.1 generation and basic source-edit endpoints at zero VideoDraft credits. Its published callable v1.1 endpoints do not expose continuation, extension, or separate creative references on a source edit. Do not infer a Fal route or retry on paid Google while Fal BYOK is active.\\n\\n## 2. Hosted full marketing video from one idea (fallback)\\n\\n```bash\\nvideodraft create \\"30-second launch video for Solace, a sleep-tracking ring. Calm, premium, dark palette.\\" \\\\\\n --ar 9:16 --style cinematic --json > project.json\\nPROJECT=$(jq -r .project_id project.json)\\n\\nvideodraft shots \\"$PROJECT\\" --grid --estimate # show the user the cost; get a go-ahead\\nvideodraft shots \\"$PROJECT\\" --grid\\nvideodraft produce \\"$PROJECT\\"\\nvideodraft generate music \\"minimal ambient, warm pads, 60 BPM\\" --attach \\"$PROJECT\\"\\nvideodraft generate audio \\"Extend @Audio1 into a 20-second transition\\" --ref-audio ./intro.wav --format wav --download ./transition.wav\\nvideodraft export \\"$PROJECT\\" --download solace-launch.mp4\\n```\\n\\nUse this complete hosted path only when the user requested a web project or the native editor is unavailable. Otherwise stop after the storyboard/assets, import them into the native `.vdproject`, and export with `export_start`. The hosted project stays editable at the URL in `project.json` (`.urls`).\\n\\n## 3. Talking-head (avatar) video\\n\\nWhen the user has no portrait, generate a clear front-facing avatar image first. Skip this step when they supplied one or an existing character should be reused.\\n\\n```bash\\nvideodraft generate image \\\\\\n \\"Front-facing head-and-shoulders portrait of a friendly coffee expert, direct eye contact, natural expression, clean studio background\\" \\\\\\n --model nano-banana-2 --ar 9:16 --download ./media/avatar.png\\n\\nSCRIPT=$(videodraft avatar script \\"why our espresso subscription saves you money\\" --style ad-style --json | jq -r .script)\\nAVATAR=$(videodraft avatar create ./media/avatar.png --script \\"$SCRIPT\\" --voice elevenlabs-kPzsL2i3teMYv0FxEYQ6 --ar 9:16 --json | jq -r .avatar_video_id)\\nvideodraft avatar render \\"$AVATAR\\" --resolution 720p # VEED Fabric paid step; confirm cost first (~20 credits/sec)\\n```\\n\\n`avatar script` and `avatar create` (including speech) are bundled/free. In this example only the optional portrait generation and Fabric render spend credits.\\n\\nIf the portrait is low resolution, enhance it before `avatar create`:\\n\\n```bash\\nvideodraft upscale image ./founder-small.jpg --scale 2x --download ./media/founder-upscaled.png\\n```\\n\\nFor a one-off portrait animation without creating a managed avatar record:\\n\\n```bash\\nvideodraft avatar fabric ./founder.jpg \\\\\\n --text \\"Welcome to the weekly product update.\\" \\\\\\n --voice-description \\"warm, confident American presenter\\" \\\\\\n --resolution 720p --download ./media/presenter.mp4\\n```\\n\\nWhen the user already has both the video and replacement speech:\\n\\n```bash\\nvideodraft avatar lipsync ./presenter.mp4 \\\\\\n --audio ./localized-voiceover.mp3 \\\\\\n --sync-mode loop --download ./media/presenter-localized.mp4\\n```\\n\\nEdit an existing video with a dedicated edit model:\\n\\n```bash\\nvideodraft models video --category video_edit\\nvideodraft edit video ./product-demo.mp4 \\\\\\n \\"Preserve the product but follow the reference camera rhythm\\" \\\\\\n --model gemini-omni-1.1-flash --ref-video ./camera-rhythm.mp4 \\\\\\n --ref-video-duration 2.5 --resolution 1080p \\\\\\n --download ./media/product-demo-reframed.mp4\\n\\nvideodraft edit video ./product-demo.mp4 \\\\\\n \\"Turn the room into a warm evening scene while preserving the product and camera motion\\" \\\\\\n --model kling-o3-video-ref-edit --ref ./evening-style.jpg \\\\\\n --preserve-audio --download ./media/product-demo-evening.mp4\\n```\\n\\nTransfer motion from a reference clip onto a character image:\\n\\n```bash\\nvideodraft edit motion ./character.png \\\\\\n \\"Apply the dancer\'s movement to this character while preserving identity\\" \\\\\\n --motion-video ./dance-reference.mp4 \\\\\\n --model kling-v3-motion-control --quality pro \\\\\\n --download ./media/character-dance.mp4\\n```\\n\\n## 4. Hosted changelog video in CI\\n\\nIn a GitHub Action with `VIDEODRAFT_API_KEY` set as a secret:\\n\\n```bash\\nNOTES=$(git log --oneline v1.2.0..HEAD | head -20)\\nvideodraft create \\"Weekly product update video. Energetic, 20 seconds. Changes: ${NOTES}\\" --ar 16:9 --json > p.json\\nPROJECT=$(jq -r .project_id p.json)\\nvideodraft shots \\"$PROJECT\\" && videodraft produce \\"$PROJECT\\"\\nvideodraft export \\"$PROJECT\\" --download changelog.mp4 --wait-timeout 30m\\n```\\n\\n## 5. Variations and picking a winner\\n\\n```bash\\nvideodraft generate image \\"logo concept: minimalist fox, geometric\\" --num 4 --download \\"./concepts/{job_id}_{index}.{ext}\\" --json\\n# Show all 4 to the user; regenerate the chosen one at higher res:\\nvideodraft generate image \\"<same prompt>\\" --model nano-banana-pro --resolution 4K\\n```\\n\\n## 6. Reaching tools without a curated command\\n\\n```bash\\nvideodraft tools list --json | jq -r \'.[].name\'\\nvideodraft tools schema attach_media_to_shot --json\\nvideodraft call attach_media_to_shot --args \'{\\"project_id\\":\\"...\\",\\"scene_index\\":0,\\"shot_index\\":1,\\"media_url\\":\\"https://...\\",\\"media_type\\":\\"video\\",\\"duration_seconds\\":6}\'\\n```\\n\\nAnything the hosted VideoDraft MCP exposes, including character studio, product studio, and hosted project data, is reachable this way even before it gets a curated command. Native `.vdproject` editing uses the separate `videodraft_editor` MCP described in SKILL.md.\\n\\n## 7. Enhance an existing asset without changing it\\n\\n```bash\\n# Light image cleanup, no enlargement\\nvideodraft upscale image ./poster.png --scale 1x --download ./media/poster-enhanced.png\\n\\n# General image and video enlargement\\nvideodraft upscale image ./frame.png --scale 2x --download ./media/frame-2x.png\\nvideodraft upscale video ./clip.mp4 --scale 2x --download ./media/clip-2x.mp4\\n```\\n\\nUse these when the content is correct and only quality or resolution needs improvement. If the poster text, composition, subject, or motion is wrong, edit or regenerate instead.\\n","references/models.md":"# Choosing models (and predicting cost)\\n\\nAlways consult the live catalog instead of memorizing this page \u2014 models change weekly:\\n\\n```bash\\nvideodraft models image --json # every image model + inputs (aspect ratios, resolutions, max refs)\\nvideodraft models video --json # every video model + inputs + per-second pricing metadata\\nvideodraft models audio --json # standalone audio/media models + pricing inputs\\nvideodraft models voices --json # TTS voices\\nvideodraft models styles --json # visual style presets\\n```\\n\\n## Task-based model selection\\n\\nHonor an explicitly named model when it supports the request. Otherwise choose from the task\'s inputs, duration, audio, quality, speed, and cost. Pass the chosen model explicitly instead of relying on a blind platform fallback.\\n\\nThe catalogs carry the preference order themselves: every `videodraft models image|video|audio --json` response has a top-level `recommended` array (best first) plus `recommended` / `recommended_for` on each entry. Trust that over this page. Preferred today: images `nano-banana-2`, `nano-banana-pro`, `gpt-image-2`; videos `gemini-omni-1.1-flash`, `seedance-2.5`, `seedance-2`, `kling-3.0`, `kling-v3-turbo`, `kling-o3`; video edits `gemini-omni-1.1-flash`; talking heads `veed-fabric`; motion transfer `kling-v3-motion-control`; audio ElevenLabs for voice work and Lyria for instrumental music.\\n\\n### Images\\n\\n| Need | Choose | Why |\\n| -------------------------------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------- |\\n| Most generation, editing, character consistency, or reference work | `nano-banana-2` | Best general default; 1K/2K/4K and up to 14 reference images |\\n| Highest-quality complex generation or reasoning | `nano-banana-pro` | Premium Nano Banana quality and reasoning |\\n| Fast, inexpensive drafts and iteration | `nano-banana-2-lite` | Fastest/cheapest Nano Banana option; 1K only, up to 14 references |\\n| Posters, title cards, signs, logos, or any image with important readable text | `gpt-image-2` | Strong text rendering; up to 16 image inputs and 1K/2K/4K output |\\n| Complex multi-image composition, precise editing, or a strong alternate interpretation | `gpt-image-2` | Strong non-Nano alternative with multi-image input |\\n| Cheapest usable image, or an xAI look | `grok-imagine` | 2 cr flat (3 with a reference); 1 reference image |\\n| xAI at 2K or with a quality tier, up to 3 edit references | `grok-imagine-2.0` | 1K 4 (low) / 6 (medium), 2K 6 / 8, +1 cr per reference image |\\n\\nUse `--num 1..4` for variations of one prompt in a single call. Never loop separate paid calls for variations that fit in one request.\\n\\n### Videos\\n\\n| Need | Choose | Important limits |\\n| ---------------------------------------------------------------------------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| Most generation, first/last-frame, mixed-reference, source-edit, or extension requests | `gemini-omni-1.1-flash` | 3-10s output; 360p/720p/1080p/4K at 3/10/15/30 cr/s; audio always; up to 10 image inputs, and 3 reference videos <=3s on generate only; edit source <=10s; continuation or 3-10s extension of a 1-30s source, 40s total reachable only by extending from <=30s |\\n| Grok 1.5 text, first-frame, or 1-7 image-reference clips with native audio and optional 1080p | `grok-imagine-video-1.5` | 1-15s; 480p/720p/1080p for text/first-frame; references are 480p/720p only; no last frame |\\n| Unified text, first/last-frame, mixed-media, document, or webpage reference generation | `wan-3.0` | 2-30s or auto; 480p/720p/1080p at 7/14/28 cr/s; 10 image, 5 video, 5 audio refs, 20 media files total; document/web refs require thinking |\\n| 480p/768p/2K/4K with native stereo audio, first/last frames, or mixed image/video/audio references | `minimax-h3` | 5-15s; 5/6/13/16 cr/s by resolution; up to 9 image, 3 video, 3 audio refs, 12 files total; first 5 reference images free then 8 cr each; reference video/audio each total <=15s |\\n| Text or first/last-frame video with native audio and stronger prompt adherence | `minimax-h3-max` | 5-15s; 5/8 cr/s at 480p/768p; seed, safety checker, and disabled/balanced/quality prompt expansion; no reference media |\\n| Images pinned to specific moments (keyframes), 16-20s clips, or a cheap draft pass before committing | `flux-3` | 5-20s (auto for text/first-frame only); 720p/1080p; up to 10 keyframes; `--quality draft` is 720p-only at ~1/3 the cost |\\n| Video/audio references, mixed reference media, broad aspect ratios, frame-mode first+last frame, or 11-15s | `seedance-2` | 4-15s or auto; up to 9 image, 3 video, and 3 audio refs; audio toggle; Mini/Fast are 480p/720p only |\\n| Single takes past 15s, or more references than Seedance 2.0 allows | `seedance-2.5` | 4-30s or auto; up to 30 image, 10 video, and 10 audio refs (50 files total); one quality tier; 480p/720p/1080p |\\n| Fast polished 3-15s video with first frame, multi-prompt, and native audio | `kling-v3-turbo` | Audio always on; Pro default; no end frame, reference-media mode, or elements |\\n| Cinematic 3-15s with reference images, image/video elements, first+last frame, audio, or 4K | `kling-o3` | 7 combined image refs/elements, reduced to 4 with a video element; Standard/Pro/4K |\\n| Kling 3-15s image-to-video with first+last frame, image/video elements, multi-prompt, audio, or 4K | `kling-3.0` | Elements require a start image; image or video elements can bind voice_id; Standard/Pro/4K |\\n| User explicitly requests Veo, or the selected workflow specifically needs Veo | `google-veo3.1` | Good fallback, but not the preferred general model |\\n\\nRouting rules:\\n\\n- 480p/768p/2K/4K with native stereo audio: use MiniMax H3 (5/6/13/16 cr/s).\\n- 480p/768p text or first/last-frame video with native audio: use MiniMax H3 Max (5/8 cr/s). It has no reference mode.\\n- Grok 1.5 reference mode accepts 1-7 images only. Address them in array order as `<IMAGE_0>` through `<IMAGE_6>`. Do not combine reference images with `--start-image`, `--end-image`, `--ref-video`, or `--ref-audio`.\\n- Grok 1.5 first-frame mode accepts one `--start-image`, derives the output aspect ratio from that image, and does not support `--end-image`. Text and first-frame modes support 480p, 720p, or 1080p. Reference mode supports 480p or 720p.\\n- Grok 1.5 always generates native audio. Do not pass `--no-audio`, `--seed`, `--negative`, or `--quality`.\\n- Around 11-15 seconds with native audio: use MiniMax H3, Kling, or Seedance, not Gemini.\\n- One existing source video that should be edited: use `videodraft edit video`, which auto-selects Gemini Omni 1.1 Flash for a source up to 10s. Generic `generate video --ref-video` retains source-edit behavior when `--video-task` is omitted, but the dedicated edit command is clearer.\\n- Video supplied as a creative reference: Gemini Omni 1.1 Flash accepts up to 3 videos of at most 3 seconds each, including mixed image and video input. Creative video references are accepted on `--video-task generate` ONLY: edit and extend take exactly one input video, so `--ref-video` cannot accompany `--source-video` or `--previous-interaction-id`. Use Wan 3.0 for up to 5 ordered video/audio references and 1080p, MiniMax H3 for 2K/4K, or Seedance 2.0 when quality-tier control matters.\\n- First and last frame control: Gemini Omni 1.1 Flash, Wan 3.0, MiniMax H3, MiniMax H3 Max, Seedance, Kling O3, and Kling 3.0 support it. For Gemini, every start/end frame counts toward the 10-image total, leaving up to 9 references with a start frame or 8 with both frames.\\n- Extension with a 1-30s uploaded source uses Gemini Omni 1.1 Flash plus `--source-video` and `--video-task extend` (or `--extend`). Pass an explicit 3-10s output duration; the model appends it at the end, up to 40 seconds total. Creative `--ref-video` clips CANNOT accompany the source: edit and extend take exactly one input video. New dialogue is allowed only when the source video is silent; adding speech on top of a source that already has speech is refused with \\"the model is currently unable to process speech edits\\". Continuation uses `--previous-interaction-id <id>` and defaults to a conversational edit; `--video-task extend` lengthens it. A continuation is submitted as the prior turn\'s output video, so it obeys the same source limits (<=30s to extend, <=10s to edit) and the same silent-source dialogue rule. 40s total is reachable only by extending from a source of 30s or less, so a ladder dead-ends past 30s. Fal returns interaction IDs, but its currently published callable v1.1 endpoints do not expose continuation/extension or mixed source-edit references; never infer a route or silently fall back to paid Google.\\n- Wan 3.0 reference mode and frame mode are separate. It accepts 10 images, 5 videos, and 5 audio clips, at most 20 media files total. Video and audio each total at most 15 seconds. `--file-url` and `--web-url` require `--thinking`. `--auto-duration` cannot be combined with `--duration`.\\n- MiniMax H3 reference mode and first-plus-last-frame mode are separate. Audio cannot be the only reference. Address references as `Image 1`, `Video 1`, and `Audio 1` in array order.\\n- Seedance reference mode and first-plus-last-frame mode are separate. Do not promise reference video/audio plus a last frame in one generation.\\n- Multi-prompt sequencing: use Kling 3.0 Turbo, Kling O3, or Kling 3.0.\\n- Kling 3.0 image-to-video and Kling O3 reference-to-video accept repeatable structured `--element` JSON. Each element is image-backed (`frontal_image_url` plus 1-3 `reference_image_urls`) or video-backed (`video_url`). Either form may include `voice_id`. Keep the voice ID inside the same element so the association is preserved. Reference them as `@Element1`, `@Element2`. Kling V3 Turbo rejects elements.\\n- Kling 2.6 Pro image-to-video accepts one or two repeatable `--voice-id` values. Cite them as `<<<voice_1>>>` and `<<<voice_2>>>` in the prompt. Voice control costs 17 cr/s. Use `videodraft kling-voices list|create|delete` to manage the separate Kling video-control voice library. Creating a voice requires a clean 5-30 second, up-to-50MB single-speaker `.mp3`, `.wav`, `.mp4`, or `.mov` sample plus `--confirm-consent`. Creation costs 1 VideoDraft credit on the platform Fal account and 0 credits with Fal BYOK; use the create command\'s `--estimate` flag to check without creating.\\n- Kling V3 voice control costs 16 cr/s for Standard and 20 cr/s for Pro.\\n- Seedance quality: `mini` for the lowest cost, `fast` for speed, `standard` for maximum quality and for 1080p/4K. Seedance 2.5 has a single tier and ignores `--quality`.\\n- Longer than 15 seconds, or more than 9 image / 3 video / 3 audio references: use Seedance 2.5. It reaches 30s and 30/10/10 references (50 files total) at 480p/720p/1080p, but has no 4K.\\n- Real identifiable people in Seedance 2.x require an explicit routing and pricing opt-in. Set MCP `allow_real_people: true` or CLI `--allow-real-people` on the first request when supplied visual input media visibly contains one, including a start frame, end frame, reference image, or reference video. Keep the Byteplus default for text-only requests, non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. This keeps Byteplus first, permits a submit-time Fal fallback, and charges Fal\'s higher tier-specific rate.\\n- If a default-priced Seedance request fails with `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the higher rate, follow the user\'s spend policy, and retry once with the option enabled. The response also carries `retry_with: { allow_real_people: true }`, `cli_flag: \\"--allow-real-people\\"`, and `retry_policy: \\"once\\"`. If the option was already enabled, do not repeat the same request. Byteplus may accept a task and reject the output later. VideoDraft refunds that failed generation, but it cannot reroute the asynchronous failure to Fal. Rephrase or change the references instead.\\n\\n### Video edit and motion-control categories\\n\\nUse `videodraft models video --category video_edit` for existing-video transforms and `--category motion_control` for motion transfer.\\n\\n| Need | Command/model | Important limits |\\n| ------------------------------------------ | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| Most edits of a source up to 10s (DEFAULT) | `videodraft edit video <video> \\"...\\"` (auto-selects `gemini-omni-1.1-flash`) | Source <=10s or it REFUSES; up to 10 image refs and 3 creative video refs <=3s each; 360p/720p/1080p/4K; audio always regenerated (no `--preserve-audio`) |\\n| Cheapest simple prompt edit | `videodraft edit video <video> \\"...\\" --model grok-imagine-video-edit` | No image refs; source silently truncated to 8s; auto/480p/720p |\\n| Edit with several image references | `--model happy-horse-video-edit --ref ...` | Up to 5 refs; 720p/1080p; source silently truncated to 15s; highest rate (28-56 cr/s) |\\n| Controlled Kling edit | `--model kling-o3-video-ref-edit --ref ...` | Up to 4 refs; Standard/Pro; source silently clamped to 3-10s |\\n| Transfer reference motion to an image | `videodraft edit motion <image> [direction] --motion-video <video>` | Prompt/direction is optional; Kling V3 default; optional one image-only `--element`; element requires video orientation |\\n\\nIf the user explicitly names one of these models, preserve it. The CLI uploads local source videos and reference images automatically. Editing returns an async job and waits by default.\\n\\n**Omit `--model` and the SERVER chooses**, because only it can measure the source. It picks `gemini-omni-1.1-flash` for any source up to 10s. When that is not safe (source longer than 10s, unmeasurable duration, `--preserve-audio`, more than 10 refs, or Fal BYOK with refs) it spends nothing and returns a priced menu: per model, the seconds it would edit, the seconds it would drop, and the credit cost. The CLI prints that table and exits 2. Show it to the user, then re-run with `--model`.\\n\\n**Truncation is the trap here.** Only Gemini refuses a source it cannot fully consume. Every other edit model accepts a 30s clip and returns an edit of its first 8-15 seconds with no error. `videodraft edit video` now warns when this will happen and the tool response carries `source.truncated` / `source.dropped_seconds`; relay it to the user rather than letting them discover it in the output.\\n\\nTo edit a longer source without losing its tail, cut it into <=10s pieces with `videodraft_editor`, edit each with Gemini, then reassemble and export there. VideoDraft has no server-side split/concat, so this needs the native editor.\\n\\nKling O3 is also exposed for reference generation. `videodraft generate video --model kling-o3-video-ref-edit` requires exactly one `--ref-video` and generates a new reference-guided clip. Wan 3.0 handles new text, frame, and mixed-reference generation, but is not an existing-source edit model.\\n\\n### Reference-first video workflow\\n\\n- Prefer a start frame or reference image whenever a specific character, product, location, style, composition, or brand identity must stay recognizable.\\n- If the user gives a reference, pass it. Never silently replace it with a text description.\\n- If no reference exists and continuity matters, generate a still first with the user\'s explicitly requested compatible image model, otherwise use Nano Banana 2. Wait for the image URL, then animate it with the selected video model. Confirm the combined image plus video cost before starting.\\n- For multi-shot scenes, generate shot images with `videodraft shots <project_id> --model <selected-image-model> --grid`. Preserve an explicitly requested compatible image model; otherwise use `nano-banana-2`. The grid establishes the scene and characters together, then decodes into individual shot images.\\n- Animate the decoded shot images as per-shot start frames or references. Do not independently text-generate each video clip when the shots need to match.\\n- Pure text-to-video remains appropriate for generic one-off footage where no subject, composition, or continuity needs to be preserved.\\n\\n### Audio\\n\\n- **Seed Audio 1.0**: use `videodraft generate audio` for open-ended speech, sound, music, or prompt-driven audio editing. It accepts up to three audio references or one image. Address audio references as `@Audio1`, `@Audio2`, and `@Audio3`. Preset and custom cloned voice IDs are supported. Output is up to 120 seconds. There is no requested-duration input. The CLI automatically retries transient responses with one idempotency key. To recover after the CLI process itself is interrupted, set `--idempotency-key <uuid>` on the original command and reuse it.\\n- **Voiceover/TTS**: prefer ElevenLabs. Brittney is the platform default voice; under ElevenLabs BYOK, use a compatible voice from the user\'s account. Honor another supported voice/provider when the user explicitly selects it.\\n- **Dialogue, voice changing, and dubbing**: ElevenLabs only.\\n- **Sound effects**: ElevenLabs Sound Effects only.\\n- **Music**: use `lyria-3-clip-preview` for a short instrumental/background score, `lyria-3-pro-preview` for a longer or higher-quality instrumental score, and `elevenlabs-music` when vocals/lyrics or a specified 10-120 second length matter.\\n- Voice Changer and Dubbing require the source media duration and currently accept source media up to 300 seconds.\\n\\n### Avatar / talking head\\n\\n**First decide the framing, not just \\"someone talks\\".** This lane animates a PORTRAIT facing the lens. A character delivering a line inside a real scene, with blocking, framing or camera movement, belongs to `generate video` instead: use `kling-2.6-pro` (one or two voices cited as `<<<voice_1>>>` / `<<<voice_2>>>`), `kling-3.0` (a voice bound per element, so several characters can speak in one shot), or `happy-horse` (strong character identity from a frontal image, native audio, multilingual lip-sync). Sending a cinematic shot to Fabric returns a head-on talking headshot, not the shot that was asked for. `videodraft models video --json` lists these under `recommended.in_scene_dialogue`.\\n\\nFor a presenter, spokesperson or explainer speaking to camera, VEED Fabric is the preferred model. Choose the dedicated path from the media the user already has:\\n\\n| Starting media | Command | Use |\\n| ----------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------- |\\n| Portrait + script, reusable avatar record | `videodraft avatar create <portrait> --script \\"...\\"` then `avatar render` | Managed avatar flow with bundled speech preparation |\\n| Portrait + text | `videodraft avatar fabric <portrait> --text \\"...\\"` | One-off direct VEED Fabric text mode |\\n| Portrait + existing audio | `videodraft avatar fabric <portrait> --audio <audio>` | One-off direct VEED Fabric audio lip sync |\\n| Existing video + existing audio | `videodraft avatar lipsync <video> --audio <audio>` | Sync Labs Lipsync 2 |\\n\\nThe managed renderer is VEED Fabric Fast (`veed/fabric-1.0/fast`). Direct Fabric and Sync Labs are paid AI Studio generations and return async job IDs.\\n\\n1. Obtain the avatar image. Prefer the user\'s supplied portrait or an existing character. If none exists, use the user\'s explicitly requested compatible image model, otherwise generate a front-facing head-and-shoulders portrait with `nano-banana-2`, direct eye contact, a natural expression, and a clean background. Match the intended video aspect ratio when practical.\\n2. If the portrait is visibly soft or too small, run Topaz image enhancement/upscaling before animation.\\n3. Generate a script only if needed: `videodraft avatar script \\"<idea>\\"`.\\n4. Create the avatar record and speech: `videodraft avatar create <portrait-url-or-file> --script \\"...\\" --voice <id> --ar 9:16`. Prefer ElevenLabs when unspecified, but honor another explicitly selected supported voice/provider.\\n5. Render with VEED Fabric: `videodraft avatar render <avatar_video_id> --resolution 720p`.\\n\\nThe portrait is passed as the avatar\'s character image, not as a generic video\'s start frame. Prefer rendering directly at 720p. Use 480p only when the user prioritizes lower cost. Avatar script generation and `avatar create` (including speech) are bundled/free. Confirm the Fabric render cost, plus portrait generation or upscaling when needed.\\n\\nDirect Fabric text/audio and Sync Labs do not use the managed avatar record. The CLI uploads local portrait, video, and audio files automatically. `avatar fabric --speed fast` applies only to audio mode. Sync costs 5 credits per verified audio second; under Fal BYOK, `sync_mode` remains available but `temperature` and `active_speaker` are ignored by the provider.\\n\\n### Upscaling / enhancement\\n\\n- **Images**: Topaz via `videodraft upscale image <url-or-file> --scale 1x|2x|4x`. Use 1x for light enhancement without enlargement, 2x as the general default, and 4x only when the source quality and target size justify it. The result is synchronous.\\n- **Videos**: Topaz via `videodraft upscale video <url-or-file> --scale 2x`. Use 2x by default. The job is asynchronous; the CLI waits by default, while MCP callers poll `check_generation_status`. MCP video input must be VideoDraft-hosted, so upload local or external sources first.\\n- Use upscaling to preserve the image/video while improving detail, resolution, or cleanup. It cannot fix the wrong subject, misspelled text, bad framing, unwanted objects, broken continuity, or incorrect motion. Use an edit or regeneration for those problems.\\n- For a new Fabric avatar, render directly at 720p instead of rendering at 480p and then upscaling. Upscale the source portrait first only when the portrait itself is low quality.\\n\\n## Capability gotchas\\n\\n- Each model\'s `inputs` block is authoritative: supported `aspect_ratios`, `resolutions`, `quality_options`, `start_frame`/`end_frame`, `max_reference_images/videos/audio`, `multi_prompt`, `audio_toggle`. Passing an unsupported input fails with a clear error \u2014 check first, don\'t trial-and-error paid calls.\\n- Most video models support only 16:9 / 9:16 / 1:1. A 3:4 request hard-fails on most.\\n- `--seed` reproduces a specific output on models that support it (e.g. Flux, Ideogram V4); everything else ignores it. You do not need a seed for variation \u2014 `--num` already varies.\\n- `--rendering-speed` applies to Ideogram (V3: `Default`/`Turbo`/`Quality`; V4: `Turbo`/`Balanced`/`Quality`) and affects image cost \u2014 pass it to `videodraft costs ... --rendering-speed <tier>` for an accurate estimate. Always trust `videodraft models image --json` over this list; new models and tiers appear there the moment the platform ships them, with no CLI update.\\n- `seedream-v5-pro` supports unified text-to-image and reference-image editing with up to 10 image references. Use `--resolution 1K` for 7 credits/image or `--resolution 2K` for 14 credits/image.\\n- Reference inputs: `--ref <img>` (images, including up to 10 total for Gemini Omni 1.1 Flash and Wan 3.0, and 7 for Grok 1.5), `--source-video <v>` (Gemini uploaded edit/extension source), `--ref-video <v>` (up to 3 creative videos <=3s each for Gemini Omni 1.1 Flash; also Wan 3.0, MiniMax H3, and Seedance 2), `--ref-audio <a>` (Wan 3.0, MiniMax H3, Seedance 2), and `--element \'<json>\'` or `--element @elements.json` for Kling V3/O3. For an exact Seedance 2.x reference-video `--estimate`, add `--ref-video-seconds <combined-seconds>`; Seedance bills input seconds alongside output. Wan 3.0 and MiniMax H3 do not bill input reference seconds. The CLI uploads local media references and every structured element without flattening the source/reference roles. `--segment \\"<prompt>:<seconds>\\"` (repeatable) drives Kling 3.0, Kling 3.0 Turbo, and O3 multi-prompt generation. Use 1-6 segments of 1-15 whole seconds each, with 3-15 seconds total. `generate image --video-ref` is the nano-banana-2 video reference.\\n- The top-level prompt is OPTIONAL for Gemini Omni 1.1 Flash media-input or continuation calls, Wan 3.0 frame/reference modes, `generate video` with multi-prompt models, and Kling 3.0 Turbo (`--model kling-v3-turbo`) image-to-video. Text-only Gemini and Wan calls still require a prompt unless their live schema says otherwise.\\n- Hosted AI Production fallback: `videodraft produce <project> --mode full_video` generates one Seedance 2 video per scene; add `--allow-real-people` when a scene grid visibly contains a real identifiable person. The MCP equivalent is `produce_project` with `mode: \\"full_video\\", allow_real_people: true`. The option applies the higher Fal-tier rate to every submitted scene segment. If a partial run returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, rerun the same project once with the option after cost confirmation. The server reconciles asynchronous results first, preserves running/completed jobs, and retries only failed placeholders carrying that exact code. Poll with `videodraft generations`, then `videodraft finalize <project>` swaps them into the hosted timeline before `export`. In VideoDraft ADE, do not choose this path while `videodraft_editor` is available unless the user explicitly requests hosted production. Generate or download the scene assets, import them, and assemble/export with the native editor instead. If the user explicitly requests another compatible video model for a hosted production, do not use this fixed Seedance path; generate the project shots manually with the requested model and attach them to the hosted timeline.\\n\\n## Cost model\\n\\n- Images: per image (\xD7 `--num`). Matrix-priced models (GPT-Image, Nano Banana Pro, Seedream v5 Pro) vary by resolution/quality.\\n- Video: usually credits/second \xD7 duration; rate depends on model + resolution + quality + native audio on/off.\\n- Gemini Omni 1.1 Flash: 3 / 10 / 15 / 30 credits per output second at 360p / 720p / 1080p / 4K (720p default). Extend appends an explicit 3-10 seconds to a 1-30s source, whether uploaded or resolved from a prior interaction; 40 seconds total is reachable only while the source stays at or under 30s. Fal BYOK generation and basic source edits cost zero VideoDraft credits; continuation, extension, and separate creative references on a source edit are unavailable under Fal BYOK.\\n- MiniMax H3: 5 / 6 / 13 / 16 credits per output second at 480p / 768p / 2K / 4K (768p default). The first 5 reference images are included, then 8 credits for each additional image. Reference video and reference audio are NOT billed.\\n- MiniMax H3 Max: 5 credits per output second at 480p or 8 credits per second at 768p (default).\\n- Wan 3.0: 7 / 14 / 28 credits per output second at 480p / 720p / 1080p. Auto duration reserves 30 seconds and reconciles unused credits from the provider-reported output duration. Fal BYOK charges zero VideoDraft credits.\\n- Grok Imagine Video 1.5: 8 credits/output second at 480p, 14 at 720p, or 25 at 1080p, plus 1 credit for each first-frame or reference image. Native generated audio is part of every output.\\n- Kling voice control: 17 credits/output second for Kling 2.6 Pro, 16 at Kling V3 Standard, and 20 at Kling V3 Pro.\\n- Shot-image batches: one image per shot (+1 grid image per scene in `--grid` mode) \u2014 the largest single spend in the pipeline.\\n- VEED Fabric avatar renders: ~10 credits/sec at 480p, ~20/sec at 720p. Avatar creation and its speech are bundled/free; only optional portrait generation/upscaling adds cost before the render.\\n- Direct VEED Fabric: text or normal audio is 8 credits/sec at 480p and 15/sec at 720p; fast audio is 10/sec at 480p and 20/sec at 720p.\\n- Sync Labs Lipsync 2: 5 credits per verified audio second.\\n- Voiceover TTS: 10 credits per 1000 characters for standard voices, 30 per 1000 for cloned `custom-*` voices (min 1, pro-rated); applies to standalone voiceovers AND per-scene narration during `produce`. Silent tracks are free. Voice cloning itself is a flat 150 credits per clone.\\n- Lyria music: flat per track, 4 credits (clip) / 8 credits (pro).\\n- Seed Audio 1.0: 19 credits per actual output minute, prorated and rounded up to a whole credit. VideoDraft reserves the 120-second maximum of 38 credits and refunds the unused portion after generation. Fal BYOK is free.\\n- ElevenLabs audio: sound effects are per second, dialogue is per character, music/voice-changer/dubbing are per started minute. Voice changer and dubbing reject source media above 300s in the current synchronous flow.\\n- Seedance 2.0 / 2.5 real people: every listed Seedance 2.x rate assumes `--allow-real-people` is OFF, which uses the Byteplus-priced path (2.0 Mini 4/8 cr/s, Fast 6/13, Standard 7/16/38/78, 2.5 11/24/57 for 480p/720p/1080p). Byteplus refuses real-person likenesses, so a likeness-policy failure does not fall back by default. Passing `--allow-real-people` keeps Byteplus first but permits a submit-time Fal fallback, which allows them, and prices at Fal\'s rate for that tier: 2.0 Mini 8/16, Fast 11/25, Standard 14/31/69/156, 2.5 23/48/114. That is roughly 2x but not exactly 2x: the Seedance 2.0 1080p pair is 38/69, or about 1.82x. If Byteplus accepts the task and later rejects the generated output, VideoDraft refunds the failure but does not resubmit it to Fal. Pass the option proactively only when supplied visual input media visibly contains a real identifiable person. Otherwise retry once only after the exact opt-in code.\\n- Grok Imagine images: `grok-imagine` is a flat 2 cr (3 with a reference). `grok-imagine-2.0` is a separate, newer model priced by resolution and quality: 1K 4 (low) / 6 (medium), 2K 6 / 8, plus 1 cr per reference image (up to 3). v1 is NOT superseded \u2014 pick it when cost matters more than 2K.\\n- xAI bills refused requests, so failed Grok generations are not refunded.\\n- Upscales: priced by scale and source size.\\n\\nQuote before spending:\\n\\n```bash\\nvideodraft costs gemini-omni-1.1-flash --type video --duration 8 --resolution 720p --audio\\nvideodraft costs minimax-h3 --type video --duration 10 --resolution 2K --ref-images 7\\nvideodraft costs minimax-h3-max --type video --duration 10 --resolution 768p\\nvideodraft costs grok-imagine-video-1.5 --type video --duration 8 --resolution 720p --ref-images 4\\nvideodraft costs seedance-2 --type video --duration 15 --resolution 720p --quality standard --audio\\nvideodraft costs grok-imagine-2.0 --type image --resolution 2K --quality medium --num 2\\nvideodraft costs seedance-2 --type video --duration 15 --resolution 720p --quality standard --audio --allow-real-people # Fal-tier rate\\nvideodraft costs elevenlabs-dubbing --type audio --duration 60\\nvideodraft costs seed-audio-1.0 --type audio --duration 60 # scenario only; model controls actual length\\nvideodraft costs elevenlabs-dialogue --type audio --chars 350\\nvideodraft costs voiceover --type audio --chars 800 # TTS: 10 cr / 1000 chars\\nvideodraft generate video \\"...\\" --model gemini-omni-1.1-flash --estimate # same quote, inline\\nvideodraft generate video \\"...\\" --model minimax-h3-max --duration 8 --resolution 768p --prompt-expansion-mode balanced --safety-checker true\\n```\\n","references/pipeline.md":"# VideoDraft pipeline reference\\n\\nEverything here describes the hosted fallback pipeline through the CLI (`videodraft <command>` / `videodraft call <tool>`) or hosted MCP connector (tool names in backticks). When the local `videodraft_editor` MCP is available, do not use hosted production or export by default. Use hosted tools only for asset generation and optional script/storyboard stages, then import the results and finish with the native editor reference linked from SKILL.md. Continue through `produce_project` and `export_video` only when the user explicitly requests a hosted web production or the native editor is unavailable.\\n\\nUse direct asset tools for standalone images, clips, audio, upscales, and descriptions. Use a hosted project when the user explicitly wants the editable web project, when a hosted storyboard stage is useful, or when the native editor is unavailable. Script-only uses a script-stage project and stops at the script. In VideoDraft ADE with editor tools present, stop before hosted production, import the generated assets, and build/export the native project.\\n\\n## Stages and their tools\\n\\n| Stage | CLI | Underlying tool |\\n| --------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------ |\\n| Idea \u2192 full storyboard project | `videodraft create \\"<idea>\\"` | `generate_storyboard_from_idea` |\\n| Idea \u2192 script only (stop there) | `videodraft create \\"<idea>\\" --script-only` | `generate_script_from_idea` |\\n| Footage IS the video | `videodraft call generate_storyboard_from_media` | `generate_storyboard_from_media` |\\n| Batch shot images | `videodraft shots <project>` | `generate_shot_images` |\\n| One shot image | `videodraft generate image --project <id> --scene N --shot M` | `generate_image` |\\n| Produce (voiceover, captions, timeline) | `videodraft produce <project>` | `produce_project` |\\n| Seedance full-video production | `videodraft produce <project> --mode full_video` | `produce_project` with `mode: \\"full_video\\"` |\\n| Per-shot motion prompts | `videodraft video-prompts <project>` | `generate_video_prompts` |\\n| Motion clip for a shot | `videodraft generate video --project <id>` | `generate_video` |\\n| Attach a finished clip to the timeline | `videodraft attach <project> --scene N --shot M --media <url> --type video` | `attach_media_to_shot` |\\n| Background music | `videodraft generate music --attach <project>` | `generate_music` / `set_background_music` |\\n| General or reference-driven audio | `videodraft generate audio \\"...\\"` | `generate_audio` |\\n| Sound effect | `videodraft generate sound-effect \\"...\\"` | `generate_sound_effect` |\\n| Dialogue audio | `videodraft generate dialogue --line \\"voice:text\\"` | `generate_dialogue` |\\n| Voice changer | `videodraft generate voice-changer <audio>` | `change_voice` |\\n| Dubbing | `videodraft generate dub <audio_or_video>` | `dub_media` |\\n| Scene voiceover | `videodraft generate voiceover --project <id> --scene N` | `generate_voiceover` |\\n| Avatar script | `videodraft avatar script \\"<idea>\\"` | `generate_avatar_script` |\\n| Avatar + speech | `videodraft avatar create <portrait> --script \\"...\\"` | `create_avatar_video` |\\n| Talking-head render | `videodraft avatar render <avatar_video_id>` | `render_avatar_video` + `get_avatar_video` |\\n| Direct portrait + text/audio | `videodraft avatar fabric <portrait> --text \\"...\\"` or `--audio <file>` | `generate_veed_fabric_video` |\\n| Existing video + replacement audio | `videodraft avatar lipsync <video> --audio <file>` | `generate_sync_lipsync_video` |\\n| Existing-video AI edit | `videodraft edit video <video> \\"<change>\\" --model <video-edit-model>` | `edit_video` |\\n| Motion transfer | `videodraft edit motion <image> [direction] --motion-video <video>` | `generate_motion_control_video` |\\n| Image enhancement/upscale | `videodraft upscale image <image>` | `upscale_image` |\\n| Video enhancement/upscale | `videodraft upscale video <video>` | `upscale_video` |\\n| Final MP4 | `videodraft export <project>` | `export_video` + `check_export_status` |\\n\\n## Rules that prevent broken results\\n\\n- **The storyboard is generated FROM the script**, never from the raw idea. `videodraft create` runs the whole chain correctly. Don\'t call `generate_storyboard_scenes` with a raw idea as the \\"script\\".\\n- **Visual consistency**: never generate a storyboard shot in isolation. Shot prompts carry `[[asset:Name]]` / `[[shot:X-Y]]` tags that `generate_shot_images` resolves against the project\'s visual assets and prior shots. When generating a single shot whose prompt has no tags, pass `--ref` images yourself (the project\'s visual assets and/or the previous shot\'s image; `projects get` exposes both). For scenes with multiple shots or recurring characters, prefer `videodraft shots <project> --model <selected-image-model> --grid`: preserve an explicitly requested compatible image model, otherwise use `nano-banana-2`. It creates one coherent scene grid, then decodes it into individual shot images.\\n- **Reference-first video**: when identity, styling, or composition matters, do not generate each motion clip from text alone. Generate or select the shot still first, then pass the decoded shot image as `--start-image` or `--ref` to the selected video model. AI Production already composes scene grids and sends them to Seedance as references. If the user explicitly requests another compatible video model, bypass fixed Seedance full-video mode and generate the per-shot clips with the requested model, using the individual decoded shot images as anchors.\\n- **Seedance full-video real people**: when a hosted `full_video` scene grid visibly contains a real identifiable person, enable the option before submitting any scene videos. Keep the Byteplus default for non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. Use `videodraft produce <project> --mode full_video --allow-real-people`, or MCP `produce_project` with `mode: \\"full_video\\", allow_real_people: true`. This applies Fal-tier pricing to every submitted segment and permits the Byteplus-to-Fal fallback. If a partial run without the option returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, re-estimate, follow the user\'s spend-confirmation preference, and rerun the same project once with the option. The server reconciles asynchronous results first, preserves running/completed jobs, and retries only failed placeholders carrying that exact code. Do not loop when it was already enabled. VideoDraft refunds a Byteplus task rejected after asynchronous acceptance, but cannot reroute it; rephrase or change the scene references instead.\\n- **Hold off generating shot images while the user is still iterating** on storyboard structure.\\n- **produce \u2192 export ordering**: `export` requires a produced project where every production scene has timeline media. If `produce` returns `generating_shot_images`, poll the job ids it returns, then re-run produce.\\n- **Do not attach motion clips before production exists**: run `produce` successfully first, then attach finished motion clips to the production timeline. Attaching before `production_data` exists cannot place them in the final timeline.\\n- **Generated motion clips do not auto-attach**: after `generate video` completes, attach the clip with `attach_media_to_shot` (`media_type:\\"video\\"`, include `duration_seconds`) \u2014 it replaces the production timeline clip while keeping the storyboard still.\\n- **Talking heads use dedicated avatar tools**: do not use `generate video`. Use managed `avatar create` and `avatar render` for reusable avatars, direct `avatar fabric` for a portrait plus text/audio, and `avatar lipsync` for an existing video plus replacement audio. Reuse a supplied person image or generate a clear front-facing portrait with the explicitly requested compatible image model, otherwise Nano Banana 2. Managed avatar creation and speech are bundled/free; direct Fabric, Sync, and render are paid.\\n- **Existing-video edits use their own category**: call `edit_video` or `videodraft edit video` with a `video_edit` model when transforming the source itself. Kling O3 also has a reference-generation mode that creates a new guided clip. Wan 3.0 is a text/frame/reference generation model, not a source-video editor. Motion transfer similarly uses `generate_motion_control_video` or `videodraft edit motion` with a `motion_control` model.\\n- **Upscaling preserves rather than redesigns**: use Topaz when resolution, detail, or cleanup is the problem. Regenerate or edit when the subject, text, framing, continuity, or motion is wrong. Upscale a low-quality avatar portrait before Fabric; do not render a new avatar at 480p just to upscale the result.\\n- **Timeouts on the one-shot create**: if `create` times out at the transport layer, the project was still created server-side \u2014 `videodraft projects list`, take the most recent, and resume with its id. Don\'t start a duplicate.\\n\\n## User-attached media: classify roles first\\n\\nFor EACH attached file decide:\\n\\n- **visual_asset** \u2014 recurring reference (character / product / location / style). Upload, then pass in `visual_assets` of `generate_storyboard_from_idea` (via `videodraft call`), or add to an existing project with `add_visual_assets`. Type must be one of `character | object | location | style | custom` with a short name + concrete description.\\n- **shot** \u2014 the media IS footage for the video. Whole video = footage \u2192 `generate_storyboard_from_media`. Idea + footage \u2192 `generate_storyboard_from_idea` with `shot_media`. Existing storyboard \u2192 `attach_media_to_shots`.\\n- **reference** \u2014 inspiration only \u2192 fold a description into the idea/instructions; don\'t place it as a shot or asset.\\n\\nAmbiguous (e.g. a person holding a product)? Ask the user.\\n\\nUploads persist in the media library \u2014 recall later with `videodraft media list`.\\n\\n## Editing project data safely\\n\\n1. `videodraft call get_project_schema` \u2014 read the structure once per session.\\n2. `videodraft projects get <id> --raw` \u2014 the exact editable blob.\\n3. Modify; then `videodraft call update_project --stdin` with `{\\"project_id\\": \\"...\\", \\"data\\": {...}}`.\\n - Objects deep-merge key-by-key; **arrays replace wholesale** \u2014 send the complete array you\'re changing (e.g. all of `storyboard.scenes`).\\n - Scene shot arrays (`image_prompt` / `shot_types` / `shot_actions` / `search_prompt` / `preview_media`) are auto-aligned; fix-ups come back as warnings.\\n4. Snapshot before risky edits: `videodraft checkpoint create <id> --name \\"before re-script\\"`. Restore with `videodraft checkpoint restore <id> <version>`.\\n\\n## AI Studio sessions (standalone generations)\\n\\nProject generations group automatically, and standalone work is grouped per conversation (MCP) or per working directory (CLI) by the connection session \u2014 see the \\"AI Studio sessions\\" section of SKILL.md. Once the task is clear, give that automatic session a concise 3-6 word title before the first generation:\\n\\n```bash\\nvideodraft sessions name \\"Fox Brand Explorations\\"\\nvideodraft generate image \\"...\\"\\n```\\n\\nNaming creates the session with that title. If generation, a user, or an earlier agent created it first, the existing name is preserved. The command refuses to run while `VIDEODRAFT_SESSION` is set, because that override would send later generations to a different session. Use `sessions create` plus `--session` only to continue or deliberately create a separate group.\\n"}') {
5772
+ return JSON.parse('{"SKILL.md":"---\\nname: videodraft\\ndescription: Create and edit AI videos, images, Seed Audio, voiceovers, music, sound effects, dialogue, dubbing, storyboards, avatar videos, media upscales, and product/ad videos with VideoDraft. Use whenever the user mentions VideoDraft; asks to generate a video, image, audio asset, ad, explainer, storyboard, avatar, upscale, or batch/CI workflow; or wants to assemble, cut, caption, mix, lay out, inspect, or export a native VideoDraft Editor timeline. Covers the cloud `videodraft` CLI/MCP and local headless `videodraft_editor` MCP. When the editor MCP is exposed, prefer it for production, timeline assembly, and export; use cloud production/export only when explicitly requested or the editor is unavailable.\\n---\\n\\n# VideoDraft\\n\\nVideoDraft is an AI video creation platform where asset generation is the priority lane:\\n\\n- **Asset generation**: standalone images, video clips, Seed Audio, voiceovers, music, sound effects, dialogue, voice-changed audio, dubbed media, upscales, and image descriptions. This is the fastest and most important lane. Treat these as complete deliverables when the user asks for assets.\\n- **Asset I/O**: upload local files, download outputs, auto-upload local references, and save generated media where the user can see it.\\n- **Native editing**: local `.vdproject` timelines, cuts, layouts, captions, effects, audio, and exports through the headless VideoDraft Editor. Inside VideoDraft ADE, this is the default production and export lane whenever `videodraft_editor` is available.\\n- **Hosted project production**: idea \u2192 script \u2192 storyboard \u2192 hosted production timeline \u2192 exported MP4. Use the early stages for scripts, storyboards, and generated assets when useful. Treat hosted production and export as a fallback when the native editor is unavailable, or as an explicit destination when the user asks for an editable web project or hosted workflow.\\n\\n## How to connect\\n\\nCloud generation has two equivalent surfaces (same backend, credits, and hosted projects). Native timeline editing is a separate local surface:\\n\\n1. **CLI** (preferred when you have a shell): run `videodraft` if it\'s on PATH; otherwise `npx -y videodraft@latest` runs it with no install (needs Node \u226520; the `-y` skips npx\'s install prompt so it runs non-interactively; the package is fetched on first use and cached). For heavy use, `npm install -g videodraft`. If there\'s no Node/shell here but the MCP connector below is available, use that instead; if neither works, tell the user how to install (https://videodraft.ai/cli).\\n - Auth \u2014 pick by context, don\'t guess:\\n \u2022 INTERACTIVE (a human is in the session, e.g. Claude Code / Codex): on exit code 3 (\\"not authenticated\\"), tell the user to run `videodraft login` in their terminal \u2014 it opens their browser for a one-click VideoDraft sign-in (OAuth), no key to copy. Wait for them to confirm it succeeded, then retry the command. This is the preferred path when the user is present.\\n \u2022 HEADLESS / CI (no browser): set `VIDEODRAFT_API_KEY=vd_mcp_...` (a token the user mints at https://app.videodraft.ai/mcp-keys).\\n \u2022 SECURITY: never ask the user to paste a `vd_mcp_...` token into the chat \u2014 use browser `login` or the env var so the token never lands in the transcript.\\n - Every command accepts `--json` (parse this, don\'t scrape text). Exit codes: 0 ok, 1 error, 2 usage, 3 auth (see Auth above), 4 insufficient credits (\u2192 tell the user, don\'t retry).\\n - Tool discovery: start with `videodraft tools list` for the grouped catalog, then narrow with `videodraft tools list --lane assets`, `--lane asset_io`, `--lane project_data`, or `--lane production`.\\n - Asset lane: `videodraft generate ...`, `videodraft edit video|motion`, `videodraft avatar ...`, `videodraft upscale ...`, `videodraft upload`, and `videodraft download`.\\n - Full API access: `videodraft tools schema <name>`, `videodraft call <tool> --args \'<json>\'`.\\n2. **MCP connector**: if VideoDraft MCP tools (e.g. `generate_storyboard_from_idea`) are available, call them directly \u2014 the CLI\'s curated commands map 1:1 onto these tools.\\n3. **Native editor MCP** (`videodraft_editor`): prefer this for project production, timeline assembly, cutting, layouts, transitions, captions, audio placement, and final export. Inside VideoDraft ADE on a supported Mac, Claude and Codex receive it automatically in both Code and VideoDraft modes. It runs headlessly, so an Open Editor click is not required. Start with `project_control` (`list`, `open`, or `create`); standalone asset generation remains in the cloud CLI or MCP.\\n\\nNative editor mutations are revision-guarded. Send them serially and carry forward each result\'s fresh revision. See [references/editor.md](references/editor.md) for project selection, media import, timing units, mutation deltas, verification, export, and the `videodraft-editor` terminal bridge.\\n\\nIf you are reading this skill through `videodraft skills show skill`, run `videodraft skills show editor` before native editor work to load that reference.\\n\\n**VideoDraft ADE routing rule:** the presence of `videodraft_editor` means the native editor is ready, even when no editor window is visible. Use cloud tools to generate or source assets and, when helpful, scripts or storyboards. Do not call hosted `produce_project` / `videodraft produce` or `export_video` / `videodraft export` by default. Import the assets into the native project, assemble there, and call native `export_start`. Use hosted production/export only when the user explicitly asks for the web workflow or the native editor tools are unavailable. Do not silently fall back to hosted production after a native tool error.\\n\\n## First decision: asset, hosted project, or native edit?\\n\\n- **One standalone asset** (image, clip, voiceover, music track, sound effect, dialogue track, voice-changed file, dubbed media file, upscale, or description): generate it directly. Do NOT create a project.\\n - `videodraft generate image \\"a red fox in snow, cinematic\\" --ar 16:9 --download ./out/`\\n - `videodraft generate video \\"slow dolly over a misty lake\\" --model gemini-omni-1.1-flash --duration 6 --download ./out/`\\n- **Any final video, production timeline, existing footage, local `.vdproject`, or hands-on edit**: use `videodraft_editor` when available. List or open the intended local project, or create a native project for a new production. The editor can work without showing its UI.\\n- **A small set of related assets**: still stay in the asset lane. They are grouped automatically (see [AI Studio sessions](#ai-studio-sessions)); give the current group one useful task-specific name with `videodraft sessions name \\"<name>\\"`. Switch to a project only when the deliverable matches the project criteria below or the user asks to attach the assets to one.\\n- **A generated multi-scene video / ad / explainer**: when the editor is available, use hosted tools only for any needed script, storyboard, shot planning, or generated assets; stop before hosted production, import the assets, and build/export the native timeline. A hosted project is optional unless the user wants the web project or its storyboard workflow.\\n- **A hosted web project or hosted export**: use the hosted pipeline only when the user explicitly asks for it or the native editor is unavailable.\\n- **Just a script** (no video asked for): A script-only request creates a script-stage project but stops at the script. Use `videodraft create \\"...\\" --script-only`; do not build a storyboard the user didn\'t ask for.\\n- **Iterating on existing work**: identify the surface first. Use `project_control` with `action:\'list\'` for native projects and `videodraft projects list` only for hosted work. Never create a replacement project just to change an existing one.\\n\\n## Choose the model from the task\\n\\nIf the user names a model, use it when compatible. If it cannot handle the request, explain why and recommend alternatives instead of silently switching. Otherwise inspect the inputs, duration, audio, quality, speed, and cost, check the live catalog, and pass an explicit model.\\n\\n### Seedance 2.x real-person rule\\n\\nSeedance 2.0 and 2.5 require an explicit, higher-priced routing choice for real-person likenesses:\\n\\n- Enable real-person support on the first request when supplied visual input media visibly contains a real identifiable person. This includes a start frame, end frame, reference image, or reference video. Keep the lower-priced Byteplus default for text-only requests, non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. For MCP use `allow_real_people: true`. For the CLI use `--allow-real-people`. Pass the same value to `get_model_costs` or `videodraft costs` so the estimate matches the charge.\\n- The default is false. It uses the lower Byteplus-priced path, and a Byteplus likeness-policy refusal does not fall back to Fal. Enabling the option keeps Byteplus first but permits a submit-time fallback to Fal, which allows real-person likenesses. The request is charged at Fal\'s higher tier-specific rate even if Byteplus serves it.\\n- If a request made without the option fails with code `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the higher rate, follow the user\'s spend-confirmation preference, and retry exactly once with the option enabled. The structured recovery fields are `retryable: true`, `retry_with: { allow_real_people: true }`, `cli_flag: \\"--allow-real-people\\"`, and `retry_policy: \\"once\\"`. CLI `--json` submit errors expose them under `details`; `status` and `wait` include them on the failed job result. Do not treat an unrelated moderation or provider error as that signal.\\n- Do not loop if the option was already enabled. Byteplus can accept a task and reject its generated output later. VideoDraft refunds that failed generation, but the late asynchronous failure cannot be rerouted to Fal. Rephrase the prompt or use different references before trying again.\\n- For hosted AI Production, the same choice applies to every Seedance scene segment. Use `produce_project` with `mode: \\"full_video\\", allow_real_people: true`, or `videodraft produce <project> --mode full_video --allow-real-people`. If an earlier run partially submitted and returns the opt-in code, rerun that same project once with the option. The server reconciles asynchronous results first, preserves running/completed jobs, and resubmits only failed scene-video placeholders carrying the exact opt-in signal. Keep the native-first VideoDraft ADE routing rule above: hosted full-video production is still explicit/fallback-only when the local editor is available.\\n\\nEvery `videodraft models image|video|audio --json` response carries a top-level `recommended` array (best first) and stamps `recommended` / `recommended_for` on each entry. That is the authoritative preference order and it beats this page when they disagree. Preferred today: images `nano-banana-2`, `nano-banana-pro`, `gpt-image-2`; videos `gemini-omni-1.1-flash`, `seedance-2.5`, `seedance-2`, `kling-3.0`, `kling-v3-turbo`, `kling-o3`; video edits `gemini-omni-1.1-flash`; talking heads `veed-fabric`; motion transfer `kling-v3-motion-control`; audio ElevenLabs for anything with a voice and Lyria for instrumental music. Preference applies only when the user did not name a model.\\n\\n**Images:**\\n\\n- `nano-banana-2`: general default, editing, consistency, and references.\\n- `nano-banana-pro`: maximum quality. `nano-banana-2-lite`: fast, inexpensive drafts.\\n- `gpt-image-2`: posters, logos, signs, title cards, readable text, or precise composition/editing.\\n\\n**Videos:**\\n\\n- `gemini-omni-1.1-flash`: general default for 3-10s generation and uploaded source edits up to 10s. It supports first and last frames, up to 10 total image inputs, up to 3 creative reference videos of at most 3 seconds each on `--video-task generate` ONLY, uploaded-video extension, and continuation of an earlier generation through `--previous-interaction-id`. Output is 360p/720p/1080p/4K at 3/10/15/30 cr/s with audio always on. Use `--source-video` for the uploaded edit/extension source; extension sources must be 1-30s. Edit and extend accept EXACTLY ONE input video, so `--ref-video` cannot accompany `--source-video` or `--previous-interaction-id`; only `--ref` images can. One `--ref-video` with no separate source remains a legacy source edit. A previous interaction defaults to conversational edit; add `--video-task extend` or `--extend` with an explicit 3-10s duration to append at the end. A continuation resolves to the prior turn\'s output and is submitted as an ordinary source, so the same limits apply to it: at most 30s to extend, at most 10s to edit. 40 seconds total is reachable, but only by extending from a source of 30s or less, so a ladder dead-ends once it passes 30s. New dialogue can only be added when the SOURCE video is silent; adding speech on top of a source that already contains speech is refused with \\"the model is currently unable to process speech edits\\". The server safely measures creative-reference durations, or you can repeat `--ref-video-duration` when a host blocks metadata probing. Fal BYOK supports its currently callable v1.1 generation and basic-edit endpoints at zero VideoDraft credits, but Fal does not expose continuation/extension or mixed source-edit references as callable endpoints and VideoDraft must never fall back to paid Google.\\n- `grok-imagine-video-1.5`: 1-15s text, first-frame, or 1-7 reference-image generation with native audio. Text/first-frame modes support 480p, 720p, and 1080p; reference mode supports 480p/720p. Cite references as `<IMAGE_0>` through `<IMAGE_6>`. It has no last frame, seed, negative prompt, quality tier, reference video, or reference audio.\\n- `minimax-h3`: 480p/768p/2K/4K (5/6/13/16 cr/s, 768p default), native stereo audio, and 5-15s text, first/last-frame, or mixed-reference generation. Reference mode accepts up to 9 images, 3 videos, and 3 audio clips, with at most 12 files total. Cite them as `Image 1`, `Video 1`, and `Audio 1` in array order.\\n- `minimax-h3-max`: 480p/768p pricing (5/8 cr/s, 768p default), native audio, and 5-15s text or first/last-frame generation. It supports a reproducibility seed, a safety checker, and `disabled` / `balanced` / `quality` prompt expansion. It does not accept reference media.\\n- `wan-3.0`: unified 2-30s text, first/last-frame, or ordered mixed-reference generation at 480p/720p/1080p (7/14/28 cr/s), with optional native audio. Reference mode accepts up to 10 images, 5 videos, and 5 audio clips, at most 20 media files total; video and audio each total at most 15 seconds. `--auto-duration` reserves 30 seconds and reconciles to the provider-reported output length. Document/web references use `--file-url` or `--web-url` and require `--thinking`.\\n- `flux-3`: Black Forest Labs FLUX 3. 5-20s at 720p/1080p with 24fps native audio, from a prompt, a first frame, first + last frames, or up to 10 keyframes pinned to specific moments (`--keyframe shot.png@2.5`, repeatable). `--quality draft` renders the same shot at 720p for roughly a third of the cost \u2014 use it to check blocking before committing. Auto duration is text/first-frame only.\\n- `seedance-2`: 11-15s, video/audio/mixed references, wider ratios, selectable audio, or first/last frames. Use `mini` for cost, `fast` for speed, `standard` for quality or 1080p/4K.\\n- `seedance-2.5`: 4-30s single takes and up to 50 references (30 image, 10 video, 10 audio). Same modes as 2.0, one quality tier, 480p/720p/1080p. Reach for it when a shot must run past 15s or carry more references than 2.0 allows.\\n- `kling-v3-turbo`: fast polished 3-15s with first frame, multi-prompt, and audio, but no elements. `kling-o3`: reference images plus structured image/video elements, first/last frames, multi-prompt, audio control, or 4K. O3 allows 7 combined image references and image-backed elements, reduced to 4 combined items when a video-backed element is present. `kling-3.0`: image-to-video can use structured image/video elements and bind a custom Kling voice ID to either element form. Kling 2.6 Pro uses top-level voice IDs cited as `<<<voice_1>>>` and `<<<voice_2>>>`.\\n- Existing-video edits use `videodraft edit video`, not generic generation. `gemini-omni-1.1-flash` is the preferred edit model and is chosen automatically when you omit `--model`: source up to 10s, up to 10 reference images, 360p/720p/1080p/4K with audio. Creative `--ref-video` inputs are NOT accepted on an edit, because an edit takes exactly one input video; use `generate video --video-task generate` to guide a new clip with video references instead. Omitting `--model` on a longer or unmeasurable source spends nothing and prints a priced menu (what each model edits, what it drops, what it costs) so you can put the choice to the user. **Truncation:** only Gemini refuses an over-length source. Happy Horse silently edits just the first 15s, Kling O3 the first 10s, and Grok the first 8s. The command warns you when that will happen; always relay it to the user. Gemini regenerates the audio track, so use Happy Horse or Kling O3 with `--preserve-audio` when the source audio must survive. Choose Grok for the cheapest prompt-only edit, Happy Horse for up to 5 image references, or Kling O3 for controlled reference-image edits.\\n- To edit a source longer than 10s without losing its tail, cut it into <=10s pieces in the native editor, edit each with Gemini, and reassemble. VideoDraft has no server-side split/concat, so this path needs `videodraft_editor`.\\n- Kling O3 also has a reference-generation mode. Use `videodraft generate video --model kling-o3-video-ref-edit` with exactly one `--ref-video` to generate a new guided clip; use `videodraft edit video` when changing the source itself. Use Wan 3.0 for new mixed-reference generation, not source-video editing.\\n- Motion transfer uses `videodraft edit motion` with Kling V3 by default, or Kling 2.6 when explicitly requested or lower cost matters. It requires a subject image and a motion-reference video.\\n- Use Veo 3.1 when explicitly requested or as a fallback.\\n\\n**Audio and utilities:**\\n\\n- Use Seed Audio 1.0 for open-ended text-to-audio, speech/music/sound synthesis, voice conditioning, or prompt-driven editing with up to three audio references or one image. Use `videodraft generate audio`. Reference clips are `@Audio1`, `@Audio2`, and `@Audio3` in array order. There is no duration input. Output is up to two minutes and settles at 19 credits per actual minute, with up to 38 credits reserved during generation. The CLI automatically retries transient responses with one operation key. To recover after the CLI process itself is interrupted, set `--idempotency-key <uuid>` on the original command and reuse it.\\n- Prefer ElevenLabs for voiceover, dialogue, voice changing, dubbing, and sound effects. Honor an explicitly selected supported TTS voice/provider. Use Lyria for instrumental music and ElevenLabs Music for vocals, lyrics, or exact timing.\\n- A character who needs to TALK, when you have an image of them, splits by FRAMING:\\n - **Talking to camera** (presenter, spokesperson, explainer): the avatar lane, and VEED Fabric is preferred. Use managed `avatar create` then `avatar render` for a reusable avatar record with bundled speech, `avatar fabric` for a one-off portrait plus text or existing audio, and `avatar lipsync` when both the source video and replacement audio already exist.\\n - **Speaking inside a scene** (real blocking, framing, camera movement): not Fabric. It animates a portrait facing the lens, so a cinematic request comes back as a head-on talking headshot. Use `generate video` with `kling-2.6-pro` (one or two voices cited as `<<<voice_1>>>` / `<<<voice_2>>>`), `kling-3.0` (a voice bound per element, so several characters can speak in one shot), or `happy-horse` (strong character identity from a frontal image, native audio, multilingual lip-sync).\\n- Enhancement: use Topaz image/video upscaling only when the content is already correct. Use image 1x for cleanup, 2x by default, 4x when justified; use video 2x by default. Edit or regenerate creative errors.\\n\\nSee [references/models.md](references/models.md) for the detailed routing table and exact capability limits.\\n\\n## Prefer references when continuity matters\\n\\nPure text-to-image or text-to-video is fine for a generic one-off asset. When a specific character, product, location, style, composition, or brand identity must survive generation, use references instead of hoping the prompt recreates it.\\n\\n- If the user supplies reference media, preserve and pass it. Never reduce the request to text alone.\\n- When continuity matters, generate/select a strong still first with the selected image model (`nano-banana-2` by default), wait for its URL, then animate it as a start frame/reference. Confirm the combined image and video cost.\\n- When using a hosted storyboard stage for multiple shots, use `videodraft shots <project_id> --model <selected-image-model> --grid`, then animate the decoded shots. Preserve explicit models. In VideoDraft ADE, import the resulting assets into the native editor instead of continuing into hosted production. A requested non-Seedance video model must use manual per-shot generation instead of Seedance full-video mode.\\n\\n## Cost and credits\\n\\nDo not call `videodraft credits` before routine generations. Paid endpoints validate and deduct atomically; if the balance is insufficient, the request is rejected before the provider job starts (CLI exit code 4). Check the balance only when the user asks, gives a credit budget, or a large workflow needs budget planning.\\n\\nFor expensive work, estimate with `--estimate` or `videodraft costs`, state the selected model/settings/cost, and get a go-ahead. This matters most for shot-image batches, long or high-resolution video, AI Production, and paid audio batches. Honor the user\'s confirmation preference for the session.\\n\\nKling voice creation costs 1 VideoDraft credit on the platform Fal account and 0 credits with Fal BYOK. Preview it with `videodraft kling-voices create <sample> --name <name> --estimate`; the estimate does not create a voice or require consent confirmation. Actual creation requires `--confirm-consent`.\\n\\nMiniMax H3 costs 5 / 6 / 13 / 16 credits per output second at 480p / 768p / 2K / 4K (768p by default). In reference mode the first 5 images are included and each additional image costs 8 credits. Reference video and reference audio are NOT billed.\\n\\nMiniMax H3 Max costs 5 credits per output second at 480p and 8 credits per second at 768p (default). Use `--prompt-expansion-mode disabled|balanced|quality`; balanced is the default. The safety checker defaults on and can be set explicitly with `--safety-checker true|false`.\\n\\nWan 3.0 costs 7 / 14 / 28 credits per output second at 480p / 720p / 1080p. Auto duration reserves the 30-second maximum and refunds the unused reserve after the provider reports the actual whole-second output length. Fal BYOK runs on the connected user key and charges zero VideoDraft credits.\\n\\nGrok Imagine Video 1.5 costs 8 credits per output second at 480p, 14 at 720p, or 25 at 1080p, plus 1 credit for each first-frame or reference image. Native audio is always generated.\\n\\n`videodraft models image|video` lists the live image and video catalogs with supported inputs. Video entries are grouped as `generation`, `video_edit`, `motion_control`, `avatar_lipsync`, and `upscale`, and each reports the exact tool. Use `videodraft models video --category video_edit` to narrow the list. `videodraft models audio` lists Seed Audio, Google Lyria, and ElevenLabs audio/media tools, while `videodraft models voices` lists TTS voices. Consult them instead of guessing capabilities.\\n\\n## Async jobs\\n\\nImage/video generation is asynchronous: commands submit a job and **wait by default**, printing output URLs (and saving files with `--download`). Large downloaded images also get a downscaled copy in `previews/` next to them (the `preview` field / \\"inspect via preview\\" line in the output) \u2014 **look at the preview, deliver the original**; viewing full-resolution images bloats the chat permanently. In scripts/CI prefer explicit control:\\n\\n```bash\\nJOB=$(videodraft generate image \\"...\\" --no-wait --json | jq -r .job_id)\\nvideodraft wait \\"$JOB\\" --download \\"./outputs/{job_id}_{index}.{ext}\\" --json\\n```\\n\\nFor MANY jobs: submit each with `--no-wait`, collect ALL with one command \u2014 `videodraft wait <id1> <id2> ...` polls every job from one process with one batched request per tick. Do NOT spawn parallel `wait`/`generate --wait` processes for a batch.\\n\\nIf a wait times out, the job is still running server-side \u2014 `videodraft status <job_id>` later. Never re-submit just because a wait timed out (that double-spends credits).\\n\\nFor completed Wan 3.0 jobs, MCP `check_generation_status` and CLI `status`/`wait --json` include `outputMetadata` with Fal\'s returned `seed`, `duration`, and `actual_prompt` when present.\\n\\n## AI Studio sessions\\n\\nEvery standalone (project-less) generation is filed into an AI Studio session in the web app. You do not have to create one:\\n\\n- **MCP hosts** (Claude Code, claude.ai, Codex, VideoDraft ADE): the server mints an `Mcp-Session-Id` on `initialize`; your host echoes it, and this conversation\'s generations land in their own session. Tool results echo it as `ai_studio_session_id`.\\n- **CLI**: the same handshake runs once per (profile, server, working directory) and is cached for 12 idle hours, so everything generated from one directory shares one session. `videodraft sessions current` shows it; `videodraft sessions reset` starts a new one.\\n- Project generations (`--project <id>` / `project_id`) always go to that project\'s session.\\n\\nOnce you understand the creative task, name the current automatic session before the first standalone generation:\\n\\n```bash\\nvideodraft sessions name \\"Purple Seal Rescue Short\\"\\n```\\n\\nChoose a concise, specific 3-6 word title for the intended work. Do not copy the client name, date, or exact chat title. Name it once: the operation creates the session with that title. If generation, a user, or an earlier agent created the session first, its existing name is preserved.\\n\\nPass `--session <id>` / `session_id` only to **continue earlier work** or create an explicit separate group:\\n\\n```bash\\nSESSION=$(videodraft sessions create \\"Fox brand explorations\\" --json | jq -r \'.session.id\')\\nvideodraft generate image \\"a red fox in snow, cinematic\\" --session \\"$SESSION\\"\\nvideodraft generations --session \\"$SESSION\\" # what is in it\\nvideodraft sessions list --name fox # find it again later\\n```\\n\\n`VIDEODRAFT_SESSION=<id>` sets the default for every command (ignored when `--project` is given). While it is set, `sessions name` refuses to run because that command names the current automatic connection session, not the pinned override; unset it first or rename the pinned session in AI Studio. `VIDEODRAFT_SESSION_SCOPE=<label>` groups several directories into one connection session; `VIDEODRAFT_CLIENT_NAME=<host>` labels the fallback placeholder used when generation creates the session before `sessions name`; `VIDEODRAFT_NO_SESSION=1` disables the handshake. Generations that reach the server with no session at all fall back to the account-wide \\"Agent (MCP)\\" session; if you see work landing there, pass `--session` explicitly.\\n\\n## Generation history\\n\\nPast work is queryable \u2014 reuse a previous setup instead of guessing. `videodraft generations` lists recent generations; scope with `--session <id>` or `--project <id>` (includes collaborators\' rows in shared scopes; pass one, project wins), and filter with `--type`, `--model`, `--favorites`. `--full --json` returns each row\'s exact parameters (aspect ratio, resolution, duration, references) \u2014 the human table stays compact, so pair `--full` with `--json`. `videodraft generation <id>` prints one generation\'s complete recipe (prompt, input image, parameters, outputs); `--favorite` / `--unfavorite` stars it. `videodraft sessions list` shows AI Studio sessions (owned + shared) with `--name` search \u2014 take a session id from there to read its history.\\n\\n## Local files and reference images\\n\\nReference inputs must be public URLs. The CLI uploads local files automatically wherever a URL is expected (`--ref photo.jpg`, `--start-image frame.png`), or explicitly:\\n\\n```bash\\nURL=$(videodraft upload ./product.png --json | jq -r .url)\\n```\\n\\nNever silently drop a reference you couldn\'t upload \u2014 stop and tell the user. Never upload a user\'s file to a third-party host.\\n\\nWhen the user attaches media for a native production, import actual footage into the editor by default. For hosted generation/storyboarding, classify each item before acting: a recurring **visual asset** (character/product/location/style), actual **footage to place as shots**, or **inspiration only**. See [references/pipeline.md](references/pipeline.md) for the hosted role mapping.\\n\\n## Showing media to the user\\n\\nGenerated media is **not** displayed in the chat automatically \u2014 you decide what to show. To preview an asset inline, save it locally (use `--download` so it lands under `media/`) and reference its **local path** as a Markdown link with a **leading `./`**:\\n\\n```\\n[ferrari shot](./media/ferrari_01.png) \u2190 image card\\n[the clip](./media/clip.mp4) \u2190 video player\\n[voiceover](./media/vo.mp3) \u2190 audio player\\n```\\n\\nPut the Markdown link **in your message text** \u2014 video and audio embed exactly like images. Do **not** use `SendUserFile` (or other file-send tools) to display media: that renders inside a collapsible tool card and gets buried in the tool list. The Markdown link in your prose is what produces the inline card.\\n\\nUse the path you saved to: a **workspace-relative** path (`./media/clip.mp4`, or `./<any-folder>/clip.mp4` \u2014 any folder in the workspace works), or the **absolute** path for a file outside the workspace (e.g. `/Users/you/Desktop/clip.mp4` or another workspace\'s path). Both render. Show the finished results worth showing (and only those \u2014 not every intermediate job). A bare CDN URL or a JSON dump of output URLs does **not** render; the local-path Markdown link is what produces an inline card.\\n\\n## Native-first VideoDraft ADE pipeline (idea \u2192 MP4)\\n\\nWhen `videodraft_editor` is present:\\n\\n1. Generate or source the script, storyboard, shot images, clips, voiceovers, music, and other assets through the cloud CLI/MCP as needed.\\n2. Call native `project_control` to open or create the `.vdproject`.\\n3. Call native `media_import`, wait for imports to become ready, then assemble and refine the timeline with editor tools.\\n4. Call native `export_start` and use `export_status` for progress and results.\\n\\nDo not run the hosted production or export steps in this path unless the user explicitly asks for a web production.\\n\\n## Hosted fallback pipeline (idea \u2192 MP4)\\n\\nUse this only when there is NO native editor at all, or the user explicitly requests the hosted web\\nworkflow. The native surface is not only the injected `videodraft_editor` MCP: a `videodraft-editor`\\nexecutable on PATH is the same editor reached through its terminal bridge, and\\n[references/editor.md](references/editor.md) covers driving it that way. Treating a missing MCP as\\n\\"no editor\\" sends sessions that have the binary into hosted production for no reason.\\n\\n```bash\\nvideodraft create \\"<idea>\\" --ar 9:16 # project: script \u2192 visual assets \u2192 storyboard\\nvideodraft shots <project_id> --grid --estimate # cost preview, confirm with user\\nvideodraft shots <project_id> --grid # batch shot images (waits, writes onto shot cards)\\nvideodraft produce <project_id> # voiceovers + captions + production timeline\\nvideodraft export <project_id> --download final.mp4\\n```\\n\\nOptional between produce and export: per-shot motion clips (`videodraft generate video ... --project <id>` then place it with `videodraft attach <project> --scene N --shot M --media <url|file> --type video --duration <s>`), music (`videodraft generate music \\"...\\" --attach <project_id>`), and standalone audio assets (`generate audio`, `generate sound-effect`, `generate dialogue`, `generate voice-changer`, `generate dub`). Details, per-step tools and editing rules: [references/pipeline.md](references/pipeline.md).\\n\\n## Avatar and talking-head videos (both surfaces)\\n\\nAvatar generation is cloud-only \u2014 the native editor has no avatar or lipsync tools \u2014 so this applies whether or not `videodraft_editor` is present. Generate the avatar in the cloud; in VideoDraft ADE, import the rendered clip and cut it on the native timeline like any other footage.\\n\\nAvatar/talking-head videos use dedicated commands. For a reusable managed avatar, obtain or generate a clear portrait \u2192 `videodraft avatar script` when needed \u2192 `videodraft avatar create` \u2192 `videodraft avatar render --resolution 720p`. For a one-off portrait, use `videodraft avatar fabric <portrait> --text \\"...\\"` or `--audio <file>`. For an existing video plus replacement audio, use `videodraft avatar lipsync <video> --audio <file>`. Managed script/creation is bundled/free; direct Fabric, Sync, the managed Fabric render, and optional portrait generation/upscaling are paid. Confirm expensive steps first.\\n\\n## Working with hosted project data\\n\\nA hosted project is one JSON blob (script, storyboard scenes, shot cards, visual assets, production timeline). To inspect: `videodraft projects get <id>`. To edit: fetch `--raw`, modify, then `videodraft call update_project` \u2014 objects deep-merge, **arrays replace wholesale** (send the complete `storyboard.scenes` array to change one scene). Snapshot first with `videodraft checkpoint create <id>` before risky edits. Schema reference: `videodraft call get_project_schema`. This does not replace native editor tools when `videodraft_editor` is available for the production itself.\\n\\n## More\\n\\n- [references/pipeline.md](references/pipeline.md) \u2014 hosted fallback data model and production workflow\\n- [references/editor.md](references/editor.md) \u2014 native headless editor routing, project selection, import, timeline edits, verification, and export\\n- [references/models.md](references/models.md) \u2014 choosing image/video models, pricing patterns, voices and styles\\n- [references/examples.md](references/examples.md) \u2014 recipes: batch product videos from a CSV, talking-head from a script, changelog video in CI\\n","references/editor.md":"# Native VideoDraft Editor reference\\n\\nUse this reference when the user wants to assemble, cut, caption, mix, lay out, inspect, or export a local VideoDraft Editor project. The native editor is deterministic and local. Cloud generation remains in the `videodraft` CLI or hosted MCP.\\n\\n## VideoDraft ADE preference rule\\n\\nWhen `videodraft_editor` tools are exposed, treat the native editor as available and make it the default surface for production, timeline assembly, and final export. It is headless by design, so a hidden window or an untouched Open Editor button does not justify using hosted production instead.\\n\\nUse cloud tools for asset generation and optional script/storyboard work, then import the results. Do not call hosted `produce_project` / `videodraft produce` or `export_video` / `videodraft export` unless the user explicitly requests an editable web production or the native editor tools are unavailable. If a native tool call fails after the editor was available, report or recover that native failure rather than silently switching surfaces.\\n\\n## Choose the correct surface\\n\\n- `videodraft` and the hosted VideoDraft MCP generate assets and can manage hosted web projects. They use the user\'s VideoDraft account and credits. In VideoDraft ADE, use them mainly as the source of generated media and optional storyboards for the native production.\\n- `videodraft_editor` edits local `.vdproject` packages. It has no generation, account, model, or credit tools.\\n- Inside VideoDraft ADE on a supported Mac, the editor MCP is injected automatically for Claude and Codex in both Code and VideoDraft modes. It starts headlessly before the chat opens. The user does not need to click Open Editor, and closing or hiding the editor window does not stop headless editing.\\n- Outside that environment, use the editor only if `videodraft_editor` MCP tools are already exposed or the `videodraft-editor` executable is on PATH. Do not confuse the public `videodraft` cloud CLI with the separate native editor executable.\\n\\nPrefer the direct MCP tools when they are available. The terminal bridge is useful for scripts, diagnostics, or an agent session where the MCP was not injected.\\n\\n## Start with the intended project\\n\\nAn MCP session can begin without a project selected. Project selection belongs to the session, not to whichever editor window happens to be frontmost.\\n\\n1. If the user named an existing project but its identity is unclear, call `project_control` with `action:\'list\'`.\\n2. Open the exact project by the returned `id`, unambiguous `name`, or `.vdproject` `path`.\\n3. Create only when the user wants a new local edit. `action:\'create\'` accepts optional `name`, `fps`, `aspectRatio`, and `quality`.\\n4. Treat `isActive` as this MCP session\'s target and `isVisible` as the project shown in the UI. Headless editing only needs the session target.\\n5. Use `action:\'close\'` only when closing is part of the task. It saves first and never deletes the project.\\n\\nDo not substitute a hosted project ID for a native project. A hosted project can supply scripts, storyboards, and generated media, but the native edit is a separate `.vdproject` package.\\n\\n## Keep a reliable editing model\\n\\n- Call `timeline_read` once after opening or creating a project, after switching timelines, or after an out-of-band user edit. It returns the revision and current clip/track state.\\n- Call `media_list` before using a `mediaRef`. Poll imports with a filtered read (`ids` for a known asset, `pending:true` for a batch) instead of repeatedly loading the full library.\\n- Timeline placement uses project frames. Source spans, media durations, transcript segments, and search hits use seconds. Pass those values to the relevant tools as returned; do not multiply by fps yourself.\\n- IDs are short stable prefixes. Pass them back exactly as returned. Tracks use stable `trackId` values; indexes can change.\\n- Send project mutations serially. Pass `ifRevision` from the latest read or mutation when available, then replace it with the fresh revision from the next result. Parallel edits against one project can race or invalidate each other\'s revision.\\n- Every mutation returns a delta in `timeline_read` vocabulary. Patch your working model from that delta instead of re-reading after every successful call. Re-read after a stale-state failure or an out-of-band change.\\n- Use `canvas_arrange` for split screens, picture-in-picture, grids, and canvas placement. Use `tracks_edit` to fix stacking. Do not synthesize layouts from generic transforms or keyframes.\\n- Use `media_view` before describing source content, and `transcript_read` to locate a spoken moment. Use `timeline_view` to verify the composited result the viewer will actually see.\\n- Volume inputs, including volume keyframes, are linear values from `0` to `1`. Timeline reads return the same linear scale.\\n\\n## Bring generated or local media into the editor\\n\\nUse cloud generation for new assets, save or download the outputs, then call native `media_import`:\\n\\n- `source.path`: absolute local file or directory. A directory imports recursively and preserves its folder structure.\\n- `source.url`: HTTPS asset URL. Set `mimeType` when a signed URL has no usable extension.\\n- `source.bytes`: small base64 media with a required `mimeType`.\\n- `source.matte`: generated solid-color image.\\n\\nReadiness differs by source, and so does the poll that detects it:\\n\\n- **URL and single-file path** imports return `status:\'downloading\'` with one `mediaRef`. Poll `media_list` with `ids:[mediaRef]` until `generationStatus` is absent.\\n- **Directory** imports also return `status:\'downloading\'` with one placeholder `mediaRef` for the batch. Poll `media_list` with `ids:[mediaRef]` until `generationStatus` clears; the folder\'s assets then appear. (`pending:true` remains a fallback that lists every unresolved import.)\\n- **Inline bytes and matte** imports finish inline and come back `status:\'ready\'`; no polling needed.\\n\\nNever place a pending asset on the timeline. `generationStatus` is the signal: `preparing` and\\n`downloading` mean keep polling, absent means usable, and **`failed` is terminal** \u2014 report it or\\nretry the import explicitly, never poll on. Do not treat \\"not downloading\\" as ready.\\n\\nFor a batch of local outputs, download them into one workspace directory and import that directory once when practical. This is safer and faster than racing many import calls; poll the batch\'s placeholder `mediaRef` with `ids` to know when it is usable.\\n\\n## Edit and verify\\n\\nUse the tool descriptions as the exact schema. A dependable sequence is:\\n\\n1. `project_control` to select or create the local project.\\n2. `timeline_read` and `media_list` to establish current state.\\n3. `media_view` when content selection matters.\\n4. Serialized clip, track, layout, text, caption, audio, color, effect, or cut mutations using the current revision.\\n5. `timeline_view` when visual composition or layer order matters.\\n6. `undo` if the requested result is wrong and the next mutation would not cleanly correct it.\\n\\nEdits are undoable. Do not ask for confirmation before each ordinary edit. Ask one focused question only when the user\'s creative direction is materially ambiguous.\\n\\n## Export\\n\\n`export_start` queues work in the background and returns a `jobId`, destination, and `started` or `queued` status.\\n\\n- Use `video` for H.264, H.265, or ProRes.\\n- Use `xml` for Premiere Pro.\\n- Use `xml` (XMEML) for Premiere Pro **and DaVinci Resolve** \u2014 Resolve reads XMEML natively.\\n Use `fcpxml` only for Final Cut Pro. Sending Resolve an FCPXML produces a package it cannot\\n open cleanly, so the target matters more than the file extension suggests.\\n- Use `videodraft` for a self-contained project package.\\n- Omit `outputPath` unless the user named a destination; the default is `~/Downloads`.\\n- Use `export_status` to list progress, warnings, and results. Cancel only when the user asks or the just-queued settings were wrong. Do not infer that an export is stuck from elapsed time alone.\\n\\n## Terminal bridge\\n\\nVideoDraft desktop terminals expose `videodraft-editor`, which controls the same process and MCP surface:\\n\\n```bash\\nvideodraft-editor status\\nvideodraft-editor list-tools\\nvideodraft-editor tool project_control --json \'{\\"action\\":\\"list\\"}\'\\nvideodraft-editor tool timeline_read --project \\"/path/to/My Video.vdproject\\" --json \'{}\'\\nvideodraft-editor show\\nvideodraft-editor hide\\n```\\n\\nEach `videodraft-editor` invocation is a separate connection, so a project selected by one call (e.g. `project_control` `action:\'open\'`) is NOT remembered by the next. Pass `--project <path>` on every `tool` call that operates on a project \u2014 without it, a follow-up call like `timeline_read` reports \\"No editor is available\\" even though the open succeeded.\\n\\nControl and tool commands auto-start a headless editor if none is running. `show` only reveals the already-running UI. Use `videodraft-editor tool <name> --json -` to read a JSON object from stdin when shell quoting would be fragile. Never read, copy, or expose the editor\'s rotating local authentication secret.\\n","references/examples.md":"# Recipes\\n\\nWorking patterns for common asks. All assume auth (`videodraft login` once, or `VIDEODRAFT_API_KEY` in the environment) and use `--json` for parsing.\\n\\nInside VideoDraft ADE, if a native editor is available, use these recipes for asset generation and\\noptional script/storyboard stages. Hand the results to the editor for production and export ONLY\\nwhen the deliverable the user asked for is a composed production. A standalone output \u2014 the batch\\nproduct clips in recipe 1, the upscale in recipe 7 \u2014 is finished when it is generated; importing it\\ninto a project and exporting a timeline builds an edit nobody asked for. Recipes below that call `videodraft produce` or `videodraft export` are hosted fallbacks only. Do not choose them over the available native editor unless the user explicitly asks for the hosted web workflow.\\n\\n## 1. Batch product videos from a CSV\\n\\nOne 9:16 product clip per row of `products.csv` (`name,image_url,tagline`):\\n\\n```bash\\n#!/usr/bin/env bash\\nset -euo pipefail\\nmkdir -p outputs\\n\\nwhile IFS=, read -r name image tagline; do\\n job=$(videodraft generate video \\\\\\n \\"Premium product shot of ${name}: ${tagline}. Slow orbit, studio lighting.\\" \\\\\\n --model gemini-omni-1.1-flash --ar 9:16 --duration 6 \\\\\\n --start-image \\"$image\\" \\\\\\n --no-wait --json | jq -r .job_id)\\n echo \\"$name,$job\\" >> outputs/jobs.csv\\ndone < <(tail -n +2 products.csv)\\n\\n# Collect ALL results with ONE process (batched polling \u2014 one request per tick)\\nvideodraft wait $(cut -d, -f2 outputs/jobs.csv) \\\\\\n --download \\"outputs/{job_id}_{index}.{ext}\\" --json > outputs/results.json\\n# map job ids back to product names via outputs/jobs.csv\\n```\\n\\nSubmit-then-collect parallelizes server-side generation; the single multi-id `wait` keeps it to one local process and one batched poll request per tick no matter how many jobs. Gemini Omni 1.1 Flash is selected because these are six-second first-frame product clips. Estimate first: `videodraft costs gemini-omni-1.1-flash --type video --duration 6 --resolution 720p --audio` \xD7 rows, and confirm with the user.\\n\\nExtend an uploaded clip or conversationally edit an official Google interaction with Gemini Omni 1.1 Flash:\\n\\nEach extension appends 3-10 seconds at the end. Edit and extend accept EXACTLY ONE input video, so `--ref-video` cannot accompany `--source-video` or `--previous-interaction-id`; only `--ref` images can. New dialogue is allowed only when the source video is silent, so a chain of spoken beats must carry its speech in the first turn. A continuation is submitted as the prior turn\'s output, so 40 seconds total is reachable only by extending from a source of 30s or less, and a ladder dead-ends past 30s.\\n\\n```bash\\n# Uploaded-video extension. Reference IMAGES are fine here; reference videos are not.\\nvideodraft generate video --model gemini-omni-1.1-flash \\\\\\n --source-video ./ending.mp4 --ref ./wardrobe.png \\\\\\n --extend --duration 6 --resolution 1080p \\\\\\n --download ./media/extended.mp4\\n\\n# Conversational edit from the interaction_id of an earlier generation. Add --extend to lengthen instead.\\nvideodraft generate video --model gemini-omni-1.1-flash \\\\\\n --previous-interaction-id \\"$INTERACTION_ID\\" \\\\\\n --resolution 720p \\\\\\n --download ./media/continued.mp4\\n```\\n\\nFal BYOK supports the currently callable Gemini Omni 1.1 generation and basic source-edit endpoints at zero VideoDraft credits. Its published callable v1.1 endpoints do not expose continuation, extension, or separate creative references on a source edit. Do not infer a Fal route or retry on paid Google while Fal BYOK is active.\\n\\n## 2. Hosted full marketing video from one idea (fallback)\\n\\n```bash\\nvideodraft create \\"30-second launch video for Solace, a sleep-tracking ring. Calm, premium, dark palette.\\" \\\\\\n --ar 9:16 --style cinematic --json > project.json\\nPROJECT=$(jq -r .project_id project.json)\\n\\nvideodraft shots \\"$PROJECT\\" --grid --estimate # show the user the cost; get a go-ahead\\nvideodraft shots \\"$PROJECT\\" --grid\\nvideodraft produce \\"$PROJECT\\"\\nvideodraft generate music \\"minimal ambient, warm pads, 60 BPM\\" --attach \\"$PROJECT\\"\\nvideodraft generate audio \\"Extend @Audio1 into a 20-second transition\\" --ref-audio ./intro.wav --format wav --download ./transition.wav\\nvideodraft export \\"$PROJECT\\" --download solace-launch.mp4\\n```\\n\\nUse this complete hosted path only when the user requested a web project or the native editor is unavailable. Otherwise stop after the storyboard/assets, import them into the native `.vdproject`, and export with `export_start`. The hosted project stays editable at the URL in `project.json` (`.urls`).\\n\\n## 3. Talking-head (avatar) video\\n\\nWhen the user has no portrait, generate a clear front-facing avatar image first. Skip this step when they supplied one or an existing character should be reused.\\n\\n```bash\\nvideodraft generate image \\\\\\n \\"Front-facing head-and-shoulders portrait of a friendly coffee expert, direct eye contact, natural expression, clean studio background\\" \\\\\\n --model nano-banana-2 --ar 9:16 --download ./media/avatar.png\\n\\nSCRIPT=$(videodraft avatar script \\"why our espresso subscription saves you money\\" --style ad-style --json | jq -r .script)\\nAVATAR=$(videodraft avatar create ./media/avatar.png --script \\"$SCRIPT\\" --voice elevenlabs-kPzsL2i3teMYv0FxEYQ6 --ar 9:16 --json | jq -r .avatar_video_id)\\nvideodraft avatar render \\"$AVATAR\\" --resolution 720p # VEED Fabric paid step; confirm cost first (~20 credits/sec)\\n```\\n\\n`avatar script` and `avatar create` (including speech) are bundled/free. In this example only the optional portrait generation and Fabric render spend credits.\\n\\nIf the portrait is low resolution, enhance it before `avatar create`:\\n\\n```bash\\nvideodraft upscale image ./founder-small.jpg --scale 2x --download ./media/founder-upscaled.png\\n```\\n\\nFor a one-off portrait animation without creating a managed avatar record:\\n\\n```bash\\nvideodraft avatar fabric ./founder.jpg \\\\\\n --text \\"Welcome to the weekly product update.\\" \\\\\\n --voice-description \\"warm, confident American presenter\\" \\\\\\n --resolution 720p --download ./media/presenter.mp4\\n```\\n\\nWhen the user already has both the video and replacement speech:\\n\\n```bash\\nvideodraft avatar lipsync ./presenter.mp4 \\\\\\n --audio ./localized-voiceover.mp3 \\\\\\n --sync-mode loop --download ./media/presenter-localized.mp4\\n```\\n\\nEdit an existing video with a dedicated edit model:\\n\\n```bash\\nvideodraft models video --category video_edit\\nvideodraft edit video ./product-demo.mp4 \\\\\\n \\"Preserve the product but follow the reference camera rhythm\\" \\\\\\n --model gemini-omni-1.1-flash --ref-video ./camera-rhythm.mp4 \\\\\\n --ref-video-duration 2.5 --resolution 1080p \\\\\\n --download ./media/product-demo-reframed.mp4\\n\\nvideodraft edit video ./product-demo.mp4 \\\\\\n \\"Turn the room into a warm evening scene while preserving the product and camera motion\\" \\\\\\n --model kling-o3-video-ref-edit --ref ./evening-style.jpg \\\\\\n --preserve-audio --download ./media/product-demo-evening.mp4\\n```\\n\\nTransfer motion from a reference clip onto a character image:\\n\\n```bash\\nvideodraft edit motion ./character.png \\\\\\n \\"Apply the dancer\'s movement to this character while preserving identity\\" \\\\\\n --motion-video ./dance-reference.mp4 \\\\\\n --model kling-v3-motion-control --quality pro \\\\\\n --download ./media/character-dance.mp4\\n```\\n\\n## 4. Hosted changelog video in CI\\n\\nIn a GitHub Action with `VIDEODRAFT_API_KEY` set as a secret:\\n\\n```bash\\nNOTES=$(git log --oneline v1.2.0..HEAD | head -20)\\nvideodraft create \\"Weekly product update video. Energetic, 20 seconds. Changes: ${NOTES}\\" --ar 16:9 --json > p.json\\nPROJECT=$(jq -r .project_id p.json)\\nvideodraft shots \\"$PROJECT\\" && videodraft produce \\"$PROJECT\\"\\nvideodraft export \\"$PROJECT\\" --download changelog.mp4 --wait-timeout 30m\\n```\\n\\n## 5. Variations and picking a winner\\n\\n```bash\\nvideodraft generate image \\"logo concept: minimalist fox, geometric\\" --num 4 --download \\"./concepts/{job_id}_{index}.{ext}\\" --json\\n# Show all 4 to the user; regenerate the chosen one at higher res:\\nvideodraft generate image \\"<same prompt>\\" --model nano-banana-pro --resolution 4K\\n```\\n\\n## 6. Reaching tools without a curated command\\n\\n```bash\\nvideodraft tools list --json | jq -r \'.[].name\'\\nvideodraft tools schema attach_media_to_shot --json\\nvideodraft call attach_media_to_shot --args \'{\\"project_id\\":\\"...\\",\\"scene_index\\":0,\\"shot_index\\":1,\\"media_url\\":\\"https://...\\",\\"media_type\\":\\"video\\",\\"duration_seconds\\":6}\'\\n```\\n\\nAnything the hosted VideoDraft MCP exposes, including character studio, product studio, and hosted project data, is reachable this way even before it gets a curated command. Native `.vdproject` editing uses the separate `videodraft_editor` MCP described in SKILL.md.\\n\\n## 7. Enhance an existing asset without changing it\\n\\n```bash\\n# Light image cleanup, no enlargement\\nvideodraft upscale image ./poster.png --scale 1x --download ./media/poster-enhanced.png\\n\\n# General image and video enlargement\\nvideodraft upscale image ./frame.png --scale 2x --download ./media/frame-2x.png\\nvideodraft upscale video ./clip.mp4 --scale 2x --download ./media/clip-2x.mp4\\n```\\n\\nUse these when the content is correct and only quality or resolution needs improvement. If the poster text, composition, subject, or motion is wrong, edit or regenerate instead.\\n","references/models.md":"# Choosing models (and predicting cost)\\n\\nAlways consult the live catalog instead of memorizing this page \u2014 models change weekly:\\n\\n```bash\\nvideodraft models image --json # every image model + inputs (aspect ratios, resolutions, max refs)\\nvideodraft models video --json # every video model + inputs + per-second pricing metadata\\nvideodraft models audio --json # standalone audio/media models + pricing inputs\\nvideodraft models voices --json # TTS voices\\nvideodraft models styles --json # visual style presets\\n```\\n\\n## Task-based model selection\\n\\nHonor an explicitly named model when it supports the request. Otherwise choose from the task\'s inputs, duration, audio, quality, speed, and cost. Pass the chosen model explicitly instead of relying on a blind platform fallback.\\n\\nThe catalogs carry the preference order themselves: every `videodraft models image|video|audio --json` response has a top-level `recommended` array (best first) plus `recommended` / `recommended_for` on each entry. Trust that over this page. Preferred today: images `nano-banana-2`, `nano-banana-pro`, `gpt-image-2`; videos `gemini-omni-1.1-flash`, `seedance-2.5`, `seedance-2`, `kling-3.0`, `kling-v3-turbo`, `kling-o3`; video edits `gemini-omni-1.1-flash`; talking heads `veed-fabric`; motion transfer `kling-v3-motion-control`; audio ElevenLabs for voice work and Lyria for instrumental music.\\n\\n### Images\\n\\n| Need | Choose | Why |\\n| -------------------------------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------- |\\n| Most generation, editing, character consistency, or reference work | `nano-banana-2` | Best general default; 1K/2K/4K and up to 14 reference images |\\n| Highest-quality complex generation or reasoning | `nano-banana-pro` | Premium Nano Banana quality and reasoning |\\n| Fast, inexpensive drafts and iteration | `nano-banana-2-lite` | Fastest/cheapest Nano Banana option; 1K only, up to 14 references |\\n| Posters, title cards, signs, logos, or any image with important readable text | `gpt-image-2` | Strong text rendering; up to 16 image inputs and 1K/2K/4K output |\\n| Complex multi-image composition, precise editing, or a strong alternate interpretation | `gpt-image-2` | Strong non-Nano alternative with multi-image input |\\n| Cheapest usable image, or an xAI look | `grok-imagine` | 2 cr flat (3 with a reference); 1 reference image |\\n| xAI at 2K or with a quality tier, up to 3 edit references | `grok-imagine-2.0` | 1K 4 (low) / 6 (medium), 2K 6 / 8, +1 cr per reference image |\\n\\nUse `--num 1..4` for variations of one prompt in a single call. Never loop separate paid calls for variations that fit in one request.\\n\\n### Videos\\n\\n| Need | Choose | Important limits |\\n| ---------------------------------------------------------------------------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| Most generation, first/last-frame, mixed-reference, source-edit, or extension requests | `gemini-omni-1.1-flash` | 3-10s output; 360p/720p/1080p/4K at 3/10/15/30 cr/s; audio always; up to 10 image inputs, and 3 reference videos <=3s on generate only; edit source <=10s; continuation or 3-10s extension of a 1-30s source, 40s total reachable only by extending from <=30s |\\n| Grok 1.5 text, first-frame, or 1-7 image-reference clips with native audio and optional 1080p | `grok-imagine-video-1.5` | 1-15s; 480p/720p/1080p for text/first-frame; references are 480p/720p only; no last frame |\\n| Unified text, first/last-frame, mixed-media, document, or webpage reference generation | `wan-3.0` | 2-30s or auto; 480p/720p/1080p at 7/14/28 cr/s; 10 image, 5 video, 5 audio refs, 20 media files total; document/web refs require thinking |\\n| 480p/768p/2K/4K with native stereo audio, first/last frames, or mixed image/video/audio references | `minimax-h3` | 5-15s; 5/6/13/16 cr/s by resolution; up to 9 image, 3 video, 3 audio refs, 12 files total; first 5 reference images free then 8 cr each; reference video/audio each total <=15s |\\n| Text or first/last-frame video with native audio and stronger prompt adherence | `minimax-h3-max` | 5-15s; 5/8 cr/s at 480p/768p; seed, safety checker, and disabled/balanced/quality prompt expansion; no reference media |\\n| Images pinned to specific moments (keyframes), 16-20s clips, or a cheap draft pass before committing | `flux-3` | 5-20s (auto for text/first-frame only); 720p/1080p; up to 10 keyframes; `--quality draft` is 720p-only at ~1/3 the cost |\\n| Video/audio references, mixed reference media, broad aspect ratios, frame-mode first+last frame, or 11-15s | `seedance-2` | 4-15s or auto; up to 9 image, 3 video, and 3 audio refs; audio toggle; Mini/Fast are 480p/720p only |\\n| Single takes past 15s, or more references than Seedance 2.0 allows | `seedance-2.5` | 4-30s or auto; up to 30 image, 10 video, and 10 audio refs (50 files total); one quality tier; 480p/720p/1080p |\\n| Fast polished 3-15s video with first frame, multi-prompt, and native audio | `kling-v3-turbo` | Audio always on; Pro default; no end frame, reference-media mode, or elements |\\n| Cinematic 3-15s with reference images, image/video elements, first+last frame, audio, or 4K | `kling-o3` | 7 combined image refs/elements, reduced to 4 with a video element; Standard/Pro/4K |\\n| Kling 3-15s image-to-video with first+last frame, image/video elements, multi-prompt, audio, or 4K | `kling-3.0` | Elements require a start image; image or video elements can bind voice_id; Standard/Pro/4K |\\n| User explicitly requests Veo, or the selected workflow specifically needs Veo | `google-veo3.1` | Good fallback, but not the preferred general model |\\n\\nRouting rules:\\n\\n- 480p/768p/2K/4K with native stereo audio: use MiniMax H3 (5/6/13/16 cr/s).\\n- 480p/768p text or first/last-frame video with native audio: use MiniMax H3 Max (5/8 cr/s). It has no reference mode.\\n- Grok 1.5 reference mode accepts 1-7 images only. Address them in array order as `<IMAGE_0>` through `<IMAGE_6>`. Do not combine reference images with `--start-image`, `--end-image`, `--ref-video`, or `--ref-audio`.\\n- Grok 1.5 first-frame mode accepts one `--start-image`, derives the output aspect ratio from that image, and does not support `--end-image`. Text and first-frame modes support 480p, 720p, or 1080p. Reference mode supports 480p or 720p.\\n- Grok 1.5 always generates native audio. Do not pass `--no-audio`, `--seed`, `--negative`, or `--quality`.\\n- Around 11-15 seconds with native audio: use MiniMax H3, Kling, or Seedance, not Gemini.\\n- One existing source video that should be edited: use `videodraft edit video`, which auto-selects Gemini Omni 1.1 Flash for a source up to 10s. Generic `generate video --ref-video` retains source-edit behavior when `--video-task` is omitted, but the dedicated edit command is clearer.\\n- Video supplied as a creative reference: Gemini Omni 1.1 Flash accepts up to 3 videos of at most 3 seconds each, including mixed image and video input. Creative video references are accepted on `--video-task generate` ONLY: edit and extend take exactly one input video, so `--ref-video` cannot accompany `--source-video` or `--previous-interaction-id`. Use Wan 3.0 for up to 5 ordered video/audio references and 1080p, MiniMax H3 for 2K/4K, or Seedance 2.0 when quality-tier control matters.\\n- First and last frame control: Gemini Omni 1.1 Flash, Wan 3.0, MiniMax H3, MiniMax H3 Max, Seedance, Kling O3, and Kling 3.0 support it. For Gemini, every start/end frame counts toward the 10-image total, leaving up to 9 references with a start frame or 8 with both frames.\\n- Extension with a 1-30s uploaded source uses Gemini Omni 1.1 Flash plus `--source-video` and `--video-task extend` (or `--extend`). Pass an explicit 3-10s output duration; the model appends it at the end, up to 40 seconds total. Creative `--ref-video` clips CANNOT accompany the source: edit and extend take exactly one input video. New dialogue is allowed only when the source video is silent; adding speech on top of a source that already has speech is refused with \\"the model is currently unable to process speech edits\\". Continuation uses `--previous-interaction-id <id>` and defaults to a conversational edit; `--video-task extend` lengthens it. A continuation is submitted as the prior turn\'s output video, so it obeys the same source limits (<=30s to extend, <=10s to edit) and the same silent-source dialogue rule. 40s total is reachable only by extending from a source of 30s or less, so a ladder dead-ends past 30s. Fal returns interaction IDs, but its currently published callable v1.1 endpoints do not expose continuation/extension or mixed source-edit references; never infer a route or silently fall back to paid Google.\\n- Wan 3.0 reference mode and frame mode are separate. It accepts 10 images, 5 videos, and 5 audio clips, at most 20 media files total. Video and audio each total at most 15 seconds. `--file-url` and `--web-url` require `--thinking`. `--auto-duration` cannot be combined with `--duration`.\\n- MiniMax H3 reference mode and first-plus-last-frame mode are separate. Audio cannot be the only reference. Address references as `Image 1`, `Video 1`, and `Audio 1` in array order.\\n- Seedance reference mode and first-plus-last-frame mode are separate. Do not promise reference video/audio plus a last frame in one generation.\\n- Multi-prompt sequencing: use Kling 3.0 Turbo, Kling O3, or Kling 3.0.\\n- Kling 3.0 image-to-video and Kling O3 reference-to-video accept repeatable structured `--element` JSON. Each element is image-backed (`frontal_image_url` plus 1-3 `reference_image_urls`) or video-backed (`video_url`). Either form may include `voice_id`. Keep the voice ID inside the same element so the association is preserved. Reference them as `@Element1`, `@Element2`. Kling V3 Turbo rejects elements.\\n- Kling 2.6 Pro image-to-video accepts one or two repeatable `--voice-id` values. Cite them as `<<<voice_1>>>` and `<<<voice_2>>>` in the prompt. Voice control costs 17 cr/s. Use `videodraft kling-voices list|create|delete` to manage the separate Kling video-control voice library. Creating a voice requires a clean 5-30 second, up-to-50MB single-speaker `.mp3`, `.wav`, `.mp4`, or `.mov` sample plus `--confirm-consent`. Creation costs 1 VideoDraft credit on the platform Fal account and 0 credits with Fal BYOK; use the create command\'s `--estimate` flag to check without creating.\\n- Kling V3 voice control costs 16 cr/s for Standard and 20 cr/s for Pro.\\n- Seedance quality: `mini` for the lowest cost, `fast` for speed, `standard` for maximum quality and for 1080p/4K. Seedance 2.5 has a single tier and ignores `--quality`.\\n- Longer than 15 seconds, or more than 9 image / 3 video / 3 audio references: use Seedance 2.5. It reaches 30s and 30/10/10 references (50 files total) at 480p/720p/1080p, but has no 4K.\\n- Real identifiable people in Seedance 2.x require an explicit routing and pricing opt-in. Set MCP `allow_real_people: true` or CLI `--allow-real-people` on the first request when supplied visual input media visibly contains one, including a start frame, end frame, reference image, or reference video. Keep the Byteplus default for text-only requests, non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. This keeps Byteplus first, permits a submit-time Fal fallback, and charges Fal\'s higher tier-specific rate.\\n- If a default-priced Seedance request fails with `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, estimate the higher rate, follow the user\'s spend policy, and retry once with the option enabled. The response also carries `retry_with: { allow_real_people: true }`, `cli_flag: \\"--allow-real-people\\"`, and `retry_policy: \\"once\\"`. If the option was already enabled, do not repeat the same request. Byteplus may accept a task and reject the output later. VideoDraft refunds that failed generation, but it cannot reroute the asynchronous failure to Fal. Rephrase or change the references instead.\\n\\n### Video edit and motion-control categories\\n\\nUse `videodraft models video --category video_edit` for existing-video transforms and `--category motion_control` for motion transfer.\\n\\n| Need | Command/model | Important limits |\\n| ------------------------------------------ | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |\\n| Most edits of a source up to 10s (DEFAULT) | `videodraft edit video <video> \\"...\\"` (auto-selects `gemini-omni-1.1-flash`) | Source <=10s or it REFUSES; up to 10 image refs and 3 creative video refs <=3s each; 360p/720p/1080p/4K; audio always regenerated (no `--preserve-audio`) |\\n| Cheapest simple prompt edit | `videodraft edit video <video> \\"...\\" --model grok-imagine-video-edit` | No image refs; source silently truncated to 8s; auto/480p/720p |\\n| Edit with several image references | `--model happy-horse-video-edit --ref ...` | Up to 5 refs; 720p/1080p; source silently truncated to 15s; highest rate (28-56 cr/s) |\\n| Controlled Kling edit | `--model kling-o3-video-ref-edit --ref ...` | Up to 4 refs; Standard/Pro; source silently clamped to 3-10s |\\n| Transfer reference motion to an image | `videodraft edit motion <image> [direction] --motion-video <video>` | Prompt/direction is optional; Kling V3 default; optional one image-only `--element`; element requires video orientation |\\n\\nIf the user explicitly names one of these models, preserve it. The CLI uploads local source videos and reference images automatically. Editing returns an async job and waits by default.\\n\\n**Omit `--model` and the SERVER chooses**, because only it can measure the source. It picks `gemini-omni-1.1-flash` for any source up to 10s. When that is not safe (source longer than 10s, unmeasurable duration, `--preserve-audio`, more than 10 refs, or Fal BYOK with refs) it spends nothing and returns a priced menu: per model, the seconds it would edit, the seconds it would drop, and the credit cost. The CLI prints that table and exits 2. Show it to the user, then re-run with `--model`.\\n\\n**Truncation is the trap here.** Only Gemini refuses a source it cannot fully consume. Every other edit model accepts a 30s clip and returns an edit of its first 8-15 seconds with no error. `videodraft edit video` now warns when this will happen and the tool response carries `source.truncated` / `source.dropped_seconds`; relay it to the user rather than letting them discover it in the output.\\n\\nTo edit a longer source without losing its tail, cut it into <=10s pieces with `videodraft_editor`, edit each with Gemini, then reassemble and export there. VideoDraft has no server-side split/concat, so this needs the native editor.\\n\\nKling O3 is also exposed for reference generation. `videodraft generate video --model kling-o3-video-ref-edit` requires exactly one `--ref-video` and generates a new reference-guided clip. Wan 3.0 handles new text, frame, and mixed-reference generation, but is not an existing-source edit model.\\n\\n### Reference-first video workflow\\n\\n- Prefer a start frame or reference image whenever a specific character, product, location, style, composition, or brand identity must stay recognizable.\\n- If the user gives a reference, pass it. Never silently replace it with a text description.\\n- If no reference exists and continuity matters, generate a still first with the user\'s explicitly requested compatible image model, otherwise use Nano Banana 2. Wait for the image URL, then animate it with the selected video model. Confirm the combined image plus video cost before starting.\\n- For multi-shot scenes, generate shot images with `videodraft shots <project_id> --model <selected-image-model> --grid`. Preserve an explicitly requested compatible image model; otherwise use `nano-banana-2`. The grid establishes the scene and characters together, then decodes into individual shot images.\\n- Animate the decoded shot images as per-shot start frames or references. Do not independently text-generate each video clip when the shots need to match.\\n- Pure text-to-video remains appropriate for generic one-off footage where no subject, composition, or continuity needs to be preserved.\\n\\n### Audio\\n\\n- **Seed Audio 1.0**: use `videodraft generate audio` for open-ended speech, sound, music, or prompt-driven audio editing. It accepts up to three audio references or one image. Address audio references as `@Audio1`, `@Audio2`, and `@Audio3`. Preset and custom cloned voice IDs are supported. Output is up to 120 seconds. There is no requested-duration input. The CLI automatically retries transient responses with one idempotency key. To recover after the CLI process itself is interrupted, set `--idempotency-key <uuid>` on the original command and reuse it.\\n- **Voiceover/TTS**: prefer ElevenLabs. Brittney is the platform default voice; under ElevenLabs BYOK, use a compatible voice from the user\'s account. Honor another supported voice/provider when the user explicitly selects it.\\n- **Dialogue, voice changing, and dubbing**: ElevenLabs only.\\n- **Sound effects**: ElevenLabs Sound Effects only.\\n- **Music**: use `lyria-3-clip-preview` for a short instrumental/background score, `lyria-3-pro-preview` for a longer or higher-quality instrumental score, and `elevenlabs-music` when vocals/lyrics or a specified 10-120 second length matter.\\n- Voice Changer and Dubbing require the source media duration and currently accept source media up to 300 seconds.\\n\\n### Avatar / talking head\\n\\n**First decide the framing, not just \\"someone talks\\".** This lane animates a PORTRAIT facing the lens. A character delivering a line inside a real scene, with blocking, framing or camera movement, belongs to `generate video` instead: use `kling-2.6-pro` (one or two voices cited as `<<<voice_1>>>` / `<<<voice_2>>>`), `kling-3.0` (a voice bound per element, so several characters can speak in one shot), or `happy-horse` (strong character identity from a frontal image, native audio, multilingual lip-sync). Sending a cinematic shot to Fabric returns a head-on talking headshot, not the shot that was asked for. `videodraft models video --json` lists these under `recommended.in_scene_dialogue`.\\n\\nFor a presenter, spokesperson or explainer speaking to camera, VEED Fabric is the preferred model. Choose the dedicated path from the media the user already has:\\n\\n| Starting media | Command | Use |\\n| ----------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------- |\\n| Portrait + script, reusable avatar record | `videodraft avatar create <portrait> --script \\"...\\"` then `avatar render` | Managed avatar flow with bundled speech preparation |\\n| Portrait + text | `videodraft avatar fabric <portrait> --text \\"...\\"` | One-off direct VEED Fabric text mode |\\n| Portrait + existing audio | `videodraft avatar fabric <portrait> --audio <audio>` | One-off direct VEED Fabric audio lip sync |\\n| Existing video + existing audio | `videodraft avatar lipsync <video> --audio <audio>` | Sync Labs Lipsync 2 |\\n\\nThe managed renderer is VEED Fabric Fast (`veed/fabric-1.0/fast`). Direct Fabric and Sync Labs are paid AI Studio generations and return async job IDs.\\n\\n1. Obtain the avatar image. Prefer the user\'s supplied portrait or an existing character. If none exists, use the user\'s explicitly requested compatible image model, otherwise generate a front-facing head-and-shoulders portrait with `nano-banana-2`, direct eye contact, a natural expression, and a clean background. Match the intended video aspect ratio when practical.\\n2. If the portrait is visibly soft or too small, run Topaz image enhancement/upscaling before animation.\\n3. Generate a script only if needed: `videodraft avatar script \\"<idea>\\"`.\\n4. Create the avatar record and speech: `videodraft avatar create <portrait-url-or-file> --script \\"...\\" --voice <id> --ar 9:16`. Prefer ElevenLabs when unspecified, but honor another explicitly selected supported voice/provider.\\n5. Render with VEED Fabric: `videodraft avatar render <avatar_video_id> --resolution 720p`.\\n\\nThe portrait is passed as the avatar\'s character image, not as a generic video\'s start frame. Prefer rendering directly at 720p. Use 480p only when the user prioritizes lower cost. Avatar script generation and `avatar create` (including speech) are bundled/free. Confirm the Fabric render cost, plus portrait generation or upscaling when needed.\\n\\nDirect Fabric text/audio and Sync Labs do not use the managed avatar record. The CLI uploads local portrait, video, and audio files automatically. `avatar fabric --speed fast` applies only to audio mode. Sync costs 5 credits per verified audio second; under Fal BYOK, `sync_mode` remains available but `temperature` and `active_speaker` are ignored by the provider.\\n\\n### Upscaling / enhancement\\n\\n- **Images**: Topaz via `videodraft upscale image <url-or-file> --scale 1x|2x|4x`. Use 1x for light enhancement without enlargement, 2x as the general default, and 4x only when the source quality and target size justify it. The result is synchronous.\\n- **Videos**: Topaz via `videodraft upscale video <url-or-file> --scale 2x`. Use 2x by default. The job is asynchronous; the CLI waits by default, while MCP callers poll `check_generation_status`. MCP video input must be VideoDraft-hosted, so upload local or external sources first.\\n- Use upscaling to preserve the image/video while improving detail, resolution, or cleanup. It cannot fix the wrong subject, misspelled text, bad framing, unwanted objects, broken continuity, or incorrect motion. Use an edit or regeneration for those problems.\\n- For a new Fabric avatar, render directly at 720p instead of rendering at 480p and then upscaling. Upscale the source portrait first only when the portrait itself is low quality.\\n\\n## Capability gotchas\\n\\n- Each model\'s `inputs` block is authoritative: supported `aspect_ratios`, `resolutions`, `quality_options`, `start_frame`/`end_frame`, `max_reference_images/videos/audio`, `multi_prompt`, `audio_toggle`. Passing an unsupported input fails with a clear error \u2014 check first, don\'t trial-and-error paid calls.\\n- Most video models support only 16:9 / 9:16 / 1:1. A 3:4 request hard-fails on most.\\n- `--seed` reproduces a specific output on models that support it (e.g. Flux, Ideogram V4); everything else ignores it. You do not need a seed for variation \u2014 `--num` already varies.\\n- `--rendering-speed` applies to Ideogram (V3: `Default`/`Turbo`/`Quality`; V4: `Turbo`/`Balanced`/`Quality`) and affects image cost \u2014 pass it to `videodraft costs ... --rendering-speed <tier>` for an accurate estimate. Always trust `videodraft models image --json` over this list; new models and tiers appear there the moment the platform ships them, with no CLI update.\\n- `seedream-v5-pro` supports unified text-to-image and reference-image editing with up to 10 image references. Use `--resolution 1K` for 7 credits/image or `--resolution 2K` for 14 credits/image.\\n- Reference inputs: `--ref <img>` (images, including up to 10 total for Gemini Omni 1.1 Flash and Wan 3.0, and 7 for Grok 1.5), `--source-video <v>` (Gemini uploaded edit/extension source), `--ref-video <v>` (up to 3 creative videos <=3s each for Gemini Omni 1.1 Flash; also Wan 3.0, MiniMax H3, and Seedance 2), `--ref-audio <a>` (Wan 3.0, MiniMax H3, Seedance 2), and `--element \'<json>\'` or `--element @elements.json` for Kling V3/O3. For an exact Seedance 2.x reference-video `--estimate`, add `--ref-video-seconds <combined-seconds>`; Seedance bills input seconds alongside output. Wan 3.0 and MiniMax H3 do not bill input reference seconds. The CLI uploads local media references and every structured element without flattening the source/reference roles. `--segment \\"<prompt>:<seconds>\\"` (repeatable) drives Kling 3.0, Kling 3.0 Turbo, and O3 multi-prompt generation. Use 1-6 segments of 1-15 whole seconds each, with 3-15 seconds total. `generate image --video-ref` is the nano-banana-2 video reference.\\n- The top-level prompt is OPTIONAL for Gemini Omni 1.1 Flash media-input or continuation calls, Wan 3.0 frame/reference modes, `generate video` with multi-prompt models, and Kling 3.0 Turbo (`--model kling-v3-turbo`) image-to-video. Text-only Gemini and Wan calls still require a prompt unless their live schema says otherwise.\\n- Hosted AI Production fallback: `videodraft produce <project> --mode full_video` generates one Seedance 2 video per scene; add `--allow-real-people` when a scene grid visibly contains a real identifiable person. The MCP equivalent is `produce_project` with `mode: \\"full_video\\", allow_real_people: true`. The option applies the higher Fal-tier rate to every submitted scene segment. If a partial run returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, rerun the same project once with the option after cost confirmation. The server reconciles asynchronous results first, preserves running/completed jobs, and retries only failed placeholders carrying that exact code. Poll with `videodraft generations`, then `videodraft finalize <project>` swaps them into the hosted timeline before `export`. In VideoDraft ADE, do not choose this path while `videodraft_editor` is available unless the user explicitly requests hosted production. Generate or download the scene assets, import them, and assemble/export with the native editor instead. If the user explicitly requests another compatible video model for a hosted production, do not use this fixed Seedance path; generate the project shots manually with the requested model and attach them to the hosted timeline.\\n\\n## Cost model\\n\\n- Images: per image (\xD7 `--num`). Matrix-priced models (GPT-Image, Nano Banana Pro, Seedream v5 Pro) vary by resolution/quality.\\n- Video: usually credits/second \xD7 duration; rate depends on model + resolution + quality + native audio on/off.\\n- Gemini Omni 1.1 Flash: 3 / 10 / 15 / 30 credits per output second at 360p / 720p / 1080p / 4K (720p default). Extend appends an explicit 3-10 seconds to a 1-30s source, whether uploaded or resolved from a prior interaction; 40 seconds total is reachable only while the source stays at or under 30s. Fal BYOK generation and basic source edits cost zero VideoDraft credits; continuation, extension, and separate creative references on a source edit are unavailable under Fal BYOK.\\n- MiniMax H3: 5 / 6 / 13 / 16 credits per output second at 480p / 768p / 2K / 4K (768p default). The first 5 reference images are included, then 8 credits for each additional image. Reference video and reference audio are NOT billed.\\n- MiniMax H3 Max: 5 credits per output second at 480p or 8 credits per second at 768p (default).\\n- Wan 3.0: 7 / 14 / 28 credits per output second at 480p / 720p / 1080p. Auto duration reserves 30 seconds and reconciles unused credits from the provider-reported output duration. Fal BYOK charges zero VideoDraft credits.\\n- Grok Imagine Video 1.5: 8 credits/output second at 480p, 14 at 720p, or 25 at 1080p, plus 1 credit for each first-frame or reference image. Native generated audio is part of every output.\\n- Kling voice control: 17 credits/output second for Kling 2.6 Pro, 16 at Kling V3 Standard, and 20 at Kling V3 Pro.\\n- Shot-image batches: one image per shot (+1 grid image per scene in `--grid` mode) \u2014 the largest single spend in the pipeline.\\n- VEED Fabric avatar renders: ~10 credits/sec at 480p, ~20/sec at 720p. Avatar creation and its speech are bundled/free; only optional portrait generation/upscaling adds cost before the render.\\n- Direct VEED Fabric: text or normal audio is 8 credits/sec at 480p and 15/sec at 720p; fast audio is 10/sec at 480p and 20/sec at 720p.\\n- Sync Labs Lipsync 2: 5 credits per verified audio second.\\n- Voiceover TTS: 10 credits per 1000 characters for standard voices, 30 per 1000 for cloned `custom-*` voices (min 1, pro-rated); applies to standalone voiceovers AND per-scene narration during `produce`. Silent tracks are free. Voice cloning itself is a flat 150 credits per clone.\\n- Lyria music: flat per track, 4 credits (clip) / 8 credits (pro).\\n- Seed Audio 1.0: 19 credits per actual output minute, prorated and rounded up to a whole credit. VideoDraft reserves the 120-second maximum of 38 credits and refunds the unused portion after generation. Fal BYOK is free.\\n- ElevenLabs audio: sound effects are per second, dialogue is per character, music/voice-changer/dubbing are per started minute. Voice changer and dubbing reject source media above 300s in the current synchronous flow.\\n- Seedance 2.0 / 2.5 real people: every listed Seedance 2.x rate assumes `--allow-real-people` is OFF, which uses the Byteplus-priced path (2.0 Mini 4/8 cr/s, Fast 6/13, Standard 7/16/38/78, 2.5 11/24/57 for 480p/720p/1080p). Byteplus refuses real-person likenesses, so a likeness-policy failure does not fall back by default. Passing `--allow-real-people` keeps Byteplus first but permits a submit-time Fal fallback, which allows them, and prices at Fal\'s rate for that tier: 2.0 Mini 8/16, Fast 11/25, Standard 14/31/69/156, 2.5 23/48/114. That is roughly 2x but not exactly 2x: the Seedance 2.0 1080p pair is 38/69, or about 1.82x. If Byteplus accepts the task and later rejects the generated output, VideoDraft refunds the failure but does not resubmit it to Fal. Pass the option proactively only when supplied visual input media visibly contains a real identifiable person. Otherwise retry once only after the exact opt-in code.\\n- Grok Imagine images: `grok-imagine` is a flat 2 cr (3 with a reference). `grok-imagine-2.0` is a separate, newer model priced by resolution and quality: 1K 4 (low) / 6 (medium), 2K 6 / 8, plus 1 cr per reference image (up to 3). v1 is NOT superseded \u2014 pick it when cost matters more than 2K.\\n- xAI bills refused requests, so failed Grok generations are not refunded.\\n- Upscales: priced by scale and source size.\\n\\nQuote before spending:\\n\\n```bash\\nvideodraft costs gemini-omni-1.1-flash --type video --duration 8 --resolution 720p --audio\\nvideodraft costs minimax-h3 --type video --duration 10 --resolution 2K --ref-images 7\\nvideodraft costs minimax-h3-max --type video --duration 10 --resolution 768p\\nvideodraft costs grok-imagine-video-1.5 --type video --duration 8 --resolution 720p --ref-images 4\\nvideodraft costs seedance-2 --type video --duration 15 --resolution 720p --quality standard --audio\\nvideodraft costs grok-imagine-2.0 --type image --resolution 2K --quality medium --num 2\\nvideodraft costs seedance-2 --type video --duration 15 --resolution 720p --quality standard --audio --allow-real-people # Fal-tier rate\\nvideodraft costs elevenlabs-dubbing --type audio --duration 60\\nvideodraft costs seed-audio-1.0 --type audio --duration 60 # scenario only; model controls actual length\\nvideodraft costs elevenlabs-dialogue --type audio --chars 350\\nvideodraft costs voiceover --type audio --chars 800 # TTS: 10 cr / 1000 chars\\nvideodraft generate video \\"...\\" --model gemini-omni-1.1-flash --estimate # same quote, inline\\nvideodraft generate video \\"...\\" --model minimax-h3-max --duration 8 --resolution 768p --prompt-expansion-mode balanced --safety-checker true\\n```\\n","references/pipeline.md":"# VideoDraft pipeline reference\\n\\nEverything here describes the hosted fallback pipeline through the CLI (`videodraft <command>` / `videodraft call <tool>`) or hosted MCP connector (tool names in backticks). When the local `videodraft_editor` MCP is available, do not use hosted production or export by default. Use hosted tools only for asset generation and optional script/storyboard stages, then import the results and finish with the native editor reference linked from SKILL.md. Continue through `produce_project` and `export_video` only when the user explicitly requests a hosted web production or the native editor is unavailable.\\n\\nUse direct asset tools for standalone images, clips, audio, upscales, and descriptions. Use a hosted project when the user explicitly wants the editable web project, when a hosted storyboard stage is useful, or when the native editor is unavailable. Script-only uses a script-stage project and stops at the script. In VideoDraft ADE with editor tools present, stop before hosted production, import the generated assets, and build/export the native project.\\n\\n## Stages and their tools\\n\\n| Stage | CLI | Underlying tool |\\n| --------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------ |\\n| Idea \u2192 full storyboard project | `videodraft create \\"<idea>\\"` | `generate_storyboard_from_idea` |\\n| Idea \u2192 script only (stop there) | `videodraft create \\"<idea>\\" --script-only` | `generate_script_from_idea` |\\n| Footage IS the video | `videodraft call generate_storyboard_from_media` | `generate_storyboard_from_media` |\\n| Batch shot images | `videodraft shots <project>` | `generate_shot_images` |\\n| One shot image | `videodraft generate image --project <id> --scene N --shot M` | `generate_image` |\\n| Produce (voiceover, captions, timeline) | `videodraft produce <project>` | `produce_project` |\\n| Seedance full-video production | `videodraft produce <project> --mode full_video` | `produce_project` with `mode: \\"full_video\\"` |\\n| Per-shot motion prompts | `videodraft video-prompts <project>` | `generate_video_prompts` |\\n| Motion clip for a shot | `videodraft generate video --project <id>` | `generate_video` |\\n| Attach a finished clip to the timeline | `videodraft attach <project> --scene N --shot M --media <url> --type video` | `attach_media_to_shot` |\\n| Background music | `videodraft generate music --attach <project>` | `generate_music` / `set_background_music` |\\n| General or reference-driven audio | `videodraft generate audio \\"...\\"` | `generate_audio` |\\n| Sound effect | `videodraft generate sound-effect \\"...\\"` | `generate_sound_effect` |\\n| Dialogue audio | `videodraft generate dialogue --line \\"voice:text\\"` | `generate_dialogue` |\\n| Voice changer | `videodraft generate voice-changer <audio>` | `change_voice` |\\n| Dubbing | `videodraft generate dub <audio_or_video>` | `dub_media` |\\n| Scene voiceover | `videodraft generate voiceover --project <id> --scene N` | `generate_voiceover` |\\n| Avatar script | `videodraft avatar script \\"<idea>\\"` | `generate_avatar_script` |\\n| Avatar + speech | `videodraft avatar create <portrait> --script \\"...\\"` | `create_avatar_video` |\\n| Talking-head render | `videodraft avatar render <avatar_video_id>` | `render_avatar_video` + `get_avatar_video` |\\n| Direct portrait + text/audio | `videodraft avatar fabric <portrait> --text \\"...\\"` or `--audio <file>` | `generate_veed_fabric_video` |\\n| Existing video + replacement audio | `videodraft avatar lipsync <video> --audio <file>` | `generate_sync_lipsync_video` |\\n| Existing-video AI edit | `videodraft edit video <video> \\"<change>\\" --model <video-edit-model>` | `edit_video` |\\n| Motion transfer | `videodraft edit motion <image> [direction] --motion-video <video>` | `generate_motion_control_video` |\\n| Image enhancement/upscale | `videodraft upscale image <image>` | `upscale_image` |\\n| Video enhancement/upscale | `videodraft upscale video <video>` | `upscale_video` |\\n| Final MP4 | `videodraft export <project>` | `export_video` + `check_export_status` |\\n\\n## Rules that prevent broken results\\n\\n- **The storyboard is generated FROM the script**, never from the raw idea. `videodraft create` runs the whole chain correctly. Don\'t call `generate_storyboard_scenes` with a raw idea as the \\"script\\".\\n- **Visual consistency**: never generate a storyboard shot in isolation. Shot prompts carry `[[asset:Name]]` / `[[shot:X-Y]]` tags that `generate_shot_images` resolves against the project\'s visual assets and prior shots. When generating a single shot whose prompt has no tags, pass `--ref` images yourself (the project\'s visual assets and/or the previous shot\'s image; `projects get` exposes both). For scenes with multiple shots or recurring characters, prefer `videodraft shots <project> --model <selected-image-model> --grid`: preserve an explicitly requested compatible image model, otherwise use `nano-banana-2`. It creates one coherent scene grid, then decodes it into individual shot images.\\n- **Reference-first video**: when identity, styling, or composition matters, do not generate each motion clip from text alone. Generate or select the shot still first, then pass the decoded shot image as `--start-image` or `--ref` to the selected video model. AI Production already composes scene grids and sends them to Seedance as references. If the user explicitly requests another compatible video model, bypass fixed Seedance full-video mode and generate the per-shot clips with the requested model, using the individual decoded shot images as anchors.\\n- **Seedance full-video real people**: when a hosted `full_video` scene grid visibly contains a real identifiable person, enable the option before submitting any scene videos. Keep the Byteplus default for non-people, anime, and clearly synthetic or stylized characters that are not identifiable real people. Use `videodraft produce <project> --mode full_video --allow-real-people`, or MCP `produce_project` with `mode: \\"full_video\\", allow_real_people: true`. This applies Fal-tier pricing to every submitted segment and permits the Byteplus-to-Fal fallback. If a partial run without the option returns `SEEDANCE_REAL_PERSON_OPT_IN_REQUIRED`, re-estimate, follow the user\'s spend-confirmation preference, and rerun the same project once with the option. The server reconciles asynchronous results first, preserves running/completed jobs, and retries only failed placeholders carrying that exact code. Do not loop when it was already enabled. VideoDraft refunds a Byteplus task rejected after asynchronous acceptance, but cannot reroute it; rephrase or change the scene references instead.\\n- **Hold off generating shot images while the user is still iterating** on storyboard structure.\\n- **produce \u2192 export ordering**: `export` requires a produced project where every production scene has timeline media. If `produce` returns `generating_shot_images`, poll the job ids it returns, then re-run produce.\\n- **Do not attach motion clips before production exists**: run `produce` successfully first, then attach finished motion clips to the production timeline. Attaching before `production_data` exists cannot place them in the final timeline.\\n- **Generated motion clips do not auto-attach**: after `generate video` completes, attach the clip with `attach_media_to_shot` (`media_type:\\"video\\"`, include `duration_seconds`) \u2014 it replaces the production timeline clip while keeping the storyboard still.\\n- **Talking heads use dedicated avatar tools**: do not use `generate video`. Use managed `avatar create` and `avatar render` for reusable avatars, direct `avatar fabric` for a portrait plus text/audio, and `avatar lipsync` for an existing video plus replacement audio. Reuse a supplied person image or generate a clear front-facing portrait with the explicitly requested compatible image model, otherwise Nano Banana 2. Managed avatar creation and speech are bundled/free; direct Fabric, Sync, and render are paid.\\n- **Existing-video edits use their own category**: call `edit_video` or `videodraft edit video` with a `video_edit` model when transforming the source itself. Kling O3 also has a reference-generation mode that creates a new guided clip. Wan 3.0 is a text/frame/reference generation model, not a source-video editor. Motion transfer similarly uses `generate_motion_control_video` or `videodraft edit motion` with a `motion_control` model.\\n- **Upscaling preserves rather than redesigns**: use Topaz when resolution, detail, or cleanup is the problem. Regenerate or edit when the subject, text, framing, continuity, or motion is wrong. Upscale a low-quality avatar portrait before Fabric; do not render a new avatar at 480p just to upscale the result.\\n- **Timeouts on the one-shot create**: if `create` times out at the transport layer, the project was still created server-side \u2014 `videodraft projects list`, take the most recent, and resume with its id. Don\'t start a duplicate.\\n\\n## User-attached media: classify roles first\\n\\nFor EACH attached file decide:\\n\\n- **visual_asset** \u2014 recurring reference (character / product / location / style). Upload, then pass in `visual_assets` of `generate_storyboard_from_idea` (via `videodraft call`), or add to an existing project with `add_visual_assets`. Type must be one of `character | object | location | style | custom` with a short name + concrete description.\\n- **shot** \u2014 the media IS footage for the video. Whole video = footage \u2192 `generate_storyboard_from_media`. Idea + footage \u2192 `generate_storyboard_from_idea` with `shot_media`. Existing storyboard \u2192 `attach_media_to_shots`.\\n- **reference** \u2014 inspiration only \u2192 fold a description into the idea/instructions; don\'t place it as a shot or asset.\\n\\nAmbiguous (e.g. a person holding a product)? Ask the user.\\n\\nUploads persist in the media library \u2014 recall later with `videodraft media list`.\\n\\n## Editing project data safely\\n\\n1. `videodraft call get_project_schema` \u2014 read the structure once per session.\\n2. `videodraft projects get <id> --raw` \u2014 the exact editable blob.\\n3. Modify; then `videodraft call update_project --stdin` with `{\\"project_id\\": \\"...\\", \\"data\\": {...}}`.\\n - Objects deep-merge key-by-key; **arrays replace wholesale** \u2014 send the complete array you\'re changing (e.g. all of `storyboard.scenes`).\\n - Scene shot arrays (`image_prompt` / `shot_types` / `shot_actions` / `search_prompt` / `preview_media`) are auto-aligned; fix-ups come back as warnings.\\n4. Snapshot before risky edits: `videodraft checkpoint create <id> --name \\"before re-script\\"`. Restore with `videodraft checkpoint restore <id> <version>`.\\n\\n## AI Studio sessions (standalone generations)\\n\\nProject generations group automatically, and standalone work is grouped per conversation (MCP) or per working directory (CLI) by the connection session \u2014 see the \\"AI Studio sessions\\" section of SKILL.md. Once the task is clear, give that automatic session a concise 3-6 word title before the first generation:\\n\\n```bash\\nvideodraft sessions name \\"Fox Brand Explorations\\"\\nvideodraft generate image \\"...\\"\\n```\\n\\nNaming creates the session with that title. If generation, a user, or an earlier agent created it first, the existing name is preserved. The command refuses to run while `VIDEODRAFT_SESSION` is set, because that override would send later generations to a different session. Use `sessions create` plus `--session` only to continue or deliberately create a separate group.\\n"}');
5767
5773
  }
5768
5774
  const root = bundledSkillDir();
5769
5775
  const files = {};
@@ -6137,7 +6143,7 @@ function registerEditCommands(program) {
6137
6143
  "gemini-omni-1.1-flash (preferred, auto-selected for sources up to 10s) | grok-imagine-video-edit | kling-o3-video-ref-edit | happy-horse-video-edit"
6138
6144
  ).option("--ref <url|file>", "reference image (repeatable)", collect2, []).option(
6139
6145
  "--ref-video <url|file>",
6140
- "Gemini Omni 1.1 Flash creative reference video, up to 3 and 3s each (repeatable)",
6146
+ "deprecated: Gemini Omni 1.1 Flash edits accept exactly one input video, so a creative reference video cannot accompany the source",
6141
6147
  collect2,
6142
6148
  []
6143
6149
  ).option(
@@ -6170,14 +6176,9 @@ function registerEditCommands(program) {
6170
6176
  model ? `${model} accepts at most ${maxRefs} reference images.` : `No video edit model accepts more than ${maxRefs} reference images.`
6171
6177
  );
6172
6178
  }
6173
- if (refVideoCount > 3) {
6174
- throw new UsageError(
6175
- "gemini-omni-1.1-flash accepts at most 3 creative --ref-video inputs."
6176
- );
6177
- }
6178
- if (refVideoCount > 0 && model && model !== "gemini-omni-1.1-flash") {
6179
+ if (refVideoCount > 0) {
6179
6180
  throw new UsageError(
6180
- "--ref-video on edit video is supported only by --model gemini-omni-1.1-flash."
6181
+ "gemini-omni-1.1-flash accepts exactly one input video for an edit, so --ref-video cannot accompany the source. Drop the references, or use `generate video --video-task generate` to guide a new clip with them."
6181
6182
  );
6182
6183
  }
6183
6184
  if (referenceVideoDurations.length > 0 && referenceVideoDurations.length !== refVideoCount) {