Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
or
Body Params application/jsonRequired
{
"model": "gpt-image-2",
"prompt": "一座未来科技城市,赛博朋克风格,夜景",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}
Request Code Samples
curl --location '/v1/images/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-image-2",
"prompt": "一座未来科技城市,赛博朋克风格,夜景",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}'
Responses
{"created":1713833628,"data":[{"url":"https://cdn.example.com/image-001.png"}]}
Modified at 2026-08-19 01:48:52