Skip to main content
Glama

generate_video

Generate AI videos from text prompts or reference images through kie.ai, estimate credit cost before submission, run long jobs asynchronously, and save results to a chosen directory.

Instructions

Generate a video using kie.ai (85+ models). Downloads to kie/assets/raw/. MODEL GUIDE: Best cinematic→veo-3/text-to-video (50cr/s, audio). Fast+cheap→grok-imagine-video-1-5-preview (1.6-3cr/s, audio, NEW), wan/flash-image-to-video (6-8cr/s measured; alias of wan/2-6-flash). Budget cinematic→hailuo-standard (4cr/s). First→last-frame or anything-from-anything refs→gemini-omni/flash-1-1 (NEW, est. ~63cr per 4s clip). Budget multimodal refs→bytedance/seedance-2-mini (9.5cr/s @480p). 30s single takes→bytedance/seedance-2-5 (now up to 1080p; set model_options.draft=true for a 28cr/s 480p preview, then upgrade the approved take with bytedance/seedance-2-5-draft). Cheap or 4K image-to-video with audio→vidu-q4/image-to-video (7.2cr/s @540p … 62.4 @4K, NEW); 15-image refs→vidu-q4/reference-to-video. Budget all-rounder w/ audio+templates+extend→pixverse-v6 family (4-9.6cr/s, NEW; I2V is its strength; transition=first/last-frame morph). Higher-quality PixVerse without templates→pixverse-v6-max T2V/I2V (NEW, 8.8cr/s @720p). Multilingual lip-synced dialogue→happyhorse-1-1 T2V/I2V/R2V (NEW). 2K + stereo audio→minimax-h3 (8cr/s @768P, price halved Sept 2026). Per-shot scripted multi-shot→kling-3-omni (14cr/s @720p; transformation=restyle existing video). Long consistent-character clips (3-30s) with named @subjects, voices and reference videos→kling-4/reference-to-video (NEW, 28.5cr/s @720p); first→keyframes→last animation→kling-4/keyframe-to-video (NEW). Next-gen Wan draft→wan/3-0-video (8cr/s @480P, NEW). Fast Kling→kling/v3-turbo (18cr/s, audio, NEW). Image-to-video→veo-3/image-to-video (include a sound cue like "SFX: room tone" — Veo I2V intermittently fails its audio pass without one; images must be served with their real Content-Type, upload via upload_file), kling/image-to-video. Avatar/talking head→omnihuman-2-0 (NEW Oct 2026: 14cr/s, up to 5-min audio, half of 1.5's price), omnihuman-1-5 (multi-person masks, 1080p), kling/ai-avatar-pro, infinitalk/from-audio. Re-dub existing footage→volcengine/video-to-video-lip-sync (8cr/s, NEW). Motion control→kling/motion-control, wan/animate-move. Extend video→use veo_extend or runway_extend tools. NOTE: Sora 2 family removed (OpenAI API sunset Sept 2026). Use list_models filter="use-case" to explore.

Input Schema

NameRequiredDescriptionDefault
waitNoSet false to submit and return immediately with the task_id (async mode) — then poll with check_task and fetch with download_result. Recommended for long generations to avoid client-side watchdog timeouts.
modelNoModel ID (e.g. "veo-3/text-to-video", "kling/image-to-video", "wan/3-0-video")veo-3/text-to-video
promptYesVideo description prompt
filenameNoOutput filename (saved to kie/assets/raw/). Auto-generated if omitted.
image_urlsNoInput image URLs for image-to-video models
max_creditsNoRefuse to submit if the estimated cost exceeds this many credits (overrides KIE_MAX_CREDITS_PER_CALL). Estimates come from published rates; kie bills the actual amount.
aspect_ratioNoAspect ratio: 16:9, 9:16, or 1:116:9
download_dirNoAbsolute directory to save the file(s) into (created if missing). Defaults to the server's kie/assets/raw/. Must be absolute — the MCP server's working directory is not the caller's.
estimate_onlyNoReturn the estimated credit cost WITHOUT submitting anything. Use before expensive runs (video, 4K, 1080p upgrades, layer splits).
model_optionsNoModel-specific options (duration, resolution, mode, etc.)
max_wait_secondsNoOverride the blocking-mode polling budget in seconds (defaults: image 600, video 900, audio 300, speech 300). Ignored when wait=false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv5.8.0
    • addedInput schema / properties / estimate_only
      Added value: +{
      +  "description": "Return the estimated credit cost WITHOUT submitting anything. Use before expensive runs (video, 4K, 1080p upgrades, layer splits).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / max_credits
      Added value: +{
      +  "description": "Refuse to submit if the estimated cost exceeds this many credits (overrides KIE_MAX_CREDITS_PER_CALL). Estimates come from published rates; kie bills the actual amount.",
      +  "type": "number"
      +}
  2. Changed1 schema field changedv5.3.0
    • changedInput schema / properties / model / description
      Previous value: -"Model ID (e.g. \"veo-3/text-to-video\", \"sora/text-to-video\", \"kling/image-to-video\")"New value: +"Model ID (e.g. \"veo-3/text-to-video\", \"kling/image-to-video\", \"wan/3-0-video\")"
  3. First observedv4.7.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the credit-spend model (per-second rates, per-clip estimates), that files are written to kie/assets/raw/, and real failure modes (Veo I2V intermittently failing its audio pass without a sound cue; images must be served with real Content-Type via upload_file). It stops short of stating concurrency limits, retry/refund behavior, or what happens to credits on a failed job.

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

Conciseness3/5

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

The core action and output path are front-loaded, and most model entries earn their place as routing data. However, the body is a dense arrow-delimited wall of ~20 model blurbs with embedded pricing and changelog notes ("price halved Sept 2026", "Sora 2 family removed") that are hard to scan and arguably belong in list_models output rather than a tool description.

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

Completeness4/5

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

For an 11-parameter tool with a nested model_options object, no annotations and no output schema, the description supplies the cost model, the sync-vs-async escape hatch, model selection guidance, and the destination path. The remaining gap is that model_options keys and per-model required inputs (e.g. which models need image_urls) are left implicit.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds genuine meaning: it explains model_options.draft=true for a cheap 480p preview before upgrading, recommends estimate_only before expensive runs, and notes max_credits overrides KIE_MAX_CREDITS_PER_CALL with kie billing the actual amount. It does not enumerate what keys model_options accepts per model.

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?

States a specific verb and resource ("Generate a video using kie.ai (85+ models)") and immediately names the output destination (kie/assets/raw/). It also routes sibling cases away explicitly ("Extend video→use veo_extend or runway_extend tools"), so an agent can distinguish it from generate_image and the extend tools without opening any schema.

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

Usage Guidelines5/5

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

Provides an explicit use-case→model mapping (cinematic, budget, first/last-frame, lip-sync, motion control, extend) with per-model cost and capability notes, plus explicit when-not guidance pointing to veo_extend/runway_extend and list_models for exploration. Alternatives are named with the conditions that select them.

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