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

# Qwen Image Edit

> Qwen Image Edit: テキストの指示で参照画像を編集します。multipart や `metadata` ラッパーは使いません。

テキストの指示で参照画像を編集します。multipart や `metadata` ラッパーは使いません。

`POST /v1/images/generations`

## リクエスト例

実行前に `MIXROUTE_API_KEY` を設定してください。 `https://example.com/reference.png` は公開アクセス可能な HTTPS 画像 URL に置き換えてください。

```bash theme={null}
curl --request POST 'https://api.mixroute.ai/v1/images/generations' \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "qwen-image-edit",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "text": "Change the mug to blue."
          },
          {
            "image": "https://example.com/reference.png"
          }
        ]
      }
    ]
  },
  "parameters": {
    "size": "1024*1024",
    "n": 1
  }
}'
```

画像は `output.choices[].message.content[].image` から取得します。

## パラメーターと制限

| フィールド | 説明 |
| - | - |
| `model` | `qwen-image-edit`. 例に記載されているモデル ID をそのまま指定します。 |
| `input.messages[].content[]` | 1 件の `user` メッセージにテキストブロック 1 つと画像ブロック 1～3 個を分けて指定します。 |
| `parameters.size` | `1024*1024` のように `幅*高さ` で指定します。 |
| `parameters.n` | 1 回のリクエストでは `1` のみ指定できます。 |

## API リファレンス

* [Qwen 画像編集](https://mixroute.ai/docs/ja/api-reference/endpoint/qwen-image-edit.md)


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