GPT Image 2 Beta API on MaxAPI
GPT Image 2 Beta is the lower-cost MaxAPI route for GPT Image 2 generation. It exposes both an official-cheap token-priced route and a mix route billed per output image, on the same /v1/images/generations endpoint as the main model.
Common use cases
- Generate new marketing, editorial, or product imagery from a text prompt
- Edit or recompose an existing image with one or more reference images
- Iterate quickly between aspect ratios and resolutions for the same prompt
- Mix multiple reference images to compose a new scene
Endpoints
Image generation is synchronous by default. Set "async": true to queue and poll, or pass X-MaxAPI-Async: true on the Gemini-native endpoint.
- POST /v1/images/generations
- POST /v1/images/edits
- GET /v1/images/generations/{task_id}
- GET /v1/images/edits/{task_id}
Lineage
Source: OpenAI's GPT Image 2 family. MaxAPI exposes it through the OpenAI-compatible /v1/images/* endpoints so existing OpenAI SDK code works after pointing base_url at https://api.maxapi.dev.
Dimensions and sizing
Accepts size values matching OpenAI's allowed list (e.g. 1024x1024, 1152x2048 for 9:16 at 2K, 4096x4096 for 1:1 at 4K). The model returns the exact pixel dimensions requested.
Available routes
Pass route_mode in the request body (or X-MaxAPI-Route-Mode on the Gemini-native endpoint) to select. If you don't pass one, MaxAPI follows the API key's configured order.
- official-cheap — lower-cost MaxAPI-configured route on the same upstream model, billed at a reduced rate.
- mix — blended route that may switch between providers for cost and stability; typically the lowest per-image price for beta variants.
Pricing
Pricing is per route mode. Failed requests are not charged. 1 credit = 1 USD.
- official-cheap: text_input $0.35 per 1M tokens
- official-cheap: image_input $0.35 per 1M tokens
- official-cheap: image_output $0.7 per 1M tokens
- mix: $0.012 per output image
Quick example
curl -X POST "https://api.maxapi.dev/v1/images/generations" \
-H "Authorization: Bearer $MAXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2-beta",
"prompt": "a clean product photo of a glass cube",
"size": "1024x1024",
"quality": "high",
"n": 1
}'
FAQ
Is GPT Image 2 Beta on MaxAPI OpenAI-compatible?
Yes. Send requests to POST /v1/images/generations and POST /v1/images/edits with an Authorization: Bearer header. The body shape matches OpenAI's image API.
How do I switch between route_mode options?
Pass "route_mode": "official" / "official-cheap" / "mix" in the JSON body, or set X-MaxAPI-Route-Mode on the Gemini-native endpoint. Defaults to the API key's configured order.
How is billing handled?
Failed requests don't charge credits. Per-image, per-call, and per-generation pricing is billed on completion; token-priced routes settle from upstream usage. 1 credit = 1 USD.
Where does the returned URL live?
Output assets are stored on MaxAPI's CDN (cdn.maxapi.dev) with a 7-day TTL. Pass "asset_delivery": "mirror" to receive URLs on the configured alias domain instead.
Full API reference