Skip to main content
Glama
jau123

MeiGen AI Image Generation MCP

by jau123

generate_video

Destructive

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

TableJSON Schema
NameRequiredDescriptionDefault
tierNoOptional model tier. Use list_models for the selected model's live tier values.
waitNoMeiGen only: false returns the accepted generation ID immediately; poll check_generation separately. Default true waits for completion. Submit-only requires requestId.
modelNoVideo model ID. REQUIRED; call list_models for the live lineup and capabilities.
promptYesThe video generation prompt. Describe motion, scene, and style — not just the still image.
modelIdNoAlias of model. Provide at least one; both must match when supplied.
downloadNoSave 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.
durationNoVideo duration in seconds. Use list_models for the model's enum/range; when omitted the server uses the omitted-request default shown there.
lastFrameNoOptional 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.
requestIdNoPersistent 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.
firstFrameNoFirst-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.
resolutionNoOutput resolution. Use list_models for the selected model/tier's live values.
aspectRatioNoAspect ratio: "16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "auto", "adaptive" (model-dependent). Defaults to "auto" when omitted.
referenceVideoNoDeprecated single-clip alias of referenceVideos. Still accepted forever; when referenceVideos is also supplied it must equal its first entry. Prefer referenceVideos.
referenceAudiosNoReference 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.
referenceVideosNoReference 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.
referenceVideoDurationNoDeprecated compatibility hint. Ignored because the server probes the authoritative duration of every clip.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlsYes
errorNo
statusYes
dedupedNo
modelIdNo
successYes
imageUrlNo
providerNo
videoUrlNo
mediaTypeNo
requestIdNo
savedPathNo
nextActionNo
creditsUsedNo
generationIdNo
creditsStatusNo
receiptWarningNo
downloadWarningNo
observationEndedNo
pollAfterSecondsNo
requestedMediaTypeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv2.0.1
    • addedInput schema / properties / download
      Added value: +{
      +  "default": true,
      +  "description": "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.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / duration / description
      Previous value: -"Video duration in seconds. seedance-2-0 / happyhorse-1.0 currently accept ~3–15s (any integer in range). veo-3.1 accepts exactly 4, 6, or 8 (default 4) — other values will be rejected. Defaults to the model's default duration. Call list_models for the current allowed values per model."New value: +"Video duration in seconds. Use list_models for the model's enum/range; when omitted the server uses the omitted-request default shown there."
    • changedInput schema / properties / firstFrame / description
      Previous value: -"First-frame image to control where the video starts. Accepts public URL or local file path (auto-uploaded). REQUIRED for grok-video (image-to-video only — backend rejects it without a firstFrame). For seedance/happyhorse/veo it is optional: with no first frame they do pure text-to-video."New value: +"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."
    • changedInput schema / properties / lastFrame / description
      Previous value: -"Optional last-frame image to also control where the video ends. Used by seedance-2-0 and veo-3.1; happyhorse-1.0 ignores this field. Accepts public URL or local file path. Requires firstFrame to also be provided — passing lastFrame alone is rejected."New value: +"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."
    • changedInput schema / properties / model / description
      Previous value: -"Video model ID. Use list_models to see available video models. Common (as of writing): \"seedance-2-0\" (multi-tier general purpose), \"happyhorse-1.0\" (cost-effective i2v/t2v), \"veo-3.1\" (Google Veo with two tiers, 4/6/8s, native audio), \"grok-video\" (xAI Grok Imagine 1.5 — IMAGE-TO-VIDEO ONLY: firstFrame REQUIRED, pure text-to-video is rejected; native audio; 4-15s; 480p/720p)."New value: +"Video model ID. REQUIRED; call list_models for the live lineup and capabilities."
    • addedInput schema / properties / modelId
      Added value: +{
      +  "description": "Alias of model. Provide at least one; both must match when supplied.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / referenceAudios
      Added value: +{
      +  "description": "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.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
    • changedInput schema / properties / referenceVideo / description
      Previous value: -"Optional reference video URL for Seedance 2.0 \"video continuation\". Must be a publicly accessible HTTPS URL (typically a previous generation result `videoUrl`); local paths are not supported. Only seedance-2-0 accepts this — passing it with other models will fail. IMPORTANT — prompt requirement: to make the new clip semantically continue the reference, the `prompt` MUST explicitly say \"extend\" / \"continue\" (e.g. prefix with \"Extend this video with the following plot:\"). Without that, the model treats the video as visual reference only and the new clip may drift from a true continuation. Output behavior: the output is ONLY your `duration` seconds (4-15s) of new content — the reference video is NOT concatenated into the output. To get a single \"original + new\" clip the user must stitch them locally. Billing: credits are charged at the With-reference-video rate, with `billable_seconds = max(reference_duration + duration, min_billable[duration])`. Total cost is often higher than direct generation of the same output length. Always pass `referenceVideoDuration` alongside this field — omitting it causes underbilling and broken continuation behavior."New value: +"Deprecated single-clip alias of referenceVideos. Still accepted forever; when referenceVideos is also supplied it must equal its first entry. Prefer referenceVideos."
    • changedInput schema / properties / referenceVideoDuration / description
      Previous value: -"Duration of the reference video in seconds (typically 2–15 — backend validates the current allowed range). REQUIRED whenever `referenceVideo` is set; if omitted the backend treats it as 0, leading to undercharged credits and misconfigured generation. Pass the actual duration of the clip at `referenceVideo`."New value: +"Deprecated compatibility hint. Ignored because the server probes the authoritative duration of every clip."
    • addedInput schema / properties / referenceVideos
      Added value: +{
      +  "description": "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.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
    • addedInput schema / properties / requestId
      Added value: +{
      +  "description": "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.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • changedInput schema / properties / resolution / description
      Previous value: -"Output resolution. Common: \"480p\" / \"720p\" / \"1080p\" / \"4k\" (model-dependent; e.g. Seedance Pro adds 1080p and 4k, while Fast/Mini are 480p/720p only). Use list_models to see what each model supports. Higher resolutions cost more credits per second."New value: +"Output resolution. Use list_models for the selected model/tier's live values."
    • changedInput schema / properties / tier / description
      Previous value: -"Quality tier — only for models that support tiers. seedance-2-0 accepts \"mini\" (default, cheapest; 480p/720p, no reference video), \"fast\" (480p/720p), or \"pro\" (highest fidelity; native 1080p and 4K); veo-3.1 accepts \"fast\" (default) or \"pro\". Tiers may be added by the platform — call list_models to see what each model exposes."New value: +"Optional model tier. Use list_models for the selected model's live tier values."
    • addedInput schema / properties / wait
      Added value: +{
      +  "default": true,
      +  "description": "MeiGen only: false returns the accepted generation ID immediately; poll check_generation separately. Default true waits for completion. Submit-only requires requestId.",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "prompt",
      -  "model"
      -]New value: +[
      +  "prompt"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "creditsStatus": {
      +      "type": "string"
      +    },
      +    "creditsUsed": {
      +      "type": "number"
      +    },
      +    "deduped": {
      +      "type": "boolean"
      +    },
      +    "downloadWarning": {
      +      "type": "string"
      +    },
      +    "error": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "available": {
      +          "type": "number"
      +        },
      +        "code": {
      +          "type": "string"
      +        },
      +        "httpStatus": {
      +          "type": "number"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "required": {
      +          "type": "number"
      +        },
      +        "retryAfterSeconds": {
      +          "type": "number"
      +        },
      +        "retryable": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message",
      +        "retryable"
      +      ],
      +      "type": "object"
      +    },
      +    "generationId": {
      +      "type": "string"
      +    },
      +    "imageUrl": {
      +      "type": "string"
      +    },
      +    "mediaType": {
      +      "enum": [
      +        "image",
      +        "video"
      +      ],
      +      "type": "string"
      +    },
      +    "modelId": {
      +      "type": "string"
      +    },
      +    "nextAction": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "afterSeconds": {
      +          "type": "number"
      +        },
      +        "arguments": {
      +          "additionalProperties": {},
      +          "type": "object"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "tool": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "observationEnded": {
      +      "type": "boolean"
      +    },
      +    "pollAfterSeconds": {
      +      "type": "number"
      +    },
      +    "provider": {
      +      "enum": [
      +        "meigen",
      +        "openai",
      +        "comfyui"
      +      ],
      +      "type": "string"
      +    },
      +    "receiptWarning": {
      +      "type": "string"
      +    },
      +    "requestId": {
      +      "type": "string"
      +    },
      +    "requestedMediaType": {
      +      "enum": [
      +        "image",
      +        "video"
      +      ],
      +      "type": "string"
      +    },
      +    "savedPath": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "enum": [
      +        "processing",
      +        "completed",
      +        "failed",
      +        "error",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    },
      +    "urls": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "videoUrl": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "status",
      +    "urls"
      +  ],
      +  "type": "object"
      +}
  2. Changed4 schema fields changedv1.3.3
    • changedInput schema / properties / firstFrame / description
      Previous value: -"Optional first-frame image to control where the video starts. Accepts public URL or local file path (auto-uploaded). Highly recommended for image-to-video; with no first frame the model does pure text-to-video."New value: +"First-frame image to control where the video starts. Accepts public URL or local file path (auto-uploaded). REQUIRED for grok-video (image-to-video only — backend rejects it without a firstFrame). For seedance/happyhorse/veo it is optional: with no first frame they do pure text-to-video."
    • changedInput schema / properties / model / description
      Previous value: -"Video model ID. Use list_models to see available video models. Common (as of writing): \"seedance-2-0\" (multi-tier general purpose), \"happyhorse-1.0\" (cost-effective i2v/t2v), \"veo-3.1\" (Google Veo with two tiers, 4/6/8s, native audio)."New value: +"Video model ID. Use list_models to see available video models. Common (as of writing): \"seedance-2-0\" (multi-tier general purpose), \"happyhorse-1.0\" (cost-effective i2v/t2v), \"veo-3.1\" (Google Veo with two tiers, 4/6/8s, native audio), \"grok-video\" (xAI Grok Imagine 1.5 — IMAGE-TO-VIDEO ONLY: firstFrame REQUIRED, pure text-to-video is rejected; native audio; 4-15s; 480p/720p)."
    • changedInput schema / properties / resolution / description
      Previous value: -"Output resolution. Common: \"480p\" / \"720p\" / \"1080p\" (model-dependent). Use list_models to see what each model supports. Higher resolutions cost more credits per second."New value: +"Output resolution. Common: \"480p\" / \"720p\" / \"1080p\" / \"4k\" (model-dependent; e.g. Seedance Pro adds 1080p and 4k, while Fast/Mini are 480p/720p only). Use list_models to see what each model supports. Higher resolutions cost more credits per second."
    • changedInput schema / properties / tier / description
      Previous value: -"Quality tier — only for models that support tiers. seedance-2-0 and veo-3.1 currently accept \"fast\" (default, cheaper) or \"pro\" (higher fidelity). Tiers may be added by the platform — call list_models to see what each model exposes."New value: +"Quality tier — only for models that support tiers. seedance-2-0 accepts \"mini\" (default, cheapest; 480p/720p, no reference video), \"fast\" (480p/720p), or \"pro\" (highest fidelity; native 1080p and 4K); veo-3.1 accepts \"fast\" (default) or \"pro\". Tiers may be added by the platform — call list_models to see what each model exposes."
  3. Addedv1.3.1

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations only signal readOnlyHint=false and destructiveHint=true. The description goes further by disclosing credit consumption, the fact that reference audio is never billed, the concurrency limit of four submissions, and that backend quota/Retry-After are authoritative. It also clarifies output behavior — only configured duration, no concatenation — and that billing uses server-probed seconds, which is valuable beyond the annotation hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five dense sentences front-load the core action and then immediately cover dependencies, workflow submission, concurrency, and billing. The parentheticals are information-dense rather than padding, and each sentence contributes a distinct, necessary fact for a complex generation tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter tool with concurrency, billing, file-upload, and workflow-state constraints, the description covers all key decisions: model selection, reference handling, polling pattern, quota authority, and credit consumption. With an output schema present, not restating return values is appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the model, prompt, reference arrays, wait, download, and requestId semantics. The description restates key workflow conditions such as "Set requestId, wait=false and download=false" and "reference audio is never billed," but these are also present in the input schema. This matches the baseline where the schema carries the parameter-meaning burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with "Generate a MeiGen video" — a specific verb and resource that clearly distinguishes it from sibling tools like generate_image and generate_marketing_poster. It also names the required dependency on list_models for a live model ID, making the scope and prerequisite explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context for when to use the tool: after selecting a model via list_models, and for workflow submission with requestId, wait=false, download=false, followed by polling with check_generation. It does not explicitly compare against sibling tools or state when not to use it, so it stops short of a full alternatives statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.