跳转到主要内容
POST
/
ms
/
v1
/
images
/
generations
OpenAI SDK — images.generate (sync)
curl --request POST \
  --url https://api.mountsea.ai/ms/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-image-2",
  "prompt": "A cinematic scene with soft natural lighting.",
  "size": "1024x1024",
  "quality": "high",
  "n": 1
}
'
{
  "created": 123,
  "data": [
    {
      "b64_json": "<string>"
    }
  ]
}

授权

Authorization
string
header
必填

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

请求体

application/json
model
string
必填
示例:

"gpt-image-2"

prompt
string
必填
n
integer

Maps to num_images

size
string
示例:

"1024x1024"

quality
enum<string>
可用选项:
low,
medium,
high
output_format
enum<string>
可用选项:
png,
jpeg,
webp

响应

OpenAI ImagesResponse (data[].b64_json)

created
integer
data
object[]