Skip to content
English

Qwen Image 2.1 Turbo

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-turbo
Type Text-to-image / Image editing
Endpoint POST /v1/tasks
Pricing See HiAPI Pricing

Qwen Image 2.1 Turbo 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

Fast generation

Value-tier text-to-image and editing for stickers, drafts, and volume illustration.

prompt
Same contract

Identical inputs and ratios as Pro, billed flat per image.

aspect_ratioprompt_extend

Request parameters

model string required

Fixed value qwen-image-2.1-turbo.

example qwen-image-2.1-turbo
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-turbo",
  "input": {
    "prompt": "一张贴纸风格插画:戴着草帽的柴犬坐在冲浪板上,扁平色块,粗描边,珊瑚橙与海蓝色配色。",
    "aspect_ratio": "1:1",
    "prompt_extend": true
  }
}

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