v12

latestOpenAPI 3.1.02026-08-031000506.8 KB
Image

ChatGPT 2

Smart powerful model for editing.

post/generate/image/openai/gpt-image-2

Headers

X-Webhook-URLstring uri

URL to receive a POST request when the job completes. The webhook will receive the job data including results.

Request body

promptstring required
quality'low' | 'medium' | 'high' | 'auto'
image_urlsstring[]
widthnumber

Width of the generated image in pixels.

heightnumber

Height of the generated image in pixels.

aspect_ratio'16:9' | '2:1' | '3:2' | '4:3' | '1:1' | '3:4' | '2:3' | '1:2' | '9:16'

Aspect ratio. One of: 16:9, 2:1, 3:2, 4:3, 1:1, 3:4, 2:3, 1:2, 9:16.

resolution'1K' | '2K' | '4K'

Resolution scale. One of: 1K, 2K, 4K.

Response

The resulting job data. This will be returned in a pending state until the job is completed. See /jobs/{id} for retrieving the results.

job_idstring uuid required
status'backlogged' | 'queued' | 'scheduled' | 'processing' | 'sampling' | 'intermediate-complete' | 'completed' | 'failed' | 'cancelled' required
created_atstring date-time required
{"stackTrail":"paths:/generate/image/openai/gpt-image-2:post:responses:200:content:application/json:schema:properties:completed_at","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/generate/image/openai/gpt-image-2:post:responses:200:content:application/json:schema:properties:result","oasType":"schema","type":"unknown"}