返回接口概览
POST/v1/images/generations

创建图像

使用已启用的图像模型根据文本提示生成图像。

API Key application/json
Request

请求

/v1/images/generations

Body

必填
Bodyapplication/json
Bodyobject
modelstring必填

已启用的图像模型 ID。

promptstring必填

图像生成提示词。

sizestring

模型支持的图像尺寸。

路径、查询与 Header 参数

此接口没有额外的路径、查询或 Header 参数。

Response

返回响应 200

成功响应
响应 200application/json
响应 200object
createdinteger
示例1730000000
dataarray<object>
元素object
urlstring
示例https://example.invalid/generated-image.png