Skip to main content
POST

Autorizaciones

Authorization
string
header
requerido

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

Cuerpo

application/json
model
string
requerido
Allowed value: "gpt-image-2"
prompt
string
requerido
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.

Ejemplos:

"auto"

"1024x1024"

"1280x720"

"16:9"

quality
enum<string>
predeterminado:auto

GPT-Image 2 rendering quality.

Opciones disponibles:
auto,
low,
medium,
high
n
integer
predeterminado:1

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

Rango requerido: 1 <= x <= 10
aspect_ratio
string
obsoleto

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

resolution
enum<string>
obsoleto

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

Opciones disponibles:
1K,
2K,
4K
input_images
string<uri>[]
callback_url
string<uri>

Respuesta

Tarea creada.

task_id
string
requerido
Ejemplo:

"task_123"

status
enum<string>
requerido
Opciones disponibles:
pending,
processing
poll_url
string
requerido
Ejemplo:

"/v1/tasks/task_123"

model
string