> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen-Image 2.1 Turbo

> Qwen-Image 2.1 Turbo: Alibaba Qwen's text-to-image model. The 8-step distilled Qwen-Image 2.1, fast and the lowest-priced in the series, for batch generation. Billed per image.

Qwen-Image 2.1 Turbo (`qwen-image-2.1-turbo`) is Alibaba Qwen's text-to-image model. The 8-step distilled Qwen-Image 2.1, fast and the lowest-priced in the series, for batch generation. It renders Chinese and English text well. [Qwen-Image 2.1 Pro](https://docs.dreamto.ai/en/image/models/qwen-image-2-1-pro.md) in the same series is better in quality and detail. For image editing or multi-image composition use [Qwen-Image 3.0](https://docs.dreamto.ai/en/image/models/qwen-image-3-0.md). The endpoint is OpenAI Images compatible and works with the official OpenAI SDKs.

## Setup

| | DreamTo |
| - | - |
| Base URL | `https://api.dreamto.ai/v1` |
| API key | An API key from the DreamTo console, in the `Authorization: Bearer` header |

## Endpoints

| Endpoint | Purpose |
| - | - |
| [`POST /v1/images/generations`](https://docs.dreamto.ai/en/api-reference/qwen-image-2-1-turbo/create-image) | Create image |

## Parameters

| Field | Values |
| - | - |
| `prompt` | Required, any language; put text that should appear in the image in quotes |
| `size` | `WIDTHxHEIGHT`, total pixels 512×512 to 2048×2048, aspect ratio 1:8 to 8:1; when omitted the model picks a size for the prompt |
| `n` | 1 to 6, default 1 |

Common sizes:

| `size` |
| - |
| `1024x1024` |
| `1536x1024` |
| `1024x1536` |
| `1472x1104` |
| `1104x1472` |
| `1664x928` |
| `928x1664` |
| `2048x2048` |

## Pricing

Billed per image, \$0.016 per image; see the [model catalog](https://www.dreamto.ai/models) and the console for current prices. Invalid requests and failed generations are not charged.

## Quick start

`$DREAMTO_API_KEY` in the examples is your API key.

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/v1/images/generations" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-2.1-turbo",
    "prompt": "A cinematic city-at-night poster with the title \"NIGHT RIDE\" at the top",
    "size": "1024x1024"
  }'
```

```python Python theme={null}
import os

from openai import OpenAI

client = OpenAI(base_url="https://api.dreamto.ai/v1", api_key=os.environ["DREAMTO_API_KEY"])

result = client.images.generate(
    model="qwen-image-2.1-turbo",
    prompt="A cinematic city-at-night poster with the title \"NIGHT RIDE\" at the top",
    size="1024x1024",
)
print(result.data[0].url)
```

## Notes

* `data[].url` in the response is an image link; download and keep it promptly.
* `usage` returns `image_count` (billed per image) and the image `width` / `height`.
* Text-to-image only; `negative_prompt`, image editing and reference images are not supported.
* Errors use the DreamTo error format (see the error examples on the endpoint).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.