# Qwen Image > A foundation model from the Qwen series built for image understanding and visual reasoning. It excels at interpreting complex scenes, aligning images with fine-grained textual input. ## Model Information - **Name**: qwen-image - **Version**: 0.0.1 - **Category**: Text to Image - **Output Type**: image - **Average Response Time**: 17s - **Updated**: 2/5/2026 ## API Access - [Interactive Demo](https://www.eachlabs.ai/ai-models/qwen-image) - Try the model with a web interface ## API Documentation ### Authentication All API requests require authentication using your API key. Include your API key in the request headers: ``` X-API-Key: YOUR_API_KEY ``` ### Base URL ``` https://api.eachlabs.ai/v1 ``` ### Endpoints #### Create a Prediction Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. **Endpoint:** `POST https://api.eachlabs.ai/v1/prediction/` **Headers:** - `X-API-Key: YOUR_API_KEY` - `Content-Type: application/json` **Request Body:** ```json { "model": "qwen-image", "input": { "prompt": "A steampunk astronaut playing a grand piano on the edge of a floating cliff in the sky, under a golden sunset. The cliff is covered in moss and rusted metal pipes, with small mechanical birds perched around. The astronaut’s suit is detailed with brass, leather straps, and glowing blue tubes. Clouds drift below, while distant airships pass in the background. The lighting is dramatic, casting long shadows and warm reflections on the piano’s surface. Ultra-detailed, cinematic composition, dreamy and surreal atmosphere, 8K.", "go_fast": true, "guidance": 4, "aspect_ratio": "16:9", "output_format": "webp", "output_quality": 80, "num_inference_steps": 50 }, "webhook_url": "" } ``` **Response:** ```json { "status": "success", "message": "Prediction created successfully", "predictionID": "25cd93ae-5046-462d-85ec-7c2ec5710321" } ``` Use the `predictionID` from this response to poll for results. #### Get Prediction Result Poll the prediction endpoint with the predictionID until the result is ready. **Endpoint:** `GET https://api.eachlabs.ai/v1/prediction/{PREDICTION_ID}` **Headers:** - `X-API-Key: YOUR_API_KEY` ### Code Examples #### cURL **Create Prediction:** ```bash curl -X POST \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ --data '{ "model": "qwen-image", "input": { "prompt": "A steampunk astronaut playing a grand piano on the edge of a floating cliff in the sky, under a golden sunset. The cliff is covered in moss and rusted metal pipes, with small mechanical birds perched around. The astronaut’s suit is detailed with brass, leather straps, and glowing blue tubes. Clouds drift below, while distant airships pass in the background. The lighting is dramatic, casting long shadows and warm reflections on the piano’s surface. Ultra-detailed, cinematic composition, dreamy and surreal atmosphere, 8K.", "go_fast": true, "guidance": 4, "aspect_ratio": "16:9", "output_format": "webp", "output_quality": 80, "num_inference_steps": 50 }, "webhook_url": "" }' \ https://api.eachlabs.ai/v1/prediction/ ``` **Get Result:** ```bash curl -X GET \ -H "X-API-Key: YOUR_API_KEY" \ https://api.eachlabs.ai/v1/prediction/{{PREDICTION_ID}} ``` #### Python ```python import requests import time API_KEY = 'YOUR_API_KEY' HEADERS = { "X-API-Key": API_KEY, "Content-Type": "application/json" } def create_prediction(): response = requests.post( "https://api.eachlabs.ai/v1/prediction/", headers=HEADERS, json={ "model": "qwen-image", "input": { "prompt": "A steampunk astronaut playing a grand piano on the edge of a floating cliff in the sky, under a golden sunset. The cliff is covered in moss and rusted metal pipes, with small mechanical birds perched around. The astronaut’s suit is detailed with brass, leather straps, and glowing blue tubes. Clouds drift below, while distant airships pass in the background. The lighting is dramatic, casting long shadows and warm reflections on the piano’s surface. Ultra-detailed, cinematic composition, dreamy and surreal atmosphere, 8K.", "go_fast": true, "guidance": 4, "aspect_ratio": "16:9", "output_format": "webp", "output_quality": 80, "num_inference_steps": 50 }, "webhook_url": "" } ) prediction = response.json() if prediction["status"] != "success": raise Exception(f"Prediction failed: {prediction}") return prediction["predictionID"] def get_prediction(prediction_id): while True: result = requests.get( f"https://api.eachlabs.ai/v1/prediction/{prediction_id}", headers=HEADERS ).json() if result["status"] == "success": return result elif result["status"] == "error": raise Exception(f"Prediction failed: {result}") time.sleep(1) # Wait before polling again # Usage try: prediction_id = create_prediction() print(f"Prediction created: {prediction_id}") result = get_prediction(prediction_id) print(f"Output URL: {result['output']}") print(f"Processing time: {result['metrics']['predict_time']}s") except Exception as e: print(f"Error: {e}") ``` #### JavaScript/Node.js ```javascript import axios from 'axios'; const API_KEY = 'YOUR_API_KEY'; const HEADERS = { 'X-API-Key': API_KEY, 'Content-Type': 'application/json' }; async function createPrediction() { try { const response = await axios.post( 'https://api.eachlabs.ai/v1/prediction/', { model: 'qwen-image', input: { "prompt": "A steampunk astronaut playing a grand piano on the edge of a floating cliff in the sky, under a golden sunset. The cliff is covered in moss and rusted metal pipes, with small mechanical birds perched around. The astronaut’s suit is detailed with brass, leather straps, and glowing blue tubes. Clouds drift below, while distant airships pass in the background. The lighting is dramatic, casting long shadows and warm reflections on the piano’s surface. Ultra-detailed, cinematic composition, dreamy and surreal atmosphere, 8K.", "go_fast": true, "guidance": 4, "aspect_ratio": "16:9", "output_format": "webp", "output_quality": 80, "num_inference_steps": 50 }, webhook_url: "" }, { headers: HEADERS } ); const prediction = response.data; if (prediction.status !== 'success') { throw new Error(`Prediction failed: ${JSON.stringify(prediction)}`); } return prediction.predictionID; } catch (error) { console.error('Error creating prediction:', error); throw error; } } async function getPrediction(predictionId) { while (true) { try { const response = await axios.get( `https://api.eachlabs.ai/v1/prediction/${predictionId}`, { headers: HEADERS } ); const result = response.data; if (result.status === 'success') { return result; } else if (result.status === 'error') { throw new Error(`Prediction failed: ${JSON.stringify(result)}`); } await new Promise(resolve => setTimeout(resolve, 1000)); } catch (error) { console.error('Error getting prediction:', error); throw error; } } } // Usage async function runPrediction() { try { const predictionId = await createPrediction(); console.log(`Prediction created: ${predictionId}`); const result = await getPrediction(predictionId); console.log(`Output URL: ${result.output}`); console.log(`Processing time: ${result.metrics.predict_time}s`); } catch (error) { console.error(`Error: ${error.message}`); } } runPrediction(); ``` #### Go ```go package main import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" "time" ) const ( APIKey = "YOUR_API_KEY" BaseURL = "https://api.eachlabs.ai/v1" ) type PredictionRequest struct { Model string `json:"model"` Input interface{} `json:"input"` WebhookURL string `json:"webhook_url"` } type PredictionResponse struct { Status string `json:"status"` PredictionID string `json:"predictionID"` } type PredictionResult struct { Status string `json:"status"` Output string `json:"output"` Metrics PredictionMetrics `json:"metrics"` } type PredictionMetrics struct { PredictTime float64 `json:"predict_time"` } func createPrediction() (string, error) { reqBody := PredictionRequest{ Model: "qwen-image", Input: { "prompt": "A steampunk astronaut playing a grand piano on the edge of a floating cliff in the sky, under a golden sunset. The cliff is covered in moss and rusted metal pipes, with small mechanical birds perched around. The astronaut’s suit is detailed with brass, leather straps, and glowing blue tubes. Clouds drift below, while distant airships pass in the background. The lighting is dramatic, casting long shadows and warm reflections on the piano’s surface. Ultra-detailed, cinematic composition, dreamy and surreal atmosphere, 8K.", "go_fast": true, "guidance": 4, "aspect_ratio": "16:9", "output_format": "webp", "output_quality": 80, "num_inference_steps": 50 }, WebhookURL: "", } jsonData, err := json.Marshal(reqBody) if err != nil { return "", err } req, err := http.NewRequest("POST", BaseURL+"/prediction/", bytes.NewBuffer(jsonData)) if err != nil { return "", err } req.Header.Set("X-API-Key", APIKey) req.Header.Set("Content-Type", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { return "", err } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return "", err } var predResp PredictionResponse if err := json.Unmarshal(body, &predResp); err != nil { return "", err } if predResp.Status != "success" { return "", fmt.Errorf("prediction failed: %s", string(body)) } return predResp.PredictionID, nil } func getPrediction(predictionID string) (*PredictionResult, error) { for { req, err := http.NewRequest("GET", fmt.Sprintf("%s/prediction/%s", BaseURL, predictionID), nil) if err != nil { return nil, err } req.Header.Set("X-API-Key", APIKey) client := &http.Client{} resp, err := client.Do(req) if err != nil { return nil, err } body, err := ioutil.ReadAll(resp.Body) resp.Body.Close() if err != nil { return nil, err } var result PredictionResult if err := json.Unmarshal(body, &result); err != nil { return nil, err } if result.Status == "success" { return &result, nil } else if result.Status == "error" { return nil, fmt.Errorf("prediction failed: %s", string(body)) } time.Sleep(1 * time.Second) } } func main() { predictionID, err := createPrediction() if err != nil { fmt.Printf("Error creating prediction: %v\n", err) return } fmt.Printf("Prediction created: %s\n", predictionID) result, err := getPrediction(predictionID) if err != nil { fmt.Printf("Error getting prediction: %v\n", err) return } fmt.Printf("Output URL: %s\n", result.Output) fmt.Printf("Processing time: %.2fs\n", result.Metrics.PredictTime) } ``` ### Response Format #### Create Prediction Response ```json { "status": "success", "message": "Prediction created successfully", "predictionID": "25cd93ae-5046-462d-85ec-7c2ec5710321" } ``` #### Get Prediction Response (Success) ```json { "status": "success", "predictionID": "25cd93ae-5046-462d-85ec-7c2ec5710321", "output": "https://output-url.com/result", "metrics": { "predict_time": 2.5 } } ``` #### Get Prediction Response (Processing) ```json { "status": "processing", "predictionID": "25cd93ae-5046-462d-85ec-7c2ec5710321", "message": "Prediction is being processed" } ``` #### Error Response ```json { "status": "error", "message": "Error description", "details": "Additional error details" } ``` ### Rate Limits - Maximum 100 requests per minute per API key - Maximum 10 concurrent predictions per API key - Webhook timeout: 30 seconds ### Error Handling Common HTTP status codes: - `200` - Success - `400` - Bad Request (invalid input parameters) - `401` - Unauthorized (invalid API key) - `429` - Too Many Requests (rate limit exceeded) - `500` - Internal Server Error ### Webhooks (Optional) You can provide a webhook URL to receive prediction results automatically: ```json { "model": "qwen-image", "input": { "prompt": "A steampunk astronaut playing a grand piano on the edge of a floating cliff in the sky, under a golden sunset. The cliff is covered in moss and rusted metal pipes, with small mechanical birds perched around. The astronaut’s suit is detailed with brass, leather straps, and glowing blue tubes. Clouds drift below, while distant airships pass in the background. The lighting is dramatic, casting long shadows and warm reflections on the piano’s surface. Ultra-detailed, cinematic composition, dreamy and surreal atmosphere, 8K.", "go_fast": true, "guidance": 4, "aspect_ratio": "16:9", "output_format": "webp", "output_quality": 80, "num_inference_steps": 50 }, "webhook_url": "https://your-domain.com/webhook" } ``` The webhook will receive a POST request with the prediction result when complete. #### Webhook Response Format When your webhook URL is called, it will receive a POST request with the following payload: **Success Response:** ```json { "error": "", "exec_id": "25cd93ae-5046-462d-85ec-7c2ec5710321", "flow_id": "", "output": "Output URL", "status": "succeeded" // succeeded or failed } ``` **Error Response:** ```json { "error": "Error description here", "exec_id": "25cd93ae-5046-462d-85ec-7c2ec5710321", "flow_id": "", "output": "", "status": "failed" } ``` **Fields:** - `exec_id`: The prediction ID (same as predictionID from create response) - `flow_id`: Flow identifier (empty for single model predictions) - `output`: URL to the result file or output data - `status`: Either "succeeded" or "failed" - `error`: Error message if status is "failed", empty string if succeeded ## Input Parameters ### Seed - **Type**: integer - **Component**: input - **Required**: No - **Description**: Random seed. Set for reproducible generation - **Default**: - **Minimum**: 0 - **Maximum**: 0 ### Prompt - **Type**: string - **Component**: input - **Required**: Yes - **Description**: Prompt for generated image - **Default**: - **Minimum**: 0 - **Maximum**: 0 ### Go Fast - **Type**: boolean - **Component**: checkbox - **Required**: No - **Description**: Run faster predictions with additional optimizations. - **Default**: True - **Minimum**: 0 - **Maximum**: 0 ### Guidance - **Type**: number - **Component**: input - **Required**: No - **Description**: Guidance for generated image. Lower values can give more realistic images. Good values to try are 2, 2.5, 3 and 3.5 - **Default**: 4 - **Minimum**: 0 - **Maximum**: 10 ### aspect_ratio - **Type**: string - **Component**: select - **Required**: No - **Description**: An enumeration. - **Default**: 16:9 - **Minimum**: 0 - **Maximum**: 0 - **Options**: "1:1,16:9,9:16,4:3,3:4" ### output_format - **Type**: string - **Component**: select - **Required**: No - **Description**: An enumeration. - **Default**: webp - **Minimum**: 0 - **Maximum**: 0 - **Options**: "webp,jpg,png" ### Output Quality - **Type**: integer - **Component**: slider - **Required**: No - **Description**: Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs - **Default**: 80 - **Minimum**: 0 - **Maximum**: 100 ### Num Inference Steps - **Type**: integer - **Component**: slider - **Required**: No - **Description**: Number of denoising steps. Recommended range is 28-50, and lower number of steps produce lower quality outputs, faster. - **Default**: 50 - **Minimum**: 1 - **Maximum**: 50 ### Disable Safety Checker - **Type**: boolean - **Component**: checkbox - **Required**: No - **Description**: Disable safety checker for generated images. - **Default**: false - **Minimum**: 0 - **Maximum**: 0 ## Pricing - **Charge Type**: fixed - **Base Charge**: $0.0250 - **Estimated Price (default example)**: $0.0250 - **Pricing Details**: Fixed pricing: 0.025 per execution ## Documentation

