Alibaba Wan 2.6 Text To Image
Playground
Try it on WavespeedAI!Alibaba WAN 2.6 Text-to-Image turns text prompts into AI-generated images with the WAN 2.6 model for on-demand image creation. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Alibaba Wan 2.6 Text-to-Image
Wan 2.6 Text-to-Image is Alibaba’s text-to-image model for generating PNG images from a single prompt. It’s designed for practical creative workflows—concept art, product visuals, portraits, and stylized imagery—where you want strong prompt adherence plus flexible output sizing.
Key capabilities
-
Single-request (synchronous) generation Generate images and get results back in one request (no separate polling flow).
-
Flexible custom dimensions Choose
width*heightfreely as long as the total pixel area stays within the allowed range and the aspect ratio is within [1:4, 4:1]. -
Prompt rewriting via
prompt_extendOptional prompt expansion can improve results for short/simple prompts (at the cost of a few extra seconds). -
Negative prompting for tighter control Use
negative_promptto suppress unwanted artifacts (e.g., “blurry, low quality, extra fingers”). -
Batch generation (
nimages per run) Generate 1–4 images per request;ndirectly affects cost (price scales with image count). -
Reproducibility with
seedSetseedfor more consistent outputs across runs (results may still vary slightly). -
Optional watermark control Toggle an “AI-generated” watermark in the lower-right corner.
Parameters and how to use
- prompt: (required) The text instruction describing the image you want.
- negative_prompt: What you want to avoid in the output image.
- size: Output resolution as
width*height. - n: Number of images to generate (1–4).
- prompt_extend: Enable/disable prompt rewriting.
- watermark: Enable/disable watermark.
- seed: Random seed for more consistent results.
Prompt
Write prompts that are concrete and visual:
- Start with subject + setting + style: “A modern tea shop interior, warm afternoon light, minimalist wood design, cinematic photography”
- Add composition/camera when you care about framing: “medium shot, shallow depth of field, 35mm look”
- If you need cleaner outputs, pair with a short negative prompt: “blurry, low-res, watermark, extra limbs, distorted hands”
- Prompt language: Chinese and English are supported; prompts longer than the documented limit may be truncated.
Other parameters
-
prompt (required) The positive prompt text that describes the content, style, and composition.
-
size Format:
width*height.- For wan2.6-t2i, total pixels must be between 768×768 and 1440×1440, and aspect ratio must be within [1:4, 4:1]. Common starting points:
- 1:1 →
1280*1280or1024*1024 - 16:9 →
1280*720 - 9:16 →
720*1280
-
negative_prompt Short list of undesired attributes. Max length is limited by the upstream API (extra text may be truncated).
-
enable_prompt_expansion
true(default): improves results for short prompts; adds latency (often a few seconds).false: faster; you control all detail manually.
-
seed Integer in [0, 2147483647]. Use a fixed seed to reduce randomness; omit for fresh variations each run.
After you finish configuring the parameters, click Run, preview the result, and iterate if needed.
Pricing
Each run cost $0.03.
Notes
- If you turn on
enable_prompt_expansion, expect slightly higher latency; it’s best when your prompt is short or under-specified. - The image URLs returned by the upstream API may be time-limited—download and store outputs promptly if you need to keep them.
Related Models
- Alibaba Wan 2.5 (Text-to-Image) – A proven, cost-stable Wan text-to-image option with a similar workflow.
- WaveSpeedAI FLUX 2 Turbo (Edit) – Better fit when you need instruction-following edits on an existing image.
- Google Nano Banana Pro (Edit) – Strong prompt-based image editing with reliable composition control.
- ByteDance Seedream V4 (Text-to-Image) – A solid alternative for stylized generation and fast iteration.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/alibaba/wan-2.6/text-to-image" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"size": "1024*1024",
"enable_prompt_expansion": false,
"seed": -1
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | The positive prompt for the generation. | |
| size | string | No | 1024*1024 | 768 ~ 1440 per dimension | The size of the generated image in pixels (width*height). |
| enable_prompt_expansion | boolean | No | false | - | If set to true, the prompt optimizer will be enabled. |
| seed | integer | No | -1 | -1 ~ 2147483647 | The random seed to use for the generation. -1 means a random seed will be used. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | object | Array of URLs to the generated content (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |