Alibaba Wan 2.6 Text To Image
Playground
Try it on WaveSpeedAI!WAN 2.6 Text-to-Image generates high-quality images from natural-language prompts with strong prompt adherence and clean composition. It supports multiple aspect ratios and size control, seed-based reproducibility, and flexible styles (photorealistic to illustrative) for ads, product shots, and social visuals. Built for stable production use with a ready-to-use REST API, no cold starts, and predictable pricing.
Features
Wan 2.6 Text-to-Image (/wan-2.6/text-to-image) is ’s text-to-image generation model for creating high-quality visuals from a single natural-language prompt. It’s built for practical creative workflows—concept art, product visuals, portraits, and stylized imagery—where you want strong prompt adherence plus flexible custom sizing.
Why it stands out
-
Fast, one-shot text-to-image generation Generate an image in a single run for quick ideation and production workflows.
-
Custom width × height output Set width and height directly (within the endpoint’s limits) to match banners, thumbnails, posters, or social formats.
-
Prompt expansion for better results Enable prompt expansion to automatically enrich short prompts with useful detail for more coherent compositions.
-
Seeded iteration Use a fixed seed to refine style and layout with more repeatable variations.
Parameters
| Parameter | Description |
|---|---|
| prompt* | Text description of the image you want to generate. |
| width | Output width (within allowed limits). |
| height | Output height (within allowed limits). |
| enable_prompt_expansion | Toggle prompt expansion to enrich short prompts. |
| seed | Set a fixed seed for more repeatable iterations (-1 for random). |
How to use
- Write a clear prompt (subject + setting + style).
- Choose width and height that match your target aspect ratio.
- Turn on enable_prompt_expansion if your prompt is short or under-specified.
- Set a seed if you want repeatable iterations (keep the same seed while you tweak the prompt).
- Click Run, review the result, and iterate.
Prompt tips
- Start with subject + environment + style: “A modern tea shop interior, warm afternoon light, minimalist wood design, cinematic photography.”
- Add camera / composition when framing matters: “wide shot, shallow depth of field, 35mm film look.”
- Keep instructions positive and specific (what you want to see, not what you fear).
Pricing
- $0.03 per generated image
Notes
- Output sizing is limited by the endpoint’s current constraints (for example, width/height bounds and aspect-ratio limits). If a size fails, reduce resolution or choose a more standard aspect ratio.
- Enabling prompt expansion can improve quality for short prompts, but may add a little latency.
- Returned image URLs may be time-limited—save outputs if you need long-term storage.
Related Models
- Wan 2.5 Text-to-Image — A proven Wan text-to-image model for reliable, cost-stable AI image generation with a similar prompt-first workflow.
- Seedream V4 Text-to-Image — A style-consistent text-to-image generator for posters, campaigns, and high-volume brand-friendly illustration batches.
- FLUX.2 Turbo Edit — A fast natural-language image editing model for precise image-to-image transformations, brand color control, and iterative creative revisions.
- Google Nano Banana Pro Edit — High-fidelity prompt-based image editing for composition-preserving changes, product visuals, and reliable on-image text handling.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"prompt": "A cinematic ocean wave at sunrise, highly detailed",
"size": "1024*1024",
"enable_prompt_expansion": false,
"seed": -1
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/alibaba/wan-2.6/text-to-image" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL=$(printf '%s' "${TASK}" | jq -r '.urls.get // empty')
if [ -z "${RESULT_URL}" ]; then RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"; fi
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
created|processing) sleep 2 ;;
*) printf 'Unexpected status: %s
' "${STATUS}" >&2; exit 1 ;;
esac
doneParameters
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 | 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 | - | 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 | Output values, usually URL strings; some models return text strings or structured result objects (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 |
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 |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to poll for the prediction result |
| data.status | string | Status: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created |
| 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 |