qwen-image — Text-to-Image AI Model

Developed by Alibaba as part of the qwen family, qwen-image is a powerful text-to-image AI model that transforms detailed textual prompts into high-fidelity visuals, excelling in complex scene generation and multilingual text rendering for creators seeking precise Alibaba text-to-image solutions. Built on a 20-billion-parameter Multimodal Diffusion Transformer (MMDiT) architecture, it stands out with native support for English and Chinese prompts, producing coherent images with legible text in multiple languages that most competitors struggle to achieve. Ideal for developers integrating qwen-image API into apps or e-commerce platforms needing "AI image generator with Chinese text" capabilities, this model delivers state-of-the-art performance on benchmarks like GenEval and DPG while supporting custom resolutions up to 1536x1536 pixels.

### Technical Specifications

What Sets qwen-image Apart

qwen-image differentiates itself in the text-to-image landscape through its superior multilingual text rendering, generating clear, stylistically harmonious text in English, Chinese, Japanese, Korean, and more. This enables global marketers to create event posters or product visuals with accurate bilingual labels without post-editing.

Unlike generic models, it offers flexible aspect ratios including 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, and 2:3, alongside custom dimensions from 256 to 1536 pixels, ensuring outputs fit any platform from social media to presentations. Developers benefit by producing platform-optimized images efficiently via the qwen-image API.

