Skip to main content
Qwen Image
Qwen image generation uses two request formats depending on the model. Both call the same MixRoute endpoint; do not mix input.prompt with input.messages. POST https://api.mixroute.ai/v1/images/generations

Model Selection

For reference-image editing, use the Qwen Image editing page and the qwen-image-edit* models. These request formats do not add a metadata or asset wrapper.

Basic Text-to-Image

Use qwen-image or qwen-image-plus. The input object contains prompt, not messages.

Parameters

Request Examples

Set your MixRoute key in the MIXROUTE_API_KEY environment variable.

Response

A successful result has output.task_status=“SUCCEEDED”. Read temporary image URLs from output.results[].url and save the images promptly; usage.image_count is the actual output count.

Multimodal-Format Text-to-Image

Use qwen-image-2.0, qwen-image-2.0-pro, or qwen-image-max with one user message and one text block. The request uses the multimodal envelope, but these models are listed here for text-only generation.

Parameters

Request Examples

Response

Read image URLs from output.choices[].message.content[].image. usage.image_count, usage.height, and usage.width describe the output. Do not parse this response with the basic interface’s output.results path.

Errors

HTTP 400 indicates invalid parameters, such as an empty prompt, unsupported size, or unknown model. HTTP 429 indicates rate or concurrency limits; reduce request frequency before retrying.