Skip to main content
POST
GPT Image 2
gpt-image-2 generates one image per request. Price depends on quality and size; 100 FreeModel credits = $1. The FreeModel Playground fixes quality at medium for predictable billing. API requests can select any supported quality.
string
required
Set to gpt-image-2.
string
required
Describe the desired subject, composition, lighting, and style.
string
default:"medium"
Use low, medium, or high. Higher quality costs more.
string
default:"1024x1024"
Use 1024x1024, 1536x1024, or 1024x1536.
integer
default:"1"
Must be 1.

Request

A normal request waits for the image (up to 180 seconds) and returns its URL:
If the wait ends first, the response is HTTP 202 with a gateway task. Send Prefer: respond-async to skip waiting, then poll GET /v1/tasks/{id} with the same key. Result URLs expire; download images you want to keep.