generate_video
Generate videos from text prompts or images with a two-step process: preview cost and choose model, then confirm submission. Supports multiple AI video models for clips up to 15 seconds.
Instructions
Submit a video generation job. ASYNC — returns a job_id; the caller MUST poll check_job until status="completed". Cost is duration-based, roughly 200-5000 tokens depending on model+resolution. Supports image-to-video when image_url is provided (if no aspect_ratio is set and image_url points at an avots-hosted file, the server infers aspect from the source image dimensions). TWO-STEP FLOW (mirrors the Telegram bot UX — confirmation is REQUIRED before a video job is submitted, because video is the most expensive tool and the user must explicitly approve the spend): STEP 1 (preview) — call generate_video WITHOUT confirmed (or with confirmed=false). The tool does NOT submit anything, does NOT reserve any tokens. It returns the estimated cost for the selected model plus a sorted list of alternative video models with their prices for the same params. Show this list to the user, ask which model they want. STEP 2 (submit) — call generate_video again with the user-chosen model AND confirmed=true. Only then is the job submitted and tokens reserved. ON SUBMIT ERROR — the tool does NOT auto-switch to another model. It returns the error description plus the same alternatives-with-prices list so the user can pick a different one. Do NOT silently retry with a different model — always show the user the error + alternatives and let them choose. Typical wall-clock duration 1-8 minutes (provider queues vary — Seedance can sit queued 5+ min during peak). DO NOT give up before 10 minutes; do NOT tell the user the job failed unless check_job explicitly returns status="failed". User aliases: "seedance"/"сидэнс" → orv:bytedance/seedance-2.0, "seedance 1.5"/"seedance pro" → orv:bytedance/seedance-1-5-pro, "veo"/"veo 3.1"/"вео" → orv:google/veo-3.1, "veo fast" → orv:google/veo-3.1-fast, "kling"/"клинг" → orv:kwaivgi/kling-v3.0-pro, "sora"/"сора" → orv:openai/sora-2-pro, "grok imagine"/"грок" → orv:x-ai/grok-imagine-video. Two model families: • Fal.ai endpoints (prefix fal:) — Veo 3.1 (fal:fal-ai/veo3 / fal:fal-ai/veo3/fast), Kling 2.1 (fal:fal-ai/kling-video/v2.1/{standard|pro}), Sora. • OpenRouter Video endpoints (prefix orv:) — Seedance 2.0 (orv:bytedance/seedance-2.0, recommended for i2v character consistency), Seedance 1.5 Pro (cheapest with audio), Grok Imagine. Use for any user request involving video, animations, motion, clips, montages, ad creatives, social-media reels, or "make X come to life".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio | No | Whether to REQUEST native audio generation from models that expose an explicit toggle (default false). Important: this flag only controls the request — it does NOT determine whether the returned video has sound. Several models (Kling v3.0 Pro, Veo 3.x variants, Sora) generate audio natively whether or not this flag is set; others (Seedance 2.0, Grok Imagine) produce silent video regardless. The server does not currently probe the resulting mp4 to detect audio streams, so when reporting back to the user do NOT claim "video has no sound" based on this flag — say "play to hear" or simply do not comment on audio unless the user asks. | |
| model | No | Model id from list_models (video category). Default: orv:bytedance/seedance-2.0 (great character consistency, cheap, i2v-capable). Other good choices: fal:fal-ai/veo3/fast (fastest, narrative camera moves), fal:fal-ai/kling-video/v2.1/standard (anime/stylised). | |
| prompt | Yes | Detailed scene description: subject, action, camera movement, lighting, style. | |
| duration | No | Clip length in seconds (default 5). | |
| confirmed | No | Set to true ONLY after the user has explicitly approved the selected model + cost. Without this flag (or with false), the tool returns a preview card with estimated cost + alternative models — it does NOT submit. This guards users from accidental spend on the most expensive tool. | |
| image_url | No | Optional first-frame image URL or data: URI for image-to-video. Seedance and Veo/Kling endpoints auto-swap to the i2v variant when this is provided. | |
| resolution | No | Output resolution (default 720p). | |
| aspect_ratio | No | Output aspect ratio (default 16:9). Prefer 9:16 for TikTok/Reels/Shorts. |