Skip to main content

Documentation Index

Fetch the complete documentation index at: https://doc.onetoken.one/llms.txt

Use this file to discover all available pages before exploring further.

Bailian Qwen-Image series

Use Qwen-Image-Edit (Tongyi Qwen Bailian) to generate or edit images from reference images (such as depth maps or edge maps) plus prompts.

Model preview

Qwen models

ModelSummaryOutput image spec
qwen-image-edit-plusQwen image editing Plus series with multi-image output and custom resolution.Resolution:
- Configurable: width and height each in [512, 2048] pixels.
- Default: total pixels near 1024*1024, with aspect ratio close to the input image (or the last image for multi-image input).
Format: PNG
Count: 1-6 images
qwen-image-edit-plus-2025-12-15
qwen-image-editSupports single-image editing and multi-image fusion.Resolution: not configurable. Uses the same default rule above.
Format: PNG
Count: fixed at 1 image

Basics

  • Endpoint: POST /v1/images/edits
  • Auth: Bearer Token (Authorization: Bearer sk-xxxxxx)
  • Content-Type: application/json

Request headers

Content-Type string (required) Must be application/json. Authorization string (required) Bearer API key auth. Example: Bearer sk-xxxx.

Request body

Qwen format.
FieldTypeRequiredDescription
modelstringYesModel name, e.g. qwen-image-edit-plus.
inputobjectYesInput object.
└─ messagesarrayYesMessage list.
└─ └─ rolestringYesRole, usually user.
└─ └─ contentarrayYesArray containing image and text.
└─ └─ └─ imagestringYes- Formats: JPG, JPEG, PNG, BMP, TIFF, WEBP, GIF.
- Output format is PNG; for GIF input, only the first frame is processed.
- Recommended resolution: both width and height between 384 and 3072 pixels.
- File size: <=10MB.
- For file uploads, the platform auto-converts to base64. For public URLs, use Qwen-format parameters.
Supported input forms:
1) Public URL (HTTP/HTTPS), e.g.
2) Temporary OSS URL (obtained via upload), e.g.
3) Base64 string, e.g.
└─ └─ └─ textstringYesPositive prompt describing target content/style/composition.
Supports Chinese/English, max 800 chars (extra chars truncated).
Example: Make the girl in image 1 wear the black dress from image 2 and sit in the pose from image 3, while keeping hairstyle/expression unchanged and motion natural.
Note: content must contain exactly one text object, otherwise the request fails.
parametersobjectNoControl parameters.
└─ nintegerNoNumber of output images, default 1.
For qwen-image-2.0 series, qwen-image-edit-max, qwen-image-edit-plus series: 1-6 images.
For qwen-image-edit: only 1 image.
└─ negative_promptstringNoNegative prompt for undesired content.
Supports Chinese/English, max 500 chars (extra truncated).
Example: low resolution, errors, worst quality, low quality, missing parts, extra fingers, bad proportions, etc.
└─ watermarkbooleanNoAdd watermark or not.
└─ seedintegerNoRandom seed in [0,2147483647].
Same seed can improve consistency, but exact reproducibility is not guaranteed.

Response

Status: 200 OK
FieldTypeDescription
createdintegerUnix timestamp.
dataarrayResults list.
└─ urlstringEdited image URL.
└─ b64_jsonstringBase64 image data.
└─ revised_promptstringFinal optimized prompt used by the model.

Request example

{
  "model": "qwen-image-edit-plus",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "image": "https://example.com/reference_depth_map.webp"
          },
          {
            "text": "Generate an image consistent with the depth map: a rusty red bicycle on a muddy path, with dense old-growth forest in the background"
          }
        ]
      }
    ]
  },
  "parameters": {
    "n": 1,
    "prompt_extend": true,
    "watermark": false
  }
}

Developer tips

  1. Reference-image mode: Unlike OpenAI alpha-mask editing, Qwen edit is often used for structural control (e.g. depth maps/line art), then generation follows your prompt.
  2. Multimodal input: content must include both an image object and a text object so the model has both visual and textual guidance.