> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen Image 生成・編集 API

> Qwen Image API guide - Ace Data Cloud

`POST https://api.acedata.cloud/qwen-image/images` は、同一インターフェースでテキストから画像生成と 1～3 枚の参照画像編集を完了し、`qwen-image-3.0` と `qwen-image-3.0-pro` をサポートします。

## モデルを選択

| モデル | 適したシーン | 公式標準価格 |
| - | - | - |
| `qwen-image-3.0` | 一括作成、迅速な反復 | 出力 \$0.030/枚 |
| `qwen-image-3.0-pro` | 複雑なレイアウト、高精度な仕上がり | 1K $0.040/枚；2K $0.075/枚 |

参照画像は実際の入力数に応じて課金され、公式標準価格は \$0.003/枚です。

## 同期生成

```bash theme={null}
curl -X POST 'https://api.acedata.cloud/qwen-image/images' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "qwen-image-3.0",
    "prompt": "A simple red circle centered on a clean white background.",
    "size": "1024*1024",
    "n": 1,
    "watermark": false
  }'
```

成功レスポンスには、永続 CDN 画像アドレス、実際の usage、および今回の費用が含まれます：

```json theme={null}
{
  "success": true,
  "task_id": "565a7f55-72c6-43ed-b274-268ff046e5b4",
  "trace_id": "bb923cec-1550-43b4-8df2-288ac0977b4b",
  "data": [
    {"image_url": "https://cdn.acedata.cloud/assets/examples/qwen-image/40d5c76b-2f84-4b04-9ea0-b706417ae622-bac6a9e9de22.png"}
  ],
  "usage": {
    "input_image_count": 0,
    "output_image_count": 1,
    "output_image_type": "qima_output_1k",
    "output_width": 1024,
    "output_height": 1024
  },
  "cost": {"amount": 0.322, "currency": "credit", "list_amount": 0.35}
}
```

## 参照画像編集

`image_urls` を追加すると、1～3 枚の公開アクセス可能な画像をサポートします：

```json theme={null}
{
  "model": "qwen-image-3.0-pro",
  "prompt": "保留主体，将背景改成暖色电影海报风格",
  "image_urls": [
    "https://cdn.acedata.cloud/assets/examples/qwen-image/40d5c76b-2f84-4b04-9ea0-b706417ae622-bac6a9e9de22.png"
  ],
  "size": "2048*2048",
  "n": 1,
  "watermark": false
}
```

`prompt_extend_mode=agent` はテキストから画像生成にのみ使用されます。`n` の範囲は 1～6 です；アスペクト比は 1:8 から 8:1 の間である必要があります。

## 非同期タスク

`async: true` を設定すると、インターフェースは直ちに `task_id` を返します。`/qwen-image/tasks` を使用して最終状態を照会するか、`callback_url` を渡して完了通知を受け取ります。生成は一度だけ決済され、タスク照会は重複課金されません。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.