Skip to content

图像生成

POST
/v1/images/generations

Authorizations

bearer
TypeHTTP (bearer)

Request Body

JSON
{
"prompt": "A cute baby sea otter",
"model": "gpt-image-1",
"n": 1,
"quality": "string",
"response_format": "string",
"output_format": "string",
"output_compression": 100,
"size": "string",
"moderation": "string",
"background": "string",
"style": "string"
}

Responses

OK
application/json
JSON
{
"created": 0,
"data": [
{
"b64_json": "string",
"url": "string",
"revised_prompt": "string"
}
],
"usage": {
"total_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": {
"text_tokens": 0,
"image_tokens": 0
}
}
}

Playground

Authorization
Body
JSON

Samples