---
title: "GPT Image 2 — API access"
description: "GPT Image 2 API pricing: official $5 per 1M text input tokens and $30 per 1M image output tokens, $2.50/$15 with the flat 50% apiToken.sale discount. Generation and edits on the same key and prepaid balance."
url: "https://apitoken.sale/models/gpt-image-2"
language: "en"
---
# GPT Image 2

GPT Image 2 is OpenAI's image generation and editing model — text and reference images in, rendered images out, metered per token on the same prepaid balance as every GPT and Claude model here.

- **Model ID:** `gpt-image-2`
- **Tier:** Image
- **Context window:** per request
- **Max output:** 1 image
- **Official price (per 1M):** $5 input / $30 output
- **Your price (per 1M):** input $2.5, output $15 (flat 50% off)
- **Base URL:** `https://router.apitoken.sale/v1` · **Endpoints:** `POST /v1/responses`, `POST /v1/chat/completions` (Authorization: Bearer)

## Best for

- Product image generation from a prompt on a bounded low-cost profile.
- Image editing against one to five PNG, JPEG or WebP references.
- Pipelines that already run GPT or Claude here — images debit the same balance.

## Notes

- gpt-image-2 is the alias of the immutable snapshot gpt-image-2-2026-04-21 — the same model at the same price.
- Generation is POST /v1/images/generations, editing is POST /v1/images/edits with up to five PNG, JPEG or WebP references (each ≤50 MB) — on the unified router (router.apitoken.sale/v1) or the legacy OpenAI host. Official GPT Image fields are accepted and converted. Multipart mask is ignored. Region inpaint (and hosted image_generation from a GPT text model) is POST /v1/responses with input_image plus tools image_generation; Chat Completions maps the same tool. Responses forwards output_format jpeg/webp and partial_images 1..=3, rewrites background=transparent to opaque, and drops input_fidelity. Mask image_url is PNG data URL only; no file_id.
- Images HTTP converts official client fields onto the Codex envelope (native size=auto, quality=low, background=opaque). Extra keys such as user, stream and moderation are ignored. quality medium/high still generate at low. jpeg/webp transcode the native PNG locally. n=1..10 runs sequential native turns. size including 2048x2048 and 3840x2160 maps to 1:1 or 16:9; the PNG stays ~1.57 megapixels and the response size is the IHDR. background=transparent prepends a cutout sentence. Edits accept image or image[]; mask is ignored.
- Image output bills per image-output token; cached text/image input bills at 25% of the fresh rate.

## Call it

```bash
curl https://router.apitoken.sale/v1/responses \
  -H "Authorization: Bearer $APITOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-image-2", "input": "Reply with exactly: connected"}'
```

## FAQ

**How much does the GPT Image 2 API cost?**

Officially $5 per 1M text input tokens, $8 per 1M image input tokens and $30 per 1M image output tokens (cached input at 25%). On apiToken.sale the same calls cost 50% less — $2.50/$4/$15 — at the flat discount applied to every call.

**What is the model ID for GPT Image 2?**

gpt-image-2, an alias of the immutable snapshot gpt-image-2-2026-04-21. Send it as the model field of POST /v1/images/generations or /v1/images/edits on https://router.apitoken.sale/v1 (the legacy https://openai.api.apitoken.sale/v1 serves the same routes) with your Bearer key.

**Can I send an OpenAI Images mask file?**

POST /v1/images/edits ignores the mask field so the SDK still gets a full-image edit. To inpaint a region, call POST /v1/responses with a GPT text model, the source PNG as input_image, and image_generation.input_image_mask.image_url as a PNG data URL. You can set output_format jpeg|webp and partial_images 1..=3. file_id is not supported. Chat Completions maps the same tool onto Responses.

**Does the same balance really cover image generation?**

Yes. GPT Image 2 debits the same prepaid balance as every Claude, GPT and Gemini model on the account — no separate image plan or key.

---
API reference: https://apitoken.sale/md/docs · All models: https://apitoken.sale/md/models
