使用 POST /v1/images/generations 调用 gpt-image-2 的统一生图入口。
Documentation Index
Fetch the complete documentation index at: https://docs.geeknow.top/llms.txt
Use this file to discover all available pages before exploring further.
gpt-image-2 使用统一图像生成入口,适合按基础比例和尺寸档位发起文生图请求。
POST /v1/images/generations。model = "gpt-image-2" 选择目标模型。url 和 b64_json 两种返回格式。image 作为参考图,是否生效取决于实际命中的图像渠道。n 不传或显式传 0 时,统一层会回退为 1。gpt-image-2。0,统一层回退为 1。1024x1024、1536x1152、1536x1024、1024x1536、1920x1080、1080x1920。url、b64_json。false 与不传语义不同。| 预设 | 实际目标尺寸 |
|---|---|
1:1 | 1024x1024 |
4:3 | 1536x1152 |
3:2 | 1536x1024 |
2:3 | 1024x1536 |
16:9 | 1920x1080 |
9:16 | 1080x1920 |
response_format = url 时返回的图片 URL。response_format = b64_json 时返回的图片 Base64 数据。