MuseSpark
MuseSpark
Models & toolsVideo models

Veo 3.1 Fast API guide

Veo 3.1 Fast API: Generate video from text, image frames, or visual references with Veo 3.1 Fast. Select the appropriate generation_type and required image inputs for each scenario.

Model overview

Generate video from text, image frames, or visual references with Veo 3.1 Fast. Select the appropriate generation_type and required image inputs for each scenario.

API integration

DocumentationValue
API invocation identifierveo-3.1-fast
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

Select a mode to highlight its required inputs. Mode selection does not change the API field names.

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

promptstringNon-nullRequired

A nonempty text description of the video to generate.

Length: minimum 1.

image_urlsarray<string>Non-nullConditional

Required for First Frame, First and Last Frames, Image References.

Additional requirements depend on other values. See model rules.

Public HTTP(S) image URLs. Each image must be at most 10 MB, in JPEG, JPG, PNG, or WebP format. Frame mode accepts at most two images; reference mode at most three.

Item count: maximum 3.

generation_typestringNon-nullOptional

Video generation type: Frame (first/last frame to video) or Reference (reference image to video). If omitted, it is inferred from the number of images.

Allowed values: "frame", "reference".

resolutionstringNon-nullOptional

Video output resolution. Supports 720p (default), 1080p, and 4K. GIF output is limited to 720p.

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

Studio preset: "720p".

durationintegerNon-nullOptional

Video output duration in seconds. The model is fixed at 8 seconds.

Allowed values: 8.

Studio preset: 8.

aspect_ratiostringNon-nullOptional

Video output aspect ratio. Supports 16:9 (landscape) and 9:16 (portrait); defaults to 16:9.

Allowed values: "16:9", "9:16".

Studio preset: "16:9".

enable_gifbooleanNon-nullOptional

Whether to generate a GIF output as well. Disabled by default; GIF cannot be used with 1080p or 4K.

Studio preset: false.

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.

nsfw_checkbooleanNon-nullOptional

Whether to run content moderation before submitting the video task. Disabled by default.

Studio preset: false.

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

Model rules

Input modes

Select a mode by supplying its required public inputs. The mode identifier describes a documentation/form choice; do not send input_mode as a model parameter.

ModeRequired inputs
Text to VideoNo reference media required
First Frameimage_urls
First and Last Framesimage_urls
Image Referencesimage_urls
  • When enable_gif is true, use 720p for resolution.
  • When generation_type is "frame", keep image_urls, when supplied, at most 2 items.
  • When the input mode is Text to Video, omit image_urls.
  • When the input mode is First Frame, provide image_urls; use frame for generation_type; keep image_urls, when supplied, at least 1 and at most 1 items.
  • When the input mode is First and Last Frames, provide image_urls; use frame for generation_type; keep image_urls, when supplied, at least 2 and at most 2 items.
  • When the input mode is Image References, provide image_urls; use reference for generation_type; keep image_urls, when supplied, at least 1 and at most 3 items.

Parameter meaning

  • Veo 3.1 generation uses a fixed-duration request. Changing reference count does not request a longer video.

Dependencies

  • Frame control and subject-reference generation are distinct modes. Their image counts and model-variant support differ.
  • GIF output cannot be combined with the high-resolution video tiers for this integration.

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.

Text to Video

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-fast",
  "parameters": {
    "duration": 8,
    "batch_size": 1,
    "enable_gif": false,
    "nsfw_check": false,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "prompt": "A paper city under soft morning light"
  }
}'

Parameters used: duration · batch_size · enable_gif · nsfw_check · resolution · aspect_ratio · prompt.

First Frame

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-fast",
  "parameters": {
    "duration": 8,
    "batch_size": 1,
    "enable_gif": false,
    "nsfw_check": false,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "prompt": "A paper city under soft morning light",
    "image_urls": [
      "https://example.com/input-1.png"
    ]
  }
}'

Parameters used: duration · batch_size · enable_gif · nsfw_check · resolution · aspect_ratio · prompt · image_urls.

First and Last Frames

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-fast",
  "parameters": {
    "duration": 8,
    "batch_size": 1,
    "enable_gif": false,
    "nsfw_check": false,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "prompt": "A paper city under soft morning light",
    "image_urls": [
      "https://example.com/input-1.png",
      "https://example.com/input-2.png"
    ]
  }
}'

Parameters used: duration · batch_size · enable_gif · nsfw_check · resolution · aspect_ratio · prompt · image_urls.

Image References

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-fast",
  "parameters": {
    "duration": 8,
    "batch_size": 1,
    "enable_gif": false,
    "nsfw_check": false,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "prompt": "A paper city under soft morning light",
    "image_urls": [
      "https://example.com/input-1.png"
    ]
  }
}'

Parameters used: duration · batch_size · enable_gif · nsfw_check · resolution · aspect_ratio · prompt · image_urls.

Output

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.