> ## 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 3.0

> Qwen-Image 3.0: the standard Qwen image generation and editing 3.0 model from Alibaba Cloud, balancing quality and speed at one price for 1K and 2K, for text-to-image and editing with 1–3 images.

`qwen-image-3.0` is the standard model of Alibaba Cloud's Qwen image generation and editing 3.0 series, balancing quality and speed. It uses the same endpoint and parameters as [Qwen-Image 3.0 Pro](https://docs.dreamto.ai/en/image/models/qwen-image-3-0-pro.md): it generates images from text (text-to-image) or creates new images from 1–3 reference images plus an instruction (image-to-image / editing), with negative prompts, smart prompt rewriting and thinking mode. It outputs PNG images of 512\*512 to 2048\*2048 total pixels, up to 6 per request, at the same price for the 1K and 2K tiers, from Chinese or English prompts. Requests are synchronous and return the image links directly, with no polling.

## Featured capabilities

| Capability | Description |
| - | - |
| Text rendering | Generates and edits Chinese and English text in images accurately, with font, color and material controlled by the prompt |
| Realistic textures | More realistic lighting, materials and skin texture, for product shots, portraits and photorealistic scenes |
| Semantic adherence | Follows the subjects, counts, positions and styles of complex prompts accurately |
| Smart rewriting | Prompt rewriting (`prompt_extend`) is on by default, so short descriptions still yield detailed images; text-to-image can add agent mode and thinking mode for better results |
| Image editing | 1–3 reference images: edit text, add, delete and move objects, change a subject's action, transfer styles, enhance details and fuse several images |
| Several images | `n` returns up to 6 images per request |

## Setup

| | Alibaba Cloud Model Studio (international) | DreamTo |
| - | - | - |
| Endpoint | `POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation` | `POST https://api.dreamto.ai/api/v1/services/aigc/multimodal-generation/generation` |
| `model` | `qwen-image-3.0-pro` / `qwen-image-3.0` | The same |
| API Key | Model Studio API key | API Key from the DreamTo console, in the `Authorization: Bearer` header |

The request and response bodies follow the official DashScope protocol, so existing code runs after replacing the base URL and API key; with the DashScope SDK, set `base_http_api_url` to `https://api.dreamto.ai/api/v1`.

## Endpoints

| Endpoint | Purpose |
| - | - |
| [`POST /api/v1/services/aigc/multimodal-generation/generation`](https://docs.dreamto.ai/en/api-reference/qwen-image-3-0/create-image) | Create image |

## Parameters

| Field | Values |
| - | - |
| `input.messages` | Exactly one message with `role` `user` |
| `input.messages[].content[].text` | Required, exactly one: the prompt or edit instruction, Chinese or English, ideally under 4,500 tokens |
| `input.messages[].content[].image` | 1–3 images for editing: public links or `data:{MIME type};base64,{data}`; JPG / JPEG / PNG / BMP / TIFF / WEBP / GIF, 1–8,000 px per side (384–2,048 recommended), long-to-short ratio ≤ 10:1, up to 10 MB |
| `parameters.size` | `WIDTH*HEIGHT` with `512*512` to `2048*2048` total pixels and an aspect ratio from 1:8 to 8:1; when omitted the model decides from the prompt. Above 2,250,000 pixels the 2K tier applies |
| `parameters.n` | 1–6, default 1, billed per image |
| `parameters.negative_prompt` | Optional negative prompt |
| `parameters.prompt_extend` | `true` (default, smart prompt rewriting) / `false` |
| `parameters.prompt_extend_mode` | `direct` (default) / `agent` (text-to-image only) |
| `parameters.enable_thinking` | `true` (default; needs `prompt_extend: true`, takes longer) / `false` |
| `parameters.seed` | `0`–`2147483647`; random when omitted |
| `parameters.watermark` | `false` (default) / `true` (add a watermark) |

## Pricing

Billed per image at the official Alibaba Cloud international (Singapore) prices; the prices in the console are authoritative:

| Item | Price |
| - | - |
| Output image, 1K tier (≤ 2,250,000 total pixels) | \$0.03 / image |
| Output image, 2K tier (> 2,250,000 total pixels) | \$0.03 / image |
| Input image (each reference image of an edit) | \$0.003 / image |

Cost of a request = output images × the price of their tier + input images × the input price; the tier is `usage.output_image_type` in the response. Before the call the balance is checked for the most the request can produce (`n` images, in the 2K tier when `size` is omitted or above 2,250,000 pixels); with an insufficient balance it returns 402 and the model is not called. Only images actually returned are charged; invalid requests and failed generations are not charged.

## Quick start

`$DREAMTO_API_KEY` is your API Key.

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/api/v1/services/aigc/multimodal-generation/generation" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-3.0",
    "input": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "text": "An orange cat sitting on a sunlit wooden windowsill, a city street after the rain outside, droplets on the glass, soft natural light, photorealistic"
            }
          ]
        }
      ]
    },
    "parameters": {
      "size": "1328*1328",
      "n": 1,
      "prompt_extend": true,
      "watermark": false
    }
  }'
