亮色模式
Create image variation
POST
https://api.openai.com/v1/images/variationsCreates a variation of a given image.
Request
Header 参数
Authorization
string
可选
示例值:
Bearer
Body 参数multipart/form-data
image
file
必需
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
示例值:
cmMtdXBsb2FkLTE2ODc4MzMzNDc3NTEtMjc=/31225951_59371037e9_small.png
n
string
可选
The number of images to generate. Must be between 1 and 10.
示例值:
2
size
string
可选
The size of the generated images. Must be one of 256x256
, 512x512
, or 1024x1024
.
示例值:
1024x1024
response_format
string
可选
The format in which the generated images are returned. Must be one of url
or b64_json
.
示例值:
url
user
string
可选
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Request samples
返回响应
成功(200)
HTTP Code: 200
Content Type : JSONapplication/json
数据结构
created
integer
必需
data
array [object {1}]
必需
url
string
必需
示例
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
最后修改时间: 10 天前