# Alibaba Wan 2.5 Text to Image API

> Wan 2.5 is Alibaba's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.

Source: https://www.sandbase.ai/models/alibaba/wan/2.5/text-to-image
API reference: https://www.sandbase.ai/models/alibaba/wan/2.5/text-to-image/docs

## Facts

- Provider: Alibaba
- Type: Image model
- Model ID: `alibaba/wan/2.5/text-to-image`
- Price: From $0.05 per run
- Capabilities: text to image
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan/2.5/text-to-image",
  "prompt": "A lone samurai standing on the edge of a cliff at twilight, overlooking a vast valley shrouded in mist. The sky burns with deep orange and purple hues from the setting sun, casting long, dramatic shadows. The samurai’s silhouette glows against the horizon, with their sword reflecting a glint of fading light. The overall style is hyper-realistic, cinematic, and moody, with dramatic contrast and atmospheric depth."
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Alibaba Wan 2.5 Text to Image through SandBase?

Create a SandBase API key, then send requests with the model ID "alibaba/wan/2.5/text-to-image" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Alibaba account?

No. One SandBase API key and balance gives you access to Alibaba Wan 2.5 Text to Image and the other models in the catalog; you do not need to sign up with Alibaba separately.

## README

### Wan 2.5 Text to Image

Wan 2.5 text-to-image: one image from a written brief in Chinese or English.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Text instruction. |
| `aspect_ratio` | `21:9` / `16:9` / `3:2` / `4:3` / `5:4` / `1:1` / `4:5` / `3:4` / `2:3` / `9:16` | — | Output shape. |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

$0.05 per image.

| Request | Price |
|---|---|
| One image | $0.05 |

Failed runs are not charged.

#### Prompting

- Write subject, setting, composition, style, then light and color.

#### Limits

- One image per request. Wan 2.7 is newer and cheaper.

#### Also on SandBase

Other Wan 2.5 endpoints: `alibaba/wan/2.5/text-to-video`, `alibaba/wan/2.5/image-to-video`, `alibaba/wan/2.5/image-to-image`, `alibaba/wan/2.7/text-to-image` (newer).