```

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

import requests

URL = "https://api.dreamto.ai/api/v1/services/aigc/multimodal-generation/generation"
HEADERS = {"Authorization": f"Bearer {os.environ['DREAMTO_API_KEY']}"}

payload = {
    "model": "qwen-image-3.0",
    "input": {
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "text": "An orange cat sitting on a sunlit wooden windowsill, a city street after the rain outside, droplets on the glass, soft natural light, photorealistic"
                    }
                ]
            }
        ]
    },
    "parameters": {
        "size": "1328*1328",
        "n": 1,
        "prompt_extend": True,
        "watermark": False
    }
}

result = requests.post(URL, headers=HEADERS, json=payload, timeout=300).json()
if "output" not in result:
    raise SystemExit(result)
for item in result["output"]["choices"][0]["message"]["content"]:
    print(item["image"])
```

## Guides

| Guide | Content |
| - | - |
| [Text to image](https://docs.dreamto.ai/en/image/models/qwen-image-3-0/text-to-image.md) | Prompt writing, common parameters and request samples |
| [Image editing and multi-image fusion](https://docs.dreamto.ai/en/image/models/qwen-image-3-0/image-editing.md) | Passing 1–3 reference images, image order and common edit instructions |
| [Prompt rewriting](https://docs.dreamto.ai/en/image/models/qwen-image-3-0/prompt-rewriting.md) | `prompt_extend`, direct / agent mode and thinking mode |
| [Sizes and billing tiers](https://docs.dreamto.ai/en/image/models/qwen-image-3-0/size-and-billing.md) | `size` values, common sizes, the 1K / 2K tiers and cost examples |

## Notes

* `model` is the official name; this endpoint accepts `qwen-image-3.0-pro` or `qwen-image-3.0`.
* Calls are synchronous only: the request blocks until the images are ready, taking longer for larger sizes, more images and thinking mode or agent rewriting, so set the client read timeout to at least 180 seconds; `X-DashScope-Async` tasks are neither needed nor supported.
* Malformed requests (`messages` not exactly one, `text` not exactly one, more than 3 images, `n` outside 1–6, `seed` out of range, `size` not `WIDTH*HEIGHT`, `agent` mode for editing and so on) return 400 `InvalidParameter` with an English `message` before the model is called, and are not charged.
* Errors from the model (pixels out of range, an image that cannot be downloaded, content moderation `DataInspectionFailed` and so on) keep the official HTTP status, `code` and `message`; rate limiting returns 429 `Throttling` and service failures 500 `InternalError`. None of these are charged.
* Authentication failures (401), insufficient balance (402) and other DreamTo-side errors (account rate limits, a model that is not enabled and so on) use the DreamTo error envelope (an `error` object); see the error examples.
* `request_id` in successful and error responses is the DreamTo request ID, the same as the `X-Request-Id` header; include it when reporting issues.
* The returned image links are stored by Alibaba Cloud and valid for 24 hours; download and keep the images promptly.


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