Skip to main content
POST
/
generate
/
bailian
/
qwen-image-2.0
Qwen Image 2.0 Generation
curl --request POST \
  --url https://api.sinancode.com/v1/generate/bailian/qwen-image-2.0 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "images": [
    "<string>"
  ],
  "prompt": "<string>",
  "n": 3,
  "negative_prompt": "<string>",
  "prompt_extend": true,
  "seed": 1073741823,
  "size": "<string>"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate images using Alibaba Cloud’s Qwen Image 2.0 accelerated model. Key Features:
  • Free Resolution - Supports flexible width and height, total pixels between 512x512 and 2048x2048
  • Multi-Image Output - Generate 1-6 images per request
  • Text-to-Image & Image Editing - Supports both text-to-image generation and image editing modes

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

images
string[]
required

Input image list (optional, 0-3 images, for image editing mode) Omit for text-to-image mode, provide for image editing mode

Maximum array length: 3
prompt
string
required

Prompt (required, max 800 characters)

Required string length: 1 - 800
n
integer

Number of output images (optional, 1-6, default 1)

Required range: 1 <= x <= 6
negative_prompt
string

Negative prompt (optional, max 500 characters)

Maximum string length: 500
prompt_extend
boolean

Enable smart prompt rewriting (optional, default true)

seed
integer

Random seed (optional, range 0-2147483647)

Required range: 0 <= x <= 2147483647
size
string

Image size (optional, default 20482048) qwen-image-2.0 supports flexible dimensions, total pixels between 512512 and 20482048 Recommended resolutions: 26881536(16:9) 15362688(9:16) 20482048(1:1) 23681728(4:3) 17282368(3:4)

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"