Skip to main content
POST
Image API protocol
FreeModel exposes an OpenAI-compatible image generations endpoint. Select the exact model page under Image Series for its price and output rules. Live image models include Nano Banana 2.1 (nano-banana-2.1), GPT Image 2 (gpt-image-2) and GPT Image 2.5 Ext (gpt-image-2.5-ext and gpt-image-2.5-ext-sunburst). Confirm availability with GET /v1/models.
string
required
An image model ID returned by GET /v1/models.
string
required
A clear description of the image to generate.
string
For gpt-image-2.5-ext, use flare (default) or sunburst. Do not send flare with gpt-image-2.5-ext-sunburst.
string
For Nano Banana 2.1 and Ext, use 1K (default), 2K, or 4K. This is the billed output tier.
string
For Nano Banana 2.1 and Ext, use auto or a ratio such as 1:1 or 16:9. Pixel sizes such as 1024x1024 belong only to gpt-image-2, not Ext.
integer
default:"1"
Nano Banana 2.1 accepts n: 1 only. For Ext, an integer from 1 to 4. The gateway reserves n images and charges the delivered count.
string[]
Nano Banana 2.1 and Ext. Up to 16 public image URLs or PNG/JPEG/WebP Data URLs. References have no surcharge.
string
Not part of the Ext contract. For gpt-image-2 only, use low, medium, or high.

Generate with GPT Image 2.5 Ext

A normal Ext request waits up to 180 seconds. Success returns public image URLs:
If the wait ends before the task finishes, the API returns HTTP 202 with a gateway task object. Send Prefer: respond-async to skip waiting. Then poll GET /v1/tasks/{id} with the same key. Optional Idempotency-Key (1–200 characters) applies to that gateway submission, not to an upstream provider response. See GPT Image 2.5 Ext for sizes, references, and per-image prices.
Ext bills per delivered image: $0.0085 at 1K, $0.014 at 2K, and $0.021 at 4K, for both Flare and Sunburst. This is not token billing. Catalog rates do not include payment-processor fees or promotions.

Generate with GPT Image 2

gpt-image-2 takes quality (low, medium, or high) and a pixel size (1024x1024, 1536x1024, or 1024x1536), with n fixed at 1. Like Ext, a normal request waits for the image and returns data[].url, or HTTP 202 with a gateway task when the wait ends first; send Prefer: respond-async to skip waiting.
See GPT Image 2 for prices. gpt-image-2-all is not currently offered.