{
"model": "gpt-image-1",
"prompt": "会飞的小白兔",
"n": 1,
"size": "1024x1024",
"quality": "low",
"user": "string"
}curl --location -g --request POST 'http://api.example.com/v1/images/generations' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-image-1",
"prompt": "会飞的小白兔",
"n": 1,
"size": "1024x1024",
"quality": "low",
"user": "string"
}'{
"created": 1764420587,
"background": "opaque",
"data": [
{
"b64_json": "{base64_data}"
}
],
"output_format": "png",
"quality": "low",
"size": "1024x1024",
"usage": {
"input_tokens": 11,
"input_tokens_details": {
"image_tokens": 0,
"text_tokens": 11
},
"output_tokens": 272,
"total_tokens": 283
}
}