Skip to main content
Glama

Generate Video with Replicate

replicate_generate_video

Generate a video clip from a text prompt, optionally using a starting image for image-to-video generation.

Instructions

Generate a video clip from a text prompt (and optionally a starting image). Video generation is slow — typically 1-5 minutes per clip.

DISPLAY REQUIREMENT — after this tool returns successfully, include the URL(s) printed in the tool's text content so the user can open the video. URLs expire in ~24h.

Args:

  • prompt (string): Text description of the video.

  • model (string, default "kling-pro"): Curated key (kling-pro, minimax-video, hunyuan-video, luma-ray, wan-2.2, grok-video, seedance) or "owner/name[:version]".

  • image_url (string, optional): Starting frame for image-to-video. Not all models support this.

  • duration_seconds (1-60, optional): Desired duration. Model-dependent.

  • aspect_ratio ("16:9" | "9:16" | "1:1", optional): Aspect ratio.

  • extra_input (object, optional): Additional model-specific inputs.

  • download (boolean, default true): Download the MP4 locally.

  • timeout_ms: Max wait. Default 300000 (5min). For very long videos, increase or rely on the pending+poll flow.

Returns: PredictionResult (see replicate_generate_image for shape). The local_paths will contain .mp4 files when downloaded.

Tip: If timeout_ms is exceeded, the result will have pending=true and a prediction_id. Wait a minute, then call replicate_get_prediction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoEither a curated key (kling-pro, minimax-video, hunyuan-video, luma-ray, wan-2.2, grok-video, seedance) or a Replicate identifier.kling-pro
promptYesText prompt describing the video.
downloadNoWhether to download the generated files locally. Default true. When false, only Replicate URLs are returned (URLs expire after ~24h).
image_urlNoOptional starting image URL for image-to-video. Not all models support this — check model schema.
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).
extra_inputNoAdditional model-specific inputs.
aspect_ratioNoAspect ratio.
duration_secondsNoDesired duration in seconds. Model-dependent.
Behavior5/5

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

The description discloses key behaviors beyond annotations: video generation is slow (1-5 min), URLs expire in ~24h, timeout handling returns pending=true and prediction_id for polling, and download defaults to true. Annotations only indicate readOnlyHint=false and openWorldHint=true; the description adds critical operational details.

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

Conciseness4/5

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

The description is well-structured: purpose first, then display requirement, then parameters in list form, then returns, then tip. It is somewhat long but every sentence adds value. Minor redundancy in parameter listing (mirrors schema) could be trimmed but still functional.

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?

Given 8 parameters (1 required) and no output schema, the description covers the async workflow, timeout and polling, download behavior, and display requirement. It references the return shape from replicate_generate_image, which is acceptable. The tips for handling long videos complete the picture.

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%, providing detailed parameter descriptions. The description adds value by explaining the model parameter format ('owner/name[:version]'), noting image_url support varies by model, and advising on timeout_ms for long videos. This operational context goes beyond the 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 it generates a video clip from a text prompt and optionally an image. The verb 'generate' and resource 'video' are specific. It distinguishes from siblings (e.g., replicate_generate_image, replicate_generate_audio) by focusing on video generation.

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

Usage Guidelines3/5

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

The description implies the tool is for video generation, but it does not explicitly compare it to alternatives like replicate_generate_image or replicate_run_model. There is no 'when-to-use' or 'when-not-to-use' guidance. The tip about polling after timeout is useful post-call, not for initial decision.

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/sena-labs/replicate-mcp-server'

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