Skip to main content
Glama

generate_video

Generate videos from text prompts or starting images, with options for duration, resolution, and aspect ratio. Supports async processing, returning a task ID for later status checks.

Instructions

视频生成:文生视频或图生视频(DashScope 万相异步任务)。

生成耗时较长(通常 1-10 分钟)。默认阻塞等待完成;若超时或被中断, 可用返回的 task_id 通过 get_video_status 继续查询。

Args: prompt: 视频内容描述(支持分镜头描述,如 "第1个镜头... 第2个镜头...")。 model: 模型名。默认 wan2.6-t2v;图生视频用 wan2.5-i2v-preview / wan2.6-i2v 等。 image: 图生视频的首帧图片(本地路径 / URL / data: URL;文生视频留空)。 duration: 视频时长(秒),2-15 之间。 size: 分辨率 "宽x高"(如 "1280x720",wan2.5/2.6 系列)。 resolution: 分辨率档位 480P/720P/1080P(wan2.7 系列)。 ratio: 画幅比例(如 "16:9"、"9:16"、"1:1",wan2.7 系列)。 seed: 随机种子。 negative_prompt: 反向提示词。 prompt_extend: 是否开启提示词智能改写。 watermark: 是否添加水印(默认随模型)。 shot_type: 镜头类型(如 "multi" 多镜头,wan2.6 支持)。 wait: 是否阻塞等待任务完成(默认 true;false 立即返回 task_id)。 output_dir: 本地保存目录(相对路径相对于全局输出目录)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
sizeNo
waitNo
imageNo
modelNo
ratioNo
promptYes
durationNo
shot_typeNo
watermarkNo
output_dirNo
resolutionNo
prompt_extendNo
negative_promptNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full responsibility. It discloses the async nature, long generation time (1-10 minutes), blocking wait behavior, and the ability to continue via get_video_status. It does not mention rate limits or authentication, but core behavioral traits are well covered.

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 lengthy but well-structured: a brief summary, async behavior note, then a labeled Args list. Each parameter line is concise. No redundant fluff, though the length is justified given the number of parameters.

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 a complex tool with 14 parameters and multiple model families, the description covers the async workflow, parameter semantics, and the relationship with get_video_status. An output schema exists, so return format details are not required. Minor gaps around error handling or prerequisites, but overall complete enough for correct selection and invocation.

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?

Schema description coverage is 0%, so the description fully compensates by explaining every parameter's meaning, constraints (e.g., duration 2-15, size '1280x720'), and model-specific differences (wan2.5/2.6 vs 2.7). This is comprehensive and directly actionable, exceeding schema expectations.

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?

Description explicitly states '视频生成:文生视频或图生视频', identifying the verb and resource clearly. It distinguishes from siblings like generate_image (image generation) and edit_image, and references get_video_status for querying, making the tool's scope unambiguous.

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?

Provides clear workflow guidance: default blocks until completion, and if timeout/interrupted, use get_video_status with the returned task_id. Parameter explanations also include context for choosing between text-to-video and image-to-video models. However, there is no explicit 'when not to use this tool' beyond inferring from alternatives.

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/smjda0719/dsh-image-generate'

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