Skip to main content
Glama

generate_video

Generate a video from an image and a text prompt using AI, with customizable duration, size, and style parameters.

Instructions

Generate a video using WaveSpeed AI.

Args:
    image (str): Required. URL, base64 string, or local file path of the input image to animate.
    prompt (str): Required. Text description of the video to generate. MUST BE IN ENGLISH. Non-English prompts will be rejected or result in poor quality outputs.
    model (str, optional): Model to use for video generation.
    negative_prompt (str, optional): Text description of what to avoid in the video. Default: "".
    loras (list, optional): List of LoRA models to use, each with a path and scale. Format: [{"path": "model_path", "scale": weight_value}]. Default: [].
    size (str, optional): Size of the output video in format "width*height". Default: "832*480".
    num_inference_steps (int, optional): Number of denoising steps. Higher values improve quality but increase generation time. Default: 30.
    duration (int, optional): Duration of the video in seconds. Must be either 5 or 10. Default: 5.
    guidance_scale (float, optional): Guidance scale for text adherence. Controls how closely the video matches the text description. Default: 5.
    flow_shift (int, optional): Shift of the flow in the video. Affects motion intensity. Default: 3.
    seed (int, optional): Random seed for reproducible results. Set to -1 for random. Default: -1.
    enable_safety_checker (bool, optional): Whether to enable safety filtering. Default: True.
    output_directory (str, optional): Directory to save the generated video. Uses a temporary directory if not provided.
    request_id (str, optional): Request correlation ID for tracing the entire request chain. Strongly recommended to provide a unique ID (e.g., UUID) to correlate logs across the request lifecycle.

Returns:
    WaveSpeedResult object with the result of the video generation, containing:
    - status: "success" or "error"
    - urls: List of video URLs if successful
    - base64: List of base64 encoded videos if resource_mode is set to base64
    - local_files: List of local file paths if resource_mode is set to local
    - error: Error message if status is "error"
    - processing_time: Time taken to generate the video(s)
    
Examples:
    Basic usage: generate_video(image="https://example.com/image.jpg", prompt="The dog running through a forest")
    Advanced usage: generate_video(
        image="/path/to/local/image.jpg", 
        prompt="The dog running through a forest", 
        duration=10,
        negative_prompt="blurry, low quality"
    )
    
Note: 
    IMPORTANT: Prompts MUST be in English. The system only processes English prompts properly.
    Non-English prompts will be rejected or produce low-quality results. If user input is not in English,
    you MUST translate it to English before passing to this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYes
promptYes
modelNo
negative_promptNo
lorasNo
sizeNo832*480
num_inference_stepsNo
durationNo
guidance_scaleNo
flow_shiftNo
seedNo
enable_safety_checkerNo
output_directoryNo
request_idNo
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: it describes the generation process, parameter effects (e.g., guidance_scale controls text adherence, num_inference_steps affects quality/time), return values (status, urls, base64, local_files, error, processing_time), and even notes on language handling. No contradictions.

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?

The description is appropriately structured with sections for Args, Returns, Examples, and Notes. Every sentence is informative; no filler. Despite length, it is clear and front-loaded with essential info (language requirement).

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 tool with 14 parameters and no output schema, the description covers all parameters, return types, and examples. It also provides critical notes (English-only, safety checker). No gaps remain given the complexity.

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

Parameters5/5

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

The schema has 0% description coverage (only titles), but the description compensates by explaining each parameter's purpose, format, and defaults (e.g., loras format, size format, duration constraints). This adds significant value beyond the raw schema.

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?

The description clearly states the tool generates a video using WaveSpeed AI, specifying required inputs (image and prompt). The verb 'generate' and resource 'video' are precise, and the name 'generate_video' aligns. Siblings are different (image-to-image, text-to-image), so purpose is well-distinguished.

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?

The description provides explicit usage guidance: prompts must be English, duration must be 5 or 10, and includes examples. However, it does not explicitly compare with sibling tools or state when not to use this tool (e.g., for text-only video generation without an image).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/honeyvig/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server