Qwen-Image

Advanced text-to-image generation with optional LoRA weights and prompt enhancement

Overview

Qwen-Image is a high-quality text-to-image model that supports custom LoRA weights, prompt enhancement, image-to-image generation, and negative prompts for precise control over your output. It's excellent for creating detailed, refined images with specific style requirements.

Rate Limit: 150 requests per minute

Category: Text-to-Image Generation

Price: 0.025$ / image

Quickstart

Asynchronous Request (Default)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: qwen-image' \
  -d '{
    "input": {
      "prompt": "Beautiful mountain landscape with a crystal clear lake reflecting the peaks",
      "aspect_ratio": "16:9",
      "enhance_prompt": true,
      "guidance": 5
    }
  }'

Synchronous Request (Try-Sync)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: qwen-image' \
-H 'Try-Sync: true' \
-d '{
"input": {
"prompt": "Beautiful mountain landscape with a crystal clear lake reflecting the peaks",
"aspect_ratio": "16:9",
"enhance_prompt": true,
"guidance": 5
}
}'

Parameters

Required parameters
ParameterTypeDescription
promptstringText description of the image to generate
Core Parameters
ParameterTypeDefaultDescription
enhance_promptbooleanfalseAutomatically enhance the prompt with positive magic for better results
go_fastbooleantrueRun faster predictions with additional optimizations
guidancenumber3Guidance scale (0-10) - how closely to follow the prompt
negative_promptstring" "Things to avoid in the generation (e.g., "blurry, low quality, distorted")
num_inference_stepsinteger30Number of denoising steps (1-50, more = higher quality but slower)
seedintegerrandomRandom seed for reproducible generation
disable_safety_checkerbooleanfalseDisable safety checker for generated images

Image-to-Image Parameters

ParameterTypeDefaultDescription
imagestring (URI)-Input image URL for img2img mode
strengthnumber0.9Strength for img2img pipeline (0-1)
LoRA Parameters
ParameterTypeDefaultDescription
lora_weightsstring (URI)-URL to LoRA weights file (.safetensors, .tar, or .zip)
lora_scalenumber1LoRA application strength
extra_lora_weightsarray (strings)-Additional LoRA weights as array of URLs (same formats as lora_weights)
extra_lora_scalearray (numbers)-Scales for additional LoRAs (must match number of extra_lora_weights)
Output Parameters
ParameterTypeDefaultDescription
aspect_ratiostring"16:9"Options: "1:1", "16:9", "9:16", "4:3", "3:4"
image_sizestring"optimize_for_quality"Image size: "optimize_for_quality" or "optimize_for_speed"
output_formatstring"webp"Output format: "webp", "jpg", or "png"
output_qualityinteger80Quality for jpg/webp (0-100)