Qwen Image 3.0 API guide
Qwen Image 3.0 API: Create images from text and optional image references with Qwen Image 3.0. Negative prompts and prompt-extension settings provide additional instruction control; their accepted values are listed below.
Model overview
Create images from text and optional image references with Qwen Image 3.0. Negative prompts and prompt-extension settings provide additional instruction control; their accepted values are listed below.
API integration
| Documentation | Value |
|---|---|
| API invocation identifier | qwen-image-3.0 |
| Integration | Async 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.
Non-empty image generation or editing prompt, up to approximately 4500 tokens (not a character limit).
Length: minimum 1.
Required for Reference to Image.
Additional requirements depend on other values. See model rules.
One to three reference images. Public HTTP(S) URLs or image data URLs are supported. JPG/JPEG/PNG/BMP/TIFF/WEBP/GIF; at most 10 MB per file, with 384-2048 pixel edges recommended.
Item count: maximum 3.
Media types: image/jpeg, image/png, image/bmp, image/tiff, image/webp, image/gif.
Output resolution tier.
Allowed values: "1K", "2K".
Studio preset: "1K".
Choose one of the seven supported output aspect ratios.
Allowed values: "1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3".
Studio preset: "1:1".
Text describing content to avoid in the generated image.
Enable intelligent prompt rewriting. Off by default.
Studio preset: false.
Direct works with text or reference images. Agent is available only without reference images and when rewriting is enabled.
Allowed values: "direct", "agent".
Studio preset: "direct".
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.
Run content moderation on the prompt and input images before submitting the image task.
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.
| Mode | Required inputs |
|---|---|
| Text to Image | No reference media required |
| Reference to Image | image_urls |
- When
image_urlsis provided, usedirectforprompt_extend_mode. - When the input mode is Reference to Image, use
directforprompt_extend_mode. - When the input mode is Text to Image, omit
image_urls. - When the input mode is Reference to Image, provide
image_urls; keepimage_urls, when supplied, at least 1 items.
Parameter meaning
- Use the Pro variant when dense text or precise layout is the intended use case, and describe the placement of visible text explicitly.
Dependencies
- A rewrite mode requires prompt extension to be enabled. Agent rewriting is a text-to-image feature; choose the direct mode when that restriction applies.
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": "qwen-image-3.0",
"parameters": {
"batch_size": 1,
"resolution": "1K",
"aspect_ratio": "1:1",
"prompt_extend": false,
"prompt_extend_mode": "direct",
"prompt": "A paper city under soft morning light"
}
}'Parameters used: batch_size · resolution · aspect_ratio · prompt_extend · prompt_extend_mode · 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": "qwen-image-3.0",
"parameters": {
"batch_size": 1,
"resolution": "1K",
"aspect_ratio": "1:1",
"prompt_extend": false,
"prompt_extend_mode": "direct",
"prompt": "A paper city under soft morning light",
"image_urls": [
"https://example.com/input-1.png"
]
}
}'Parameters used: batch_size · resolution · aspect_ratio · prompt_extend · prompt_extend_mode · 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.
Related docs
The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.