Skip to content
English

Qwen Image 2.1 Pro

POST Base URL: 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

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

Reference-guided editing

Redraw and refine with up to 10 references, each addressable by index.

image_urlsprompt
Aspect control

Five 2K-class ratios, or omit for model-chosen sizing.

aspect_ratio

Request parameters

model string required

Fixed value qwen-image-2.1-pro.

example 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.

enum: 1:116:99:164:33:4
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.

default true example false
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.

example https://your-domain.com/hiapi/callback
when enum optional

Callback trigger timing. Use final.

default final enum: final

Example requests

Verified request structure

Same shape as the DEV golden tasks.

Request body
{
  "model": "qwen-image-2.1-pro",
  "input": {
    "prompt": "把参考图中的线稿小机器人变成精致的 3D 卡通玩具渲染:哑光白色外壳搭配珊瑚橙色关节与耳朵,保持原有造型、比例与站姿,柔和棚拍光。"
  }
}

Getting the result

  1. A successful submission returns a taskId immediately.
  2. In production, prefer callback.url; for local debugging, poll GET /v1/tasks/:id.
  3. 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.

Next steps