Qwen Image 3.0

AlibabaImages

Alibaba Qwen Image 3.0: generation and editing with strong in-image text; 1K and 2K cost the same.

Our price
$0.028
per image
Official
$0.030
8% vs official

First request

from openai import OpenAI

client = OpenAI(
    base_url="https://api.altrouter.ai/v1",
    api_key="ar-...",
)

img = client.images.generate(
    model="qwen-image-3",
    prompt="a red fox in the snow",
)
print(img.data[0].url)
API

OpenAI-compatible image generation endpoint. The result is re-hosted on our CDN and returned as a URL.

POST/v1/images/generations
Body parameters
modelstringrequired"qwen-image-3"
The model id.
promptstringrequired
The text description of the image.
imagestringURL or base64
Reference images for editing.
aspect_ratioenum1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9default 1:1
Output aspect ratio.
resolutionenum1K · 2Kdefault 1K
Resolution tier (affects price).
negative_promptstring
What to exclude from the image.
seednumber0–2147483647
Seed for reproducibility.
Response
createdinteger
Unix creation time (seconds).
dataarray
Images. Each: url (our CDN), b64_json, revised_prompt.
Example
cURLPythonJSON
curl https://api.altrouter.ai/v1/images/generations \
  -H "Authorization: Bearer ar-..." \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen-image-3",
  "prompt": "a red fox in the snow",
  "aspect_ratio": "1:1",
  "resolution": "1K"
}'
Errors
400Invalid request.
401Missing or invalid API key.
402Insufficient credits, or the key’s spending cap is exhausted.
404Model not found.
429Rate limit exceeded.

More from Alibaba