Authorization: Bearer ********************{
"model": "gpt-image-2-1k",
"prompt": "一张极简风格的 API 平台首页插图,白色背景,蓝绿色点缀",
"n": 1,
"size": "1024x1024",
"quality": "auto",
"response_format": "url"
}curl --location '/docs/images/gpt-image-1/generation' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-image-2-1k",
"prompt": "一张极简风格的 API 平台首页插图,白色背景,蓝绿色点缀",
"n": 1,
"size": "1024x1024",
"quality": "auto",
"response_format": "url"
}'{
"created": 1735689600,
"data": [
{
"url": "https://example.com/images/img-abc123.png",
"revised_prompt": "一张极简风格的 API 平台首页插图,白色背景,蓝绿色点缀"
}
]
}