Skip to main content
POST
GPT Image 2
gpt-image-2 generates one 1K image per synchronous request. A successful generation costs $0.01, equal to 1 SnapGen credit.
string
required
Set to gpt-image-2.
string
required
Describe the desired subject, composition, lighting, and style.
string
Use 1024x1024, 1536x1024, or 1024x1536. Other values use automatic framing.
integer
default:"1"
Set to 1; multiple-image requests are not supported.

Request

The request normally completes in 20 to 60 seconds. Set a timeout of at least 120 seconds and decode data[0].b64_json as image bytes.

Open the model playground

Run the same route from the SnapGen model page.