> ## 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.

# GPT Image 1.5

> GPT Image 1.5: プロンプトから画像を生成したり、既存の画像を編集したりできます。生成と編集では別々のエンドポイントを使います。

プロンプトから画像を生成したり、既存の画像を編集したりできます。生成と編集では別々のエンドポイントを使います。

`POST /v1/images/generations`

## リクエスト例

実行前に `MIXROUTE_API_KEY` を設定してください。

```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": "gpt-image-1.5",
  "prompt": "A red ceramic mug on a white table.",
  "size": "1024x1024",
  "n": 1
}'
```

`data[].b64_json` をデコードして画像を保存します。

## パラメーターと制限

| フィールド | 説明 |
| - | - |
| `model` | `gpt-image-1.5`. 例に記載されているモデル ID をそのまま指定します。 |
| `prompt` | 生成する画像の説明。 |
| `size` | `1024x1024` などの標準サイズ、または `auto`。 |
| `n` | 生成枚数。例では 1 枚です。 |

## API リファレンス

* [GPT Image 画像生成](https://mixroute.ai/docs/ja/api-reference/endpoint/gpt-image.md)
* [GPT Image 画像編集](https://mixroute.ai/docs/ja/api-reference/endpoint/gpt-image-edit.md)


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