# Alibaba Qwen Image 3 Edit API

> Alibaba Qwen Image 3 image editing model with support for up to three reference images.

Source: https://www.sandbase.ai/models/alibaba/qwen-image-3/edit
API reference: https://www.sandbase.ai/models/alibaba/qwen-image-3/edit/docs

## Facts

- Provider: Alibaba
- Type: Image model
- Model ID: `alibaba/qwen-image-3/edit`
- Price: From $0.04 per run
- Capabilities: image to image
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/qwen-image-3/edit",
  "images": [
    "https://media.sandbase.ai/files/3b376bfd-65d4-4653-817b-51098dee1045.png"
  ],
  "prompt": "用途：precise-object-edit。图像1是唯一编辑目标。这是中国高中数学试卷批改真实性测试。\n严格保留原图的木桌、相机视角、纸张轮廓与阴影，以及全部黑色印刷文字、题号、公式、图形和版式；禁止重绘、改写、移动或删除原试卷内容。只新增以下红色教师签字笔笔迹：\n1. 在试卷右上角写“112/150”并用红笔圈住。\n2. 在四个部分标题旁依次写“45/60”“15/20”“10/20”“42/70”。\n3. 仅在第3、14、25题题号旁画红色叉号；仅在第1、13、21题题号旁画红色勾号。\n4. 在第25题旁写“计算错误”，在第22题旁写“过程不完整”。\n红笔必须像中国高中教师真实批卷：自然手写、轻微倾斜、压感和墨迹浓淡变化，位置准确且不遮挡题干。不要添加学生答案、手、人物、文具、印章、水印或其他内容。除指定红笔内容外，画面保持不变。",
  "aspect_ratio": "3:4",
  "output_format": "png"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Alibaba Qwen Image 3 Edit through SandBase?

Create a SandBase API key, then send requests with the model ID "alibaba/qwen-image-3/edit" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Alibaba account?

No. One SandBase API key and balance gives you access to Alibaba Qwen Image 3 Edit and the other models in the catalog; you do not need to sign up with Alibaba separately.

## README

### Qwen Image 3 Edit

Edit up to three images with an instruction using Qwen Image 3 (Pro). It handles precise local edits, text replacement, and multi-image composition while keeping untouched areas unchanged.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Up to 800 characters. |
| `images` | image URL[] (≤3), required | — | Images to edit, Image 1 to Image 3. The first is the main edit target. |
| `aspect_ratio` | `21:9` / `16:9` / `3:2` / `4:3` / `5:4` / `1:1` / `4:5` / `3:4` / `2:3` / `9:16` | `3:4` | Output shape. |
| `output_format` | `jpeg` / `png` | `png` | Output file format. |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

$0.04 per output image plus $0.003 per input image, Alibaba's list price for Qwen Image 3.0 Pro.

| Input images | Price |
|---|---|
| 1 | $0.043 |
| 2 | $0.046 |
| 3 | $0.049 |

Failed runs are not charged.

#### Prompting

- Say which image is the edit target and what each other image contributes.
- List what must stay unchanged: layout, faces, printed text.
- Quote replacement text exactly.

#### Limits

- Up to 3 input images; the prompt is limited to 800 characters.

#### Also on SandBase

Related: `alibaba/qwen-image-3/text-to-image`, `alibaba/qwen-image-edit/2511`.
