MuseSpark
MuseSpark
Models & toolsImage models

Wan 2.7 Image API guide

Wan 2.7 Image API: Generate images from text or image references with Wan 2.7 Image. The public request includes thinking, sequential-generation, color-palette, and region controls; check their combinations in the model rules.

Model overview

Generate images from text or image references with Wan 2.7 Image. The public request includes thinking, sequential-generation, color-palette, and region controls; check their combinations in the model rules.

API integration

DocumentationValue
API invocation identifierwan-2.7-image
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-nullConditional

Additional requirements depend on other values. See model rules.

Sets prompt for this item.

Length: maximum 5000.

image_urlsarray<string>Non-nullConditional

Required for Reference to Image.

Additional requirements depend on other values. See model rules.

List of input image URLs.

Item count: maximum 9.

modestringNon-nullRequired

Choose the generation capability.

Allowed values: "standard", "pro".

Studio preset: "standard".

thinking_modebooleanNon-nullOptional

Enable reasoning for text-to-image generation. Reference-image or sequential generation does not use this control.

Studio preset: true.

resolutionstringNon-nullOptional

Sets resolution for this item.

Allowed values: "1K", "2K".

Studio preset: "2K".

aspect_ratiostringNon-nullOptional

Output image aspect ratio. Resolution controls the output detail tier.

Allowed values: "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3".

negative_promptstringNon-nullOptional

Only an empty string is accepted for this item. Omit negative_prompt or leave it empty; negative prompting is unavailable.

Allowed values: "".

batch_sizeintegerNon-nullOptional

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

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

Value: minimum 1; maximum 15.

Studio preset: 1.

enable_sequentialbooleanNon-nullOptional

Enable coherent sequential-image generation. Each generation currently requests one output image.

Studio preset: false.

nsfw_checkbooleanNon-nullOptional

Pre-generation content checks are unavailable for the selected provider. Omit this option or leave it false.

Allowed values: false.

color_palettearray<object>Non-nullOptional

Custom color theme; standard mode only (not sequential mode). Ratio values across all entries must sum to exactly 100.00%.

Item count: minimum 3; maximum 10.

watermarkbooleanNon-nullOptional

Sets watermark for this item.

Studio preset: false.

seedintegerNon-nullOptional

Sets seed for this item.

Value: minimum 0; maximum 2147483647.

bbox_listarray<array>Non-nullOptional

Editing regions aligned with image_urls: [[[x1,y1,x2,y2],...],...]. Use [] for an image without a box. At most 9 images and 2 boxes per image; every box contains 4 numeric absolute-pixel coordinates. The outer array must match image_urls length. Coordinates and image bounds remain subject to provider validation.

Item count: maximum 9.

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 ImageNo reference media required
Reference to Imageimage_urls
  • When the input mode is Text to Image, provide prompt.
  • When enable_sequential is true, omit color_palette.
  • When the input mode is Text to Image, provide prompt; omit image_urls.
  • When the input mode is Reference to Image, provide image_urls; keep image_urls, when supplied, at least 1 items.
  • When image_urls is omitted, provide prompt; keep prompt, when supplied, at least 1.

Parameter meaning

  • Editing follows the aspect ratio of the last reference image. Array ordering therefore affects composition.
  • A custom palette describes weighted colors. Its weights must sum to the required total, and sequential generation has different palette support.

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 Image

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": "wan-2.7-image",
  "parameters": {
    "mode": "standard",
    "watermark": false,
    "batch_size": 1,
    "resolution": "2K",
    "thinking_mode": true,
    "enable_sequential": false,
    "prompt": "A paper city under soft morning light"
  }
}'

Parameters used: mode · watermark · batch_size · resolution · thinking_mode · enable_sequential · prompt.

Reference to Image

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": "wan-2.7-image",
  "parameters": {
    "mode": "standard",
    "watermark": false,
    "batch_size": 1,
    "resolution": "2K",
    "thinking_mode": true,
    "enable_sequential": false,
    "prompt": "A paper city under soft morning light",
    "image_urls": [
      "https://example.com/input-1.png"
    ]
  }
}'

Parameters used: mode · watermark · batch_size · resolution · thinking_mode · enable_sequential · 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.