With built-in prompt enhancement and multiple formats like JPEG, PNG, and WebP, it refines user inputs for optimal results and supports diverse export needs for web-optimized "text-to-image AI model" workflows. Processing times range from 24-35 seconds depending on quality mode, balancing speed and detail for commercial use.

### Key Considerations ### Capabilities ### Use Cases

Use Cases for qwen-image

For e-commerce developers building AI image generators, qwen-image shines in creating photorealistic product visuals; input a prompt like "a sleek wireless earbud on a marble surface with 'Limited Edition - 50% Off' in elegant Chinese calligraphy, soft studio lighting" to generate batch-ready images with legible multilingual text and realistic textures, streamlining catalog updates without photoshoots.

Marketers targeting bilingual audiences use it for event poster design, feeding prompts with mixed English-Chinese text to produce high-detail posters that maintain typographic harmony and style consistency, saving hours on manual design for social media campaigns.

Graphic designers leverage its flexible aspect ratios for brand assets, transforming text descriptions into widescreen 16:9 visuals or vertical 9:16 stories with precise mood and lighting control, ideal for "Alibaba text-to-image" applications in advertising pipelines.

Content creators experiment with artistic styles, generating anime or realistic scenes with embedded foreign language elements, benefiting from its rich style support and prompt enhancer for quick iterations in concept art or documentary portraits.

