MuseSpark
MuseSpark
Models & toolsImage models

Flux 3 Image API guide

Flux 3 Image API: Generate images from text or edit reference images with Flux 3 Image. Control the resolution and aspect ratio, and use the grounding option where needed by your request.

Model overview

Generate images from text or edit reference images with Flux 3 Image. Control the resolution and aspect ratio, and use the grounding option where needed by your request.

API integration

DocumentationValue
API invocation identifierflux-3-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-nullRequired

Describe the image or reference-image edit with a nonblank prompt. Use positive instructions; negative prompts are unsupported.

Length: minimum 1.

imagesarray<string>Non-nullConditional

Required for Image Editing and References.

Additional requirements depend on other values. See model rules.

One to ten public HTTP(S) image URLs or complete PNG, JPEG, or WebP Base64 Data URLs. Omit this field for text-to-image. URLs must have a host and no embedded credentials.

Item count: minimum 1; maximum 10.

Media types: image/jpeg, image/png, image/webp.

resolutionstringNon-nullOptional

Default 1k; 768 aliases 768sq.

Allowed values (11)

Allowed values: "768sq", "768SQ", "768", "1k", "1K", "1.5k", "1.5K", "2k", "2K", "4k", "4K".

Studio preset: "1K".

aspect_ratiostringNon-nullOptional

Choose the output aspect ratio. Auto selects the image shape automatically.

Allowed values (16)

Allowed values: "21:9", "2:1", "16:9", "3:2", "7:5", "4:3", "5:4", "1:1", "4:5", "3:4", "5:7", "2:3", "9:16", "1:2", "9:21", "auto".

Studio preset: "1:1".

groundingbooleanNon-nullOptional

Allow web or image search before generation.

batch_sizeintegerNon-nullOptional

MuseSpark batch count; each child task requests one provider output.

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

Value: minimum 1; maximum 15.

Studio preset: 1.

safety_toleranceintegerNon-nullOptional

Content safety tolerance from 0 to 4; 0 is strictest.

Value: minimum 0; maximum 4.

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
Image Editing and Referencesimages
  • When the input mode is Text to Image, omit images.
  • When the input mode is Image Editing and References, provide images; keep images, when supplied, at least 1 items.

Parameter meaning

  • Describe desired content positively. Layout tags and bounding-box instructions belong in the prompt; a separate negative prompt is not part of this model guide.
  • Use ordered references for editing or multi-image composition. Keep the prompt explicit about which reference provides each subject or visual element.

Dependencies

  • Choose an aspect ratio for shape and a resolution tier for size. Pixel-dimension strings are not interchangeable with a resolution tier.

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": "flux-3-image",
  "parameters": {
    "batch_size": 1,
    "resolution": "1K",
    "aspect_ratio": "1:1",
    "prompt": "A paper city under soft morning light"
  }
}'

Parameters used: batch_size · resolution · aspect_ratio · prompt.

Image Editing and 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": "flux-3-image",
  "parameters": {
    "batch_size": 1,
    "resolution": "1K",
    "aspect_ratio": "1:1",
    "prompt": "A paper city under soft morning light",
    "images": [
      "https://example.com/input-1.png"
    ]
  }
}'

Parameters used: batch_size · resolution · aspect_ratio · prompt · images.

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.