创建 gpt-image-1.5
POST
/v1/images/generations
- 根据文本
prompt生成图像(gpt-image-1.5) - 支持设置生成数量
n与输出尺寸size - 请求体为
application/json - 官方文档:Images create
Authorizations
bearer
Type
HTTP (bearer)
Request Body
application/json
model
string
Required
用于生成图像的模型,如 gpt-image-1.5。
prompt
string
Required
所需图像的文本描述。最大长度为 1000 个字符。
n
integer
要生成的图像数。必须介于 1 和 10 之间。
size
string
生成图像的尺寸。对于 GPT 图像模型,必须是 1024x1024 、 1536x1024 (横版)、 1024x1536 (竖版)或 auto (默认值)之一,对于 dall-e-2 必须是 256x256 、 512x512 或 1024x1024 之一,对于 dall-e-3 必须是 1024x1024 、 1792x1024 或 1024x1792 之一。
Responses
application/json
object
id
string
Required
object
string
Required
created
integer
Required
choices
object[]
Required
usage
object
Required