Skip to main content
POST
/
v1
/
images
/
generations
图像生成
curl --request POST \
  --url https://api.qclawrouter.com/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-image-1",
  "prompt": "一只在太空中漂浮的猫,赛博朋克风格",
  "n": 1,
  "size": "1024x1024",
  "quality": "standard",
  "response_format": "url"
}
'
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

使用您的 API Key 作为 Bearer Token。在控制台创建令牌获取。

Body

application/json
model
string
required

图像模型名称

Example:

"gpt-image-1"

prompt
string
required

图像描述

Example:

"一只在太空中漂浮的猫,赛博朋克风格"

n
integer
default:1

生成数量

Required range: 1 <= x <= 10
size
enum<string>
default:1024x1024

图像尺寸

Available options:
256x256,
512x512,
1024x1024,
1024x1792,
1792x1024
quality
enum<string>
default:standard
Available options:
standard,
hd
response_format
enum<string>
default:url
Available options:
url,
b64_json

Response

200 - application/json

成功

created
integer
data
object[]