Skip to content

图像生成

POST
/v1/images/generations

Authorizations

bearer
TypeHTTP (bearer)

Request Body

application/json
JSON
{
"prompt": "A cute baby sea otter",
"model": "gpt-image-1",
"n": 1,
"quality": "medium",
"response_format": "url",
"output_format": "png",
"output_compression": 100,
"size": "1024x1024",
"moderation": "low",
"background": "transparent",
"style": "vivid"
}

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

Samples