Qwen Image API Integration Guide

POST https://api.worldai.chat/qwen-image/images supports qwen-image-3.0 and qwen-image-3.0-pro for text-to-image generation and editing of 1–3 reference images.

Text-to-Image

curl -X POST 'https://api.worldai.chat/qwen-image/images' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model":"qwen-image-3.0","prompt":"A minimalist technology poster","size":"1024*1024","n":1}'

Image Editing

Add image_urls in the same request, supporting 1–3 public images:

{
  "model": "qwen-image-3.0-pro",
  "prompt": "Keep the subject, change to a warm **###** poster style",
  "image_urls": ["https://cdn.acedata.cloud/r9vsv9.png"],
  "size": "2048*2048",
  "prompt_extend": true,
  "prompt_extend_mode": "direct",
  "enable_thinking": true,
  "n": 1,
  "watermark": false
}

prompt_extend_mode=agent only supports text-to-image. The range of n is 1–6. The total pixel output size must be between 512×512 and 2048×2048, with an aspect ratio of 1:8 to 8:1.

Asynchronous Call

Setting async: true allows you to immediately obtain task_id; you can also pass in callback_url to receive the final result. After completion, query through /qwen-image/tasks.

A successful response includes data[].image_url, usage, task_id, and trace_id. Image links will be stored in the WorldAi CDN whenever possible. Real response examples will be supplemented after production E2E verification.