https://ee.nicerouter.com,并在 Authorization 请求头中填写 Bearer {{YOUR_API_KEY}}。gpt-image-2(固定)。接口一次只生成一张图片,n 不生效。1024x1024、1024x1536),或传 1K / 2K / 4K 并配合 aspectRatio(如 16:9、3:4、1:1)。background=transparent 时,quality 必须为 medium 或 high;low 会返回不透明图片。data[] 中包含 url 或原始 Base64 b64_json。URL 为临时链接,应及时保存到自己的存储;展示 Base64 时需补上 data:image/png;base64, 前缀。curl --location 'https://ee.nicerouter.com/v1/images/generations' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-image-2",
"prompt": "string",
"size": "1024x1024",
"aspectRatio": "1:1",
"quality": "auto",
"background": "auto"
}'{
"created": 1767321600,
"data": [
{
"url": "https://cdn.nicerouter.com/images/example.png"
}
],
"usage": {
"output_tokens": 4096,
"total_tokens": 4096,
"generated_images": 1
}
}