Qwen Image 2.1 Pro
https://api.hiapi.ai /v1/tasks Image, video, and audio models are called through theUnified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).
Model summary
| Model name | qwen-image-2.1-pro |
|---|---|
| Type | Text-to-image / Image editing |
| Endpoint | POST /v1/tasks |
| Pricing | See HiAPI Pricing |
Qwen Image 2.1 Pro covers text-to-image and image editing (optional 1–10 references) through the unified asynchronous API.
Production guidance
- In production, prefer callback.url for terminal task notifications.
- For editing, state each reference’s role in the prompt and address images by index.
- Set prompt_extend to false when strict wording matters.
Best suited for
Redraw and refine with up to 10 references, each addressable by index.
image_urlspromptFive 2K-class ratios, or omit for model-chosen sizing.
aspect_ratioRequest parameters
model string required Fixed value qwen-image-2.1-pro.
input object required Model-specific parameter object.
prompt string required Describe the image to generate, or the edits to apply to the references, up to 4,500 characters.
image_urls string[] optional Public URLs of reference or source images, 1–10 images; omit for text-to-image. Accepts JPG, JPEG, PNG, BMP, TIFF, WEBP, and GIF up to 10 MB each; width and height between 1 and 8000 px (384–2048 recommended); the long side stays within 10:1 of the short side. Images are numbered in array order, so the prompt can refer to image 1, image 2, and so on.
aspect_ratio enum optional Output aspect ratio, mapped to 2048×2048, 2688×1536, 1536×2688, 2368×1728, and 1728×2368. Omit it and the model picks a size from the prompt and reference images.
prompt_extend boolean optional Whether to automatically enrich the prompt. It helps short prompts but adds a few seconds; set false when strict wording matters.
seed integer optional Random seed, 0–2147483647. A fixed seed keeps results relatively stable.
callback object optional Optional callback configuration. In production, pass callback.url for terminal task notifications.
url string required http(s) URL that receives terminal task notifications.
when enum optional Callback trigger timing. Use final.
Example requests
Same shape as the DEV golden tasks.
{
"model": "qwen-image-2.1-pro",
"input": {
"prompt": "把参考图中的线稿小机器人变成精致的 3D 卡通玩具渲染:哑光白色外壳搭配珊瑚橙色关节与耳朵,保持原有造型、比例与站姿,柔和棚拍光。"
}
}Getting the result
- A successful submission returns a taskId immediately.
- In production, prefer callback.url; for local debugging, poll GET /v1/tasks/:id.
- When status=success, download the image from output[].url.
FAQ
How do I choose Pro or Turbo?
Both share identical inputs. Turbo is faster and cheaper for drafts and volume; Pro renders better quality for final assets.