generate_video
Generate videos from text prompts and optional reference clips/audio using MeiGen models. Specify motion, scene, and style; model details come from list_models.
Instructions
Generate a MeiGen video using a required live model ID from list_models. Reference videos and reference audio are passed as referenceVideos / referenceAudios arrays (images.meigen.ai URLs, or local files which are uploaded for you — other hosts are rejected); per-model counts and second budgets come from list_models, and reference audio is never billed. Preserve the caller’s resolved prompt, parameters and authorized scope. Set requestId, wait=false and download=false for workflow submission; then query check_generation. At most four submissions run concurrently per MCP process; the backend quota and Retry-After remain authoritative. Video generation consumes purchased credits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tier | No | Optional model tier. Use list_models for the selected model's live tier values. | |
| wait | No | MeiGen only: false returns the accepted generation ID immediately; poll check_generation separately. Default true waits for completion. Submit-only requires requestId. | |
| model | No | Video model ID. REQUIRED; call list_models for the live lineup and capabilities. | |
| prompt | Yes | The video generation prompt. Describe motion, scene, and style — not just the still image. | |
| modelId | No | Alias of model. Provide at least one; both must match when supplied. | |
| download | No | Save the completed result locally (default true). Set false for URL-only workflows. Ignored when wait=false. Other providers may return inline image content when local saving is disabled. | |
| duration | No | Video duration in seconds. Use list_models for the model's enum/range; when omitted the server uses the omitted-request default shown there. | |
| lastFrame | No | Optional last-frame image for a model that supports it. Accepts a public URL or local file path; requires firstFrame. Use list_models for the live model contract. | |
| requestId | No | Persistent UUID for this workflow step. Required when wait=false. Reuse with identical inputs after interruption, including after MCP restart; use a new UUID for a new generation. Omit only for a new interactive generation. | |
| firstFrame | No | First-frame image when required or supported by the selected model. Accepts a public URL or local file path (auto-uploaded); use list_models and let the server enforce the live model contract. | |
| resolution | No | Output resolution. Use list_models for the selected model/tier's live values. | |
| aspectRatio | No | Aspect ratio: "16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "auto", "adaptive" (model-dependent). Defaults to "auto" when omitted. | |
| referenceVideo | No | Deprecated single-clip alias of referenceVideos. Still accepted forever; when referenceVideos is also supplied it must equal its first entry. Prefer referenceVideos. | |
| referenceAudios | No | Reference audio clips for a model whose list_models entry shows a "Reference audio" line. Each entry is either an https://images.meigen.ai/... URL or a local .wav/.mp3 path, which is uploaded for you (local paths require MEIGEN_API_TOKEN). Other hosts are rejected: pass the local file and the server uploads it. Per-model limits (clip count, per-clip seconds, total seconds, accepted formats and per-file size) come from list_models. On a model whose line says it requires a visual reference (Seedance 2.0), the request must also carry at least one reference image or reference video — audio alone is rejected. Refer to a clip in the prompt as "Audio 1", "Audio 2" … numbered in the order given here. Reference audio seconds are never billed. | |
| referenceVideos | No | Reference video clips for a model that advertises reference-video support in list_models. Each entry is either an https://images.meigen.ai/... URL — typically a clip MeiGen generated earlier, passed through unchanged — or a local .mp4/.mov path, which is uploaded for you (local paths require MEIGEN_API_TOKEN). Other hosts are rejected: the server only probes clips it can fetch from that CDN, so pass the local file instead. Per-model limits — maximum number of clips, per-clip seconds and the maximum SUM of clip seconds — come from list_models; the server enforces them and rejects an over-limit request before charging. IMPORTANT — prompt requirement: to make the new clip semantically continue a reference, the `prompt` MUST explicitly say "extend" / "continue" (e.g. "Extend this video with the following plot:"). Without that, the model treats the clips as visual reference only. Refer to a specific clip in the prompt as "Video 1", "Video 2" … numbered in the order given here. Output behavior: the output is only the configured `duration` of new content — reference clips are never concatenated into it. Billing counts the SUM of the server-probed input video seconds plus the output; do not estimate it from client-side metadata. | |
| referenceVideoDuration | No | Deprecated compatibility hint. Ignored because the server probes the authoritative duration of every clip. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | Yes | ||
| error | No | ||
| status | Yes | ||
| deduped | No | ||
| modelId | No | ||
| success | Yes | ||
| imageUrl | No | ||
| provider | No | ||
| videoUrl | No | ||
| mediaType | No | ||
| requestId | No | ||
| savedPath | No | ||
| nextAction | No | ||
| creditsUsed | No | ||
| generationId | No | ||
| creditsStatus | No | ||
| receiptWarning | No | ||
| downloadWarning | No | ||
| observationEnded | No | ||
| pollAfterSeconds | No | ||
| requestedMediaType | No |