Skip to main content
POST
/
v1
/
images
/
generations
绘图
curl --request POST \
  --url https://aiapi.xiaoliu.fun/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "model": "<string>",
  "size": "<string>"
}
'
{
  "created": 123,
  "data": [
    {
      "url": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
prompt
string
required

所需图像的文本描述

model
string
required

模型名称

size
string
required

生成图像的大小,格式为“长x宽”

Response

200 - application/json

成功响应

created
integer
data
object[]