Skip to main content
Glama

video_generate

视频生成(文生 / 图生 / 首尾帧 / 多参考媒体)

异步任务;状态和结果都通过 /openapi/v1/work/status 轮询获取(暂不支持 webhook 推送)。 model 必填;各模型的 duration / ratio / resolution / reference_* 取值和上限见请求体表格。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "video_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo必填。模型短名称,可选值和各自参数见请求体表格。
ratioNo取值集因 model 而异,详见请求体表格;没列取值的模型原样传给模型。
promptNo
durationNo视频时长(秒)。范围和默认值因 model 而异,越界的处理见请求体说明。
end_frameNo尾帧图片 URL
resolutionNo取值集因 model 而异,不传取表中第一个值,详见请求体表格。
callback_idNo自定义追踪 ID,会在 `/openapi/v1/work/status` 的结果里原样回传,用于对回你自己的业务单号(暂不支持 webhook 推送)
start_frameNo首帧图片 URL
idempotency_keyNo幂等键,相同 key 重复请求复用同一任务
reference_audiosNo
reference_imagesNo
reference_videosNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedInput schema / description
      Previous value: -"视频生成。文生视频时 `start_frame` / `end_frame` / `reference_*` 留空;\n图生视频时通过 `start_frame`(可叠加 `end_frame`)控制首尾帧;多参考媒体由 `reference_images` / `reference_videos` / `reference_audios` 携带。\n\n**各模型规则**(取值集与上限按模型而定,服务端校验为准):\n\n| model | duration | resolution | ratio | start/end_frame | reference_images | reference_videos | reference_audios | 备注 |\n|---|---|---|---|---|---|---|---|---|\n| `veo-3.1` | 4/6/8(默认 8) | 720p / 1080p / 4k | 16:9 / 9:16 | ≤2 | 无上限 | — | — | frame 与 reference 互斥 |\n| `kling-3.0` | 3~15(默认 8) | — | — | ≤2 | ≤1 | — | — | |\n| `grok` | 6/10(默认 6) | — | — | 不支持 | ≤1(作为首帧使用) | — | — | |\n| `seedance-2.0` | 4~15(默认 15) | 720p / 1080p | — | ≤2 | ≤9 | ≤3 | ≤3 | frame 与 reference 互斥;audio 需配 image/video |\n| `happyhorse-1.0` | 3~15(默认 5) | 720p / 1080p | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 | ≤1 | ≤9 | ≤1(有视频时图片改限 ≤5) | — | frame 与 reference 互斥 |\n"New value: +"视频生成。文生视频时 `start_frame` / `end_frame` / `reference_*` 留空;\n图生视频时通过 `start_frame`(可叠加 `end_frame`)控制首尾帧;多参考媒体由 `reference_images` / `reference_videos` / `reference_audios` 携带。\n\n**各模型规则**(取值集与上限按模型而定,服务端校验为准;resolution / ratio 列第一个值是不传时的默认值):\n\n| model | duration(秒) | resolution | ratio | start/end_frame | reference_images | reference_videos | reference_audios | 备注 |\n|---|---|---|---|---|---|---|---|---|\n| `seedance-2.5` | 4~30(默认 15);带 reference_videos 时可传 -1 | 720p / 480p / 1080p | 不限定,原样传给模型 | ≤2 | ≤30 | ≤10,合计 ≤30 秒 | ≤10,合计 ≤30 秒 | frame 与 reference 互斥 |\n| `seedance-2.0` | 4~15(默认 15) | 720p / 1080p / 480p / 4k | 不限定,原样传给模型 | ≤2 | ≤9 | ≤3,合计 ≤15 秒 | ≤3,合计 ≤15 秒 | frame 与 reference 互斥;audio 需配 image/video |\n| `seedance-2.0-mini` | 4~15(默认 15) | 720p / 480p | 不限定,原样传给模型 | ≤2 | ≤9 | ≤3,合计 ≤15 秒 | ≤3,合计 ≤15 秒 | 同 seedance-2.0 |\n| `veo-3.1` | 4 / 6 / 8(默认 8) | 720p / 1080p / 4k | 16:9 / 9:16 | ≤2 | ≤3 | — | — | frame 与 reference 互斥 |\n| `kling-3.0` | 3~15(默认 8) | 720p / 1080p / 4k | 不限定,原样传给模型 | ≤2 | ≤1 | — | — | |\n| `kling-4.0` | 3~30(默认 10) | 720p / 1080p | 16:9 / adaptive / 9:16 / 1:1 / 21:9 | ≤2 | ≤10 | ≤5,合计 ≤30 秒 | ≤3 | frame 与 reference 互斥;图 + 视频 + 音频合计 ≤15 个 |\n| `minimax-h3` | 4~15(默认 5) | 768p / 2k | 16:9 / adaptive / 21:9 / 4:3 / 1:1 / 3:4 / 9:16 | ≤2 | ≤9 | ≤3,合计 ≤15 秒 | ≤3,合计 ≤15 秒 | frame 与 reference 互斥;audio 需配 image/video |\n| `happyhorse-1.0` | 3~15(默认 5);带 reference_videos 时不生效 | 720p / 1080p | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 | ≤1 | ≤9 | ≤1,单条 3~15 秒(有视频时图片改限 ≤5) | — | frame 与 reference 互斥;带 reference_videos = 视频编辑:成片时长跟源片(≤15 秒),duration / ratio 不生效,按(源片秒 + 成片秒)计费,即源片秒(向上取整)× 2 × 有参单价 |\n| `happyhorse-1.1` | 同 happyhorse-1.0 | 720p / 1080p | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 9:21 / 21:9 | ≤1 | ≤9 | 同 happyhorse-1.0 | — | 同 happyhorse-1.0 |\n| `wan-3.0` | 2~30(默认 5);带 reference_videos 时可传 -1 | 720p / 480p / 1080p | 16:9 / adaptive / 9:16 / 1:1 / 4:3 / 3:4 | ≤2 | ≤10 | ≤5,合计 ≤15 秒 | ≤5,合计 ≤15 秒 | frame 与 reference 互斥 |\n| `wan-3.0-prime` | 同 wan-3.0 | 同 wan-3.0 | 同 wan-3.0 | ≤2 | ≤10 | ≤5,合计 ≤15 秒 | ≤5,合计 ≤15 秒 | wan-3.0 高速版,能力相同 |\n| `grok` | 6 / 10(默认 6) | 720p / 480p | 16:9 / 1:1 / 9:16(只对文生视频生效) | 不支持 | ≤7(作为首帧使用) | 本接口不支持 | — | |\n\n- `model` 必填,不扣积分的拒绝:不传返回 `ret=10000`,`msg` 为 `model is required; supported models: <可选值,逗号分隔>`;传了表里没有的值返回 `ret=10000`,`msg` 为 `unsupported model \"<传入值>\"; supported models: <可选值,逗号分隔>`。\n- `duration` 不传或传 0 取默认值;超出范围会被调到最近的上限 / 下限(`veo-3.1`、`grok` 传了不在可选值里的数取默认值),按调整后的秒数生成和计费。`-1` 表示时长跟参考视频走、按参考视频总时长计费,不带 `reference_videos` 时返回 `ret=10000`。\n- `resolution` 不传取表中第一个值;`1080p`、`2k`、`4k` 需要订阅身份(积分包用户不解锁)。表里列了 ratio 取值的模型,传其他值返回 `ret=10000`。\n- 参考视频 / 音频只收 http(s) URL;数量、单条或合计时长超限,提交时直接返回 `ret=10000`,不扣积分。\n"
    • changedInput schema / properties / callback_id / description
      Previous value: -"自定义追踪 ID,webhook URL 后台配置"New value: +"自定义追踪 ID,会在 `/openapi/v1/work/status` 的结果里原样回传,用于对回你自己的业务单号(暂不支持 webhook 推送)"
    • changedInput schema / properties / duration / description
      Previous value: -"视频时长(秒)。取值集 / 范围因 model 而异,详见请求体表格。"New value: +"视频时长(秒)。范围和默认值因 model 而异,越界的处理见请求体说明。"
    • changedInput schema / properties / model / description
      Previous value: -"模型短名称,省略时走服务端默认。"New value: +"必填。模型短名称,可选值和各自参数见请求体表格。"
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "veo-3.1",
      -  "kling-3.0",
      -  "grok",
      -  "seedance-2.0",
      -  "happyhorse-1.0"
      -]New value: +[
      +  "seedance-2.5",
      +  "seedance-2.0",
      +  "seedance-2.0-mini",
      +  "veo-3.1",
      +  "kling-3.0",
      +  "kling-4.0",
      +  "minimax-h3",
      +  "happyhorse-1.0",
      +  "happyhorse-1.1",
      +  "wan-3.0",
      +  "wan-3.0-prime",
      +  "grok"
      +]
    • changedInput schema / properties / model / example
      Previous value: -"veo-3.1"New value: +"seedance-2.5"
    • changedInput schema / properties / ratio / description
      Previous value: -"取值集因 model 而异,详见请求体表格。"New value: +"取值集因 model 而异,详见请求体表格;没列取值的模型原样传给模型。"
    • changedInput schema / properties / ratio / enum
      Previous value: -[
      -  "16:9",
      -  "9:16",
      -  "1:1",
      -  "4:3",
      -  "3:4"
      -]New value: +[
      +  "16:9",
      +  "9:16",
      +  "1:1",
      +  "4:3",
      +  "3:4",
      +  "4:5",
      +  "5:4",
      +  "21:9",
      +  "9:21",
      +  "adaptive"
      +]
    • changedInput schema / properties / resolution / description
      Previous value: -"仅部分模型支持;取值集因 model 而异,详见请求体表格。"New value: +"取值集因 model 而异,不传取表中第一个值,详见请求体表格。"
    • changedInput schema / properties / resolution / enum
      Previous value: -[
      -  "720p",
      -  "1080p",
      -  "4k"
      -]New value: +[
      +  "480p",
      +  "720p",
      +  "768p",
      +  "1080p",
      +  "2k",
      +  "4k"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the async task model, the polling endpoint, and the absence of webhook push. It also documents consequential behavior that the annotations do not cover, such as model-validation error codes, duration clamping and billing consequences, subscription gating for 1080p/2k/4k, and the rule that reference URLs must be http(s), with no credit charged when a request is rejected.

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 prose description is two short sentences plus a pointer to the per-model table, so it front-loads the essential facts (modes, async polling, model required). It is efficient, but it depends on a cross-reference to an external-"请求体表格" for the bulk of the constraints.

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 12-parameter, no-output-schema generation tool, the definition covers what an agent needs: modes, per-model limits, defaults, error behavior, billing, and how to retrieve results via work/status polling. The absence of an output schema is offset by the explicit polling instructions.

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?

With 67% schema description coverage, the description compensates well: it states that model is required and gives the exact rejection messages, explains duration defaulting/clamping and the special -1 semantics, gives resolution defaults, notes that ratio values are model-dependent, and defines frame-vs-reference mutual exclusivity. These are meanings that the schema does not convey.

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

Purpose4/5

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

The description opens with a specific verb and resource ("视频生成") and enumerates the supported modes: text-to-video, image-to-video, first/last-frame, and multi-reference media. That enumeration cleanly separates it from editing-oriented siblings such as video_edit or video_extend, but it never names or disclaims those siblings explicitly.

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?

It explains how to choose a mode through parameters (leave start_frame/end_frame/reference_* empty for text-to-video, use start_frame for image-to-video, and reference_images/videos/audios for multi-reference), and it states that results must be polled asynchronously. It does not say when to use this tool instead of video_edit, video_extend, or video_character_swap, leaving that choice to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources