Generate AI images using Qwen Image 2.0, a faster accelerated version of 2.0 Pro. Supports text-to-image and image editing via reference images with the same capabilities at a lower price.

Model

alibaba/qwen-image-2.0

Parameters

ParameterTypeRequiredDescription
promptstringYesText description of the image (max 800 chars)
aspect_ratiostringNo1:1, 16:9, 9:16, 4:3, 3:4 (default: 1:1)
image_urlsarrayNoInput image URLs for editing or multi-image fusion
negative_promptstringNoWhat to avoid in the image (max 500 chars)
prompt_extendbooleanNoSmart prompt rewriting (default: true)
seedintegerNoSeed for reproducibility

Example - Text-to-Image

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/qwen-image-2.0",
    "input": {
      "prompt": "Watercolor painting of a cozy bookshop interior",
      "aspect_ratio": "1:1"
    }
  }'

Example - Image Editing

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "alibaba/qwen-image-2.0",
    "input": {
      "prompt": "Add a rainbow in the sky behind the mountains",
      "image_urls": ["https://example.com/landscape.jpg"]
    }
  }'

Response

{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "pending"
  }
}