### Tips and Tricks

How to Use qwen-image on Eachlabs

Access qwen-image seamlessly on Eachlabs via the intuitive Playground for instant testing with text prompts, aspect ratio selection, and resolution settings up to 1536px, or integrate it through the robust API and SDK for scalable apps. Provide detailed prompts in English or Chinese, optional style references, and choose outputs in JPEG, PNG, or WebP for high-quality, coherent images ready for e-commerce or marketing use.

--- ### Things to Be Aware Of ### Limitations ## Example Usage ```json { "prompt": "A steampunk astronaut playing a grand piano on the edge of a floating cliff in the sky, under a golden sunset. The cliff is covered in moss and rusted metal pipes, with small mechanical birds perched around. The astronaut’s suit is detailed with brass, leather straps, and glowing blue tubes. Clouds drift below, while distant airships pass in the background. The lighting is dramatic, casting long shadows and warm reflections on the piano’s surface. Ultra-detailed, cinematic composition, dreamy and surreal atmosphere, 8K.", "go_fast": true, "guidance": 4, "aspect_ratio": "16:9", "output_format": "webp", "output_quality": 80, "num_inference_steps": 50 } ``` ## Hardware Requirements ## Related Models - [Z Image | Turbo | Lora](https://www.eachlabs.ai/ai-models/z-image-turbo-lora) - Z Image | Turbo | Lora - [Flux 2 | Flex](https://www.eachlabs.ai/ai-models/flux-2-flex) - Flux 2 | Flex - [Flux 2 Pro](https://www.eachlabs.ai/ai-models/flux-2-pro) - Flux 2 Pro - [Flux 2 | Klein | 9B | Base | Text to Image](https://www.eachlabs.ai/ai-models/flux-2-klein-9b-base-text-to-image) - Flux 2 | Klein | 9B | Base | Text to Image ## Support - [Eachlabs Documentation](https://api.eachlabs.ai/v1/docs) - Platform documentation and guides - [API Reference](https://api.eachlabs.ai/v1/docs?spec=models) - Complete API documentation - [Contact Support](https://www.eachlabs.ai/contact) - Get help with integration and usage