Aliyun Qwen-Image text-to-image

Generate images from text with the Qwen-Image, Plus, 2.0, Max, and Edit series. The synchronous response contains an OSS URL valid for 24 hours.

POST /v1/images/generations

## Aliyun Qwen-Image text-to-image Qwen Image Generation Series, applicable to the following models: | Model | Description | |---|---| | `qwen-image` | Basic version, excellent text rendering capability, suitable for posters / couplets / font design | | `qwen-image-plus` | Premium version, high-quality portrait and scene generation, slightly slower than qwen-image | | `qwen-image-plus-2026-01-09` | qwen-image-plus 2026-01-09 snapshot version (stable rollback anchor point) | ### Field naming style - `input.prompt` string — text prompt - `parameters.size` string — separated by `*` for width and height (DashScope style), e.g., `"1024*1024"` / `"1664*928"` - `parameters.n` integer — number of generated images, currently limited to 1 images ### Response parsing - `output.task_status` — `"SUCCEEDED"` indicates success - `output.results[].url` — Image URL (temporary link, expires in ~24h, please download promptly) - `usage.image_count` — Actual number of generated images ### Model editing capabilities If you need **image editing** (with reference image for rewriting), please use the `qwen-image-edit*` series. See the [Aliyun Qwen-Image Multimodal](/docs/api/aliyun-qwen-image-multimodal) documentation for details.

Request body

modelstringrequiredQwen-Image Text-to-image asynchronous model. `qwen-image` Basic version / `qwen-image-plus` Premium version / `-2026-01-09` is a stable snapshot
inputobjectrequiredInput object, including text prompt
    promptstringrequiredText prompt, supports mixed Chinese and English. Detailed descriptions significantly improve generation quality
parametersobjectGeneration parameters
    sizestringImage dimensions, use `*` to separate width and height (DashScope style). Supports 16:9 / 5:4 / 1:1 / 4:5 / 9:16 aspect ratios
    nintegerNumber of generated images, current upstream limit is 1 per request. For multiple images, please call the API multiple times

Responses

Example

curl -X POST "https://api.router.ai/v1/images/generations" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-plus",
    "input": {
      "prompt": "一只穿着宇航服的橘猫站在月球上, 背景星空, 写实风格"
    },
    "parameters": {
      "size": "1024*1024",
      "n": 1
    }
  }'

API reference