GPT Image 2

Higher quality image generation model for production visual work.

Image

Image 2 technical docs

Endpoint, auth header, parameters, prices, and tested request examples for GPT Image 2.

Endpoint

Endpoint and pricing

POST /images/generations Endpoint https://api.imole.app/v1 Base URL 10L · 25M · 50H / image API cauris 10L · 25M · 50H / image Agent cauris
Headers

Request headers

Authorization required

Bearer Imole API key.

Content-Type required

Use application/json for JSON requests.

Parameters

Request parameters

model required

gpt-image-1.5 or gpt-image-2.

prompt required

Image prompt describing subject, style, composition, and constraints.

size

Requested output size.

gpt-image-2: flexible WIDTHxHEIGHT · gpt-image-1.5: 1024x1024, 1024x1536, 1536x1024
quality

Generation quality.

auto, low, medium, high
n

Number of images to generate.

1-10
output_format

Image format.

png, jpeg, webp
output_compression

Compression for jpeg/webp outputs.

0-100
background

Background handling. Use auto or opaque as the safe default; transparent is only accepted on compatible requests.

auto, opaque, transparent (when supported)
moderation

Moderation strictness when supported.

auto, low
images

Input images for edit requests.

mask

Edit mask for inpainting.

Examples

Tested request examples

Product visual
curl -X POST "https://api.imole.app/v1/images/generations" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2",
  "prompt": "A polished product screenshot illustration for an AI workspace dashboard, natural light, no text",
  "size": "1536x1024",
  "quality": "medium",
  "n": 1,
  "output_format": "png"
}'
Clean background asset
curl -X POST "https://api.imole.app/v1/images/generations" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2",
  "prompt": "A friendly AI assistant sun icon centered on a warm cream card, isolated subject, no text",
  "size": "1536x1024",
  "quality": "medium",
  "background": "opaque",
  "output_format": "png",
  "n": 1
}'
Alternate size
curl -X POST "https://api.imole.app/v1/images/generations" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2",
  "prompt": "A cinematic hero scene of a founder reviewing analytics on a laptop, clean studio background",
  "size": "2048x1152",
  "quality": "medium",
  "n": 1,
  "output_format": "png"
}'