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

# GPT-Image

> 通过 /v1/images 调用 OpenAI GPT-Image 系列。

# GPT-Image

使用 OpenAI GPT-Image 系列模型（如 `gpt-image-2`、`gpt-image-2.5`、`gpt-image-2.5-flare`、`gpt-image-2.5-exact`、`gpt-image-2.5-sunburst`）：

* `POST /v1/images/generations` — 生成
* `POST /v1/images/edits` — 编辑（支持 JSON 与 `multipart/form-data`）

常用字段：`prompt`、`size` / `aspect_ratio`、`quality`、`n`、`background`、`output_format`、`response_format`；若支持可开 `stream`。`model` 以[模型广场](https://omniall.ai/pricing)为准。

## 支持的比例与分辨率

按画质档位（1K / 2K / 4K）与比例，对应像素尺寸如下：

| 比例 | 1K | 2K | 4K |
| - | - | - | - |
| 3:1 | 1536×512 | 3072×1024 | 3840×1280 |
| 21:9 | 1344×576 | 2688×1152 | 3840×1648 |
| 16:9 | 1280×720 | 2048×1152 | 3840×2160 |
| 3:2 | 1152×768 | 2304×1536 | 3520×2352 |
| 4:3 | 1024×768 | 2048×1536 | 3312×2480 |
| 1:1 | 1024×1024 | 2048×2048 | 2880×2880 |
| 3:4 | 768×1024 | 1536×2048 | 2480×3312 |
| 2:3 | 768×1152 | 1536×2304 | 2352×3520 |
| 9:16 | 720×1280 | 1152×2048 | 2160×3840 |
| 1:3 | 512×1536 | 1024×3072 | 1280×3840 |

也可直接传 `size`（如 `1024x1024`、`2048x1152`、`3840x2160`、`auto`）。自定义尺寸时建议：单边 ≤ 3840px、宽高均为 16 的倍数、长宽比 ≤ 3:1、总像素约在 655360–8294400。


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