Skip to main content
POST

授权

Authorization
string
header
必填

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

请求体

application/json
model
string
必填
Allowed value: "gpt-image-2"
prompt
string
必填
size
string

Accepts auto, a positive WIDTHxHEIGHT target, or ratio shorthand such as 16:9. Every non-auto target is mapped to the nearest official popular size: 1024x1024, 1536x1024, 1024x1536, 2048x2048, 2048x1152, 3840x2160, or 2160x3840.

示例:

"auto"

"1024x1024"

"1280x720"

"16:9"

quality
enum<string>
默认值:auto

GPT-Image 2 rendering quality.

可用选项:
auto,
low,
medium,
high
n
integer
默认值:1

Number of images to generate. Billing scales with the image count.

必填范围: 1 <= x <= 10
aspect_ratio
string
已弃用

Deprecated ratio shorthand. The ratio and compatibility tier are mapped to the nearest official popular size.

resolution
enum<string>
已弃用

Deprecated compatibility tier used to form the target size before nearest-official-size mapping.

可用选项:
1K,
2K,
4K
input_images
string<uri>[]
callback_url
string<uri>

响应

任务已创建。

task_id
string
必填
示例:

"task_123"

status
enum<string>
必填
可用选项:
pending,
processing
poll_url
string
必填
示例:

"/v1/tasks/task_123"

model
string