GPT Image 2 生图
生图 Key 需要绑定图片分组。当前公开生图模型为 gpt-image-2。
curl https://api.nexagwapi.com/v1/images/generations \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2", "prompt": "一艘穿过青绿色星云的未来飞船,电影级光影", "size": "1024x1024" }'香港线路把域名替换为 api.nexagw.org 即可。
常见注意事项
Section titled “常见注意事项”- 图片 Key 与文本 Key 建议分开创建,避免选错分组。
- SDK 的 Base URL 必须包含
/v1。 - 返回 URL 时应及时下载保存;返回 Base64 时需要由客户端解码。
- 遇到参数错误,先去掉可选参数,仅保留
model和prompt重试。