Extend video
extend_videoExtend 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
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Reproducibility seed (Veo). | |
| wait | No | Default 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. | |
| model | No | Which 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. | |
| prompt | No | What should happen in the extended segment. Required for Veo, and for Grok custom mode (i.e. when video_preset is not set). | |
| task_id | Yes | task_id of the completed generation to extend. Extenders are model-internal: Veo extend works on Veo generations, Grok extend on Grok Imagine generations. | |
| extend_at | No | Grok custom mode: seconds into the source video where the extension begins. Required with prompt. | |
| base_model | No | Veo only: base model variant. Default 'fast'. | |
| callback_url | No | Optional 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_cost | No | Only 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_preset | No | Grok only: preset mode. When set, prompt/extend_at/extend_duration are ignored. | |
| extend_duration | No | Grok custom mode: extension length in seconds. Required with prompt. | |
| provider_options | No | Escape 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. |