Skip to main content
Glama

Extend video

extend_video
Destructive

Extend a completed AI-generated video using its own model's extender by passing the task_id; add a new segment with a prompt or preset for Veo and Grok.

Instructions

Extend a previously generated video by its own model's extender (pass the task_id of the completed generation). Veo (default): requires prompt; aspect ratio is inherited. For a longer extension, try extending the extend-result's task_id again — chaining is not officially documented, so if it fails, regenerate at the target length instead. Grok: extends a Grok Imagine video — either preset mode (video_preset) or custom mode (prompt + extend_at + extend_duration). Extenders only work on their own model's generations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoReproducibility seed (Veo).
waitNoDefault true: wait for the job and return the finished result. Set false to get the task_id back immediately and poll with get_task — use for long jobs (high-quality video, full songs) or when the connection might time out.
modelNoWhich extender, as an alias or full id: 'veo' / 'google/veo-3.1-extend' (default, adds 8s) or 'grok' / 'xai/grok-imagine-video-extend'. Each only continues its OWN model's generations: Grok extend needs a task_id from xai/grok-imagine-video — NOT from xai/grok-imagine-1.5-video, which cannot be extended. See list_models.
promptNoWhat should happen in the extended segment. Required for Veo, and for Grok custom mode (i.e. when video_preset is not set).
task_idYestask_id of the completed generation to extend. Extenders are model-internal: Veo extend works on Veo generations, Grok extend on Grok Imagine generations.
extend_atNoGrok custom mode: seconds into the source video where the extension begins. Required with prompt.
base_modelNoVeo only: base model variant. Default 'fast'.
callback_urlNoOptional webhook URL. When set, the tool returns immediately with the task_id and UnificAlly POSTs the result to this URL when the task finishes. Webhook body: { task_id, status: 'completed'|'failed', data: { video_url | image_url | audio_url | ... }, error_message? } — note the media arrives under 'data', not 'output'. Use for long jobs instead of waiting.
confirm_costNoOnly relevant if the operator enabled a spend guard. When a call exceeds the configured confirm threshold it returns a quote; retry with confirm_cost: true to proceed. Safe to ignore otherwise.
video_presetNoGrok only: preset mode. When set, prompt/extend_at/extend_duration are ignored.
extend_durationNoGrok custom mode: extension length in seconds. Required with prompt.
provider_optionsNoEscape hatch for model-specific fields not exposed as named parameters (e.g. Kling multi_shots, Flux steps). Merged into the API 'input' payload. Rejected: fields the tool already manages (prompt, media URLs, task_id, ...) and reserved routing/billing/auth keys (model, callback_url, dry_run, api_key, authorization) — switch models with the 'model' parameter, not here. See https://docs.unifically.com for per-model fields.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the mutating/destructive/non-idempotent profile, so the description earns credit for adding real context: chaining is undocumented and may fail, extenders are model-internal, aspect ratio is inherited, and Veo requires a prompt. The main gap is it doesn't address cost or what a successful call returns in narrative form.

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?

Front-loads the core purpose and mode differences in a compact span with little filler. Slight redundancy remains (the own-model constraint is restated in both the description and the task_id schema), but every sentence carries actionable content.

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 12-parameter, no-output-schema mutation tool with nested provider_options, this covers model selection, mode requirements, failure fallback, and inheritance rules well. It leaves the async/wait behavior mostly to the schema, which documents it thoroughly, so nothing critical is missing.

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 the baseline is 3, but the description adds value by grouping parameters into model-specific modes (Veo requires prompt; Grok custom mode requires prompt + extend_at + extend_duration) and noting inherited aspect ratio — synthesis the schema alone doesn't provide.

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+resource (extend a previously generated video) and immediately scopes it with the model-internal constraint. It is clearly distinguishable from generate_video and edit_video siblings by being an extension of an existing generation via task_id.

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?

Gives concrete conditions: pass the task_id of a *completed* generation, use prompt for Veo, preset vs custom for Grok, and it explicitly warns about the undocumented chaining case with a fallback ('regenerate at the target length'). It does not explicitly name sibling alternatives (edit_video/generate_video), so it stops short of full alternative routing.

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