MuseSpark
MuseSpark
Models & toolsVideo models

Veo 3.1 Extend API guide

Veo 3.1 Extend API: Continue a source video using a prompt with Veo 3.1 Extend. Check source-video requirements and the mode and resolution controls before extending a clip.

Model overview

Continue a source video using a prompt with Veo 3.1 Extend. Check source-video requirements and the mode and resolution controls before extending a clip.

API integration

DocumentationValue
API invocation identifierveo-3-1-extend
IntegrationAsync task API

Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.

Request parameters

Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.

videostringNon-nullRequired

A Veo-generated input video. Each request adds a fixed 7-second extension and is billed once, independent of the original video duration.

promptstringNon-nullRequired

The positive prompt for the generation.

modestringNon-nullOptional

Sets mode for this item.

Allowed values: "base", "fast".

Studio preset: "fast".

resolutionstringNon-nullOptional

Video resolution.

Allowed values: "720p", "1080p".

Studio preset: "1080p".

negative_promptstringNon-nullOptional

The negative prompt for the generation.

batch_sizeintegerNon-nullOptional

Standard quantity control field. The allowed range for this item is 1-4.

Repeats MuseSpark execution within one logical task. This is separate from a model-native output count.

Value: minimum 1; maximum 4.

Studio preset: 1.

seedintegerNon-nullOptional

The random seed to use for the generation.

Studio preset: 1.

No parameters match. Clear the search or reset the filters.

Model rules

Parameter meaning

  • Describe the continuation rather than restating the entire original video. Extension must preserve the source video's model identity.
  • Use negative_prompt for unwanted content and seed to select generation randomness. For this integration, seed ranges from -1 through 2147483647; retain any narrower field constraints shown above.

Dependencies

  • Extend a clip originally produced by Veo 3.1. Describe the next action, camera movement and continuity cues in prompt. Source footage must be Veo-generated for this extension mode.

Reference media

  • For this extension mode, input clips must be 16:9 or 9:16 at 720p or 1080p. Preserve the source aspect ratio and choose a declared resolution.

Integration notes

Use the following field formats and values in MuseSpark requests.

  • mode: Select the declared mode=base or fast. Use the API invocation identifier shown above when creating the task.

batch_size controls repeated MuseSpark executions. Output grouping, sequential image generation, and video shot count are separate concepts.

Request examples

Replace example media URLs and YOUR_... input identifiers with your own valid resources. Examples are checked against the exported item schema; media access and paid execution are separate runtime checks.

Set MUSESPARK_API_KEY and a stable MUSESPARK_REQUEST_ID before submitting. Preserve the request ID for retries of the same request and use a new ID for new work. Python examples use requests; JavaScript examples use Node.js 20 or later. The standalone Quickstart includes task polling and recovery.

Standard request

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "veo-3-1-extend",
  "parameters": {
    "mode": "fast",
    "seed": 1,
    "batch_size": 1,
    "resolution": "1080p",
    "video": "YOUR_VIDEO",
    "prompt": "A paper city under soft morning light"
  }
}'

Parameters used: mode · seed · batch_size · resolution · video · prompt.

Output

Each extension adds 7 seconds and returns one merged clip containing the original and new footage. For this integration, input is limited to 141 seconds and the combined output to 148 seconds.

Creation returns a task ID inside data. Poll that task until completion, then save data.result.output_urls and any data.result.batch_results. See the task lifecycle for terminal states, result retention, and errors.

Troubleshooting

For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.

If creation times out, preserve the request identity and any known task ID. Follow Errors, timeouts and retries before submitting again.

The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.