Qwen Image 2.0
/v1/tasks All models are called through the Unified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).
Model summary
| Model name | qwen-image-2.0 |
|---|---|
| Type | Image generation |
| Endpoint | POST /v1/tasks |
| Pricing | See HiAPI Pricing |
Qwen Image 2.0 is a low-cost image model with strong Chinese prompt and text-rendering behavior for posters, social images, and fast image generation.
Production guidance
- For production, pass callback.url at the top level of the request body so HiAPI can notify your service when the task reaches a terminal state.
- GET /v1/tasks/:id is better for local debugging, low-volume jobs, or fallback reconciliation if a callback is missed.
- Use callback.when=final. Both success and fail are terminal states, so your service should deduplicate by taskId.
Best suited for
Use when the image needs Chinese headlines, signs, or poster text.
promptUseful for content production, social images, and quick prototypes.
sizeUse negative_prompt to exclude unwanted elements.
negative_promptEnable prompt_extend when automatic prompt optimization is useful.
prompt_extendRequest parameters
model string required Fixed value qwen-image-2.0.
input object required Business parameters.
prompt string required Positive prompt text.
size enum optional Output image size. Use WIDTH*HEIGHT.
negative_prompt string optional Negative prompt.
prompt_extend boolean optional Whether to optimize the prompt.
watermark boolean optional Whether to add a watermark.
seed integer optional Random seed, range 0-2147483647.
callback object optional Optional callback configuration. In production, pass callback.url so HiAPI can notify your service when the task reaches a terminal state.
url string required HTTPS URL that receives terminal task notifications.
when enum optional Callback trigger timing. Use final for terminal-state notifications.
Example requests
Pass a prompt, size, and basic generation options.
{
"model": "qwen-image-2.0",
"input": {
"prompt": "A small red apple on a pure white ceramic plate, white tabletop, studio lighting, photorealistic photography, no people, no landscape",
"size": "2048*2048",
"negative_prompt": "text, people, landscape, low resolution, malformed",
"prompt_extend": false,
"watermark": false
}
}Exclude unwanted visual elements.
{
"model": "qwen-image-2.0",
"input": {
"prompt": "A Chinese New Year poster with a clear readable Chinese headline, red and gold palette, festival lanterns",
"size": "1728*2368",
"negative_prompt": "blurry text, distorted characters, low resolution",
"prompt_extend": true,
"watermark": false
}
}Getting the result
- The response returns a taskId immediately without waiting for generation to finish.
- In production, prefer waiting for callback.url to receive the terminal notification. For local debugging, poll GET /v1/tasks/:id.
- When status=success, download the generated image from output[].url.
- When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.