Skip to Content
Image ModelsQwen Image 2

Qwen Image 2

Overview

Qwen Image 2 is an advanced text-to-image and image-to-image model with stronger text rendering and multi-image editing support.

Test API KEY: key_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwithapi.online/api/task/create

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Api-Key{API_KEY}Yes

Request Parameters

ParameterTypeRequiredDescription
promptstringYesThe input prompt (e.g., “a futuristic city skyline at sunrise”)
image_urlsarrayConditional["https://cdn.pixwithapi.online/example.jpg"]. Provide 1-3 images for image-to-image mode. Omit for text-to-image mode.
model_idstringYes0-43
optionsobjectYesConfiguration options for the task
options.prompt_optimizationbooleanYesIf true, all prompt words will be automatically translated into English.
options.aspect_ratiostringConditionalAspect ratio of the output. Valid values: '1:1', '2:3', '3:2', '3:4', '4:3', '9:16', '16:9', '21:9'

Example Request - Text-to-Image

{ "prompt": "a futuristic city skyline at sunrise", "model_id": "0-43", "options": { "prompt_optimization": true, "aspect_ratio": "16:9" } }

Example Request - Image-to-Image

{ "prompt": "turn these references into a clean anime poster style", "image_urls": [ "https://cdn.pixwithapi.online/example-1.jpg", "https://cdn.pixwithapi.online/example-2.jpg", "https://cdn.pixwithapi.online/example-3.jpg" ], "model_id": "0-43", "options": { "prompt_optimization": true, "aspect_ratio": "3:4" } }

Response Parameters

ParameterTypeDescription
codeint1=success, 0=error
messagestringSuccess and failure messages
dataobject
data.task_idstring
data.estimated_timeintEstimated time in seconds

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d", "estimated_time": 30 } }
Last updated on