> ## 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` | 请求生成的图片数；示例生成一张。 |

## API 参考

* [GPT Image 图像生成](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/gpt-image.md)
* [GPT Image 图像编辑](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/gpt-image-edit.md)


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