# Alibaba Qwen Image 2 API

> Alibaba Qwen Image 2 text-to-image model with high-quality generation and configurable output format.

Source: https://www.sandbase.ai/model/alibaba/qwen-image-2
API reference: https://www.sandbase.ai/model/alibaba/qwen-image-2/docs

## Facts

- Provider: Alibaba
- Type: Image model
- Model ID: `alibaba/qwen-image-2`
- Price: From $0.04 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/qwen-image-2",
  "aspect_ratio": "16:9",
  "output_format": "png"
}'
```

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 Qwen Image 2 through SandBase?

Create a SandBase API key, then send requests with the model ID "alibaba/qwen-image-2" 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 Qwen Image 2 and the other models in the catalog; you do not need to sign up with Alibaba separately.

## README

### Qwen Image 2

Qwen Image 2 text-to-image, with strong Chinese and English text rendering for posters and graphics. Qwen Image 3 is the newer model.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Up to 10,000 characters. |
| `aspect_ratio` | `21:9` / `16:9` / `4:3` / `1:1` / `3:4` / `9:16` / `9:21` | `16:9` | Output shape. |
| `seed` | integer | random | Fix it to compare prompt changes. |
| `output_format` | `jpeg` / `png` | `png` | Output file format. |

#### Billing

$0.035 per image, Alibaba's list price.

| Request | Price |
|---|---|
| One image | $0.035 |

Failed runs are not charged.

#### Prompting

- Quote any text that must appear in the image.

#### Limits

- One image per request.

#### Also on SandBase

Related: `alibaba/qwen-image-3/text-to-image` (newer).
