Skip to main content
POST
GPT Image 1
Good prompt adherence, legible text, detailed editing.

Authorizations

Authorization
string
header
required

API Key for API endpoints

Body

prompt
string
required

The prompt for image generation

image_urls
string<uri>[]

Input images to transform or use as reference (supports multiple images)

image_size
enum<string>
default:auto

Aspect ratio for the generated image

Available options:
auto,
1024x1024,
1536x1024,
1024x1536
aspect_ratio
enum<string>
default:1:1

Aspect ratio for the generated image

Available options:
1:1,
3:2,
2:3
resolution
enum<string>
default:1080p

Resolution hint for generated image

Available options:
1080p
background
enum<string>
default:auto

Background for the generated image

Available options:
auto,
transparent,
opaque
quality
enum<string>
default:auto

Quality for the generated image

Available options:
auto,
low,
medium,
high
num_images
integer
default:1

Number of images to generate (1-10)

Required range: 1 <= x <= 10
output_format
enum<string>
default:png

Output format for the images

Available options:
jpeg,
png,
webp
n
integer
default:1

Number of results to generate (1-4)

Required range: 1 <= x <= 4

Response

Generation submission accepted

id
string
required

Generation id.

status
enum<string>
required

Queue status

Available options:
IN_QUEUE,
IN_PROGRESS,
COMPLETED,
FAILED,
CANCELED
input
Input · object
required

Normalized input payload for the generation task.

usage
object
required

Credit usage breakdown for the request

code
string

Machine-readable generation error code. Present when status is FAILED.

message
string

Sanitized human-readable failure message. Present when status is FAILED.