GPT Image 2 through this gateway: calling it and pricing it

gpt-image-2 is 0.1× — $0.50 per million input tokens and $3.00 per million output. It is the one image id billed on tokens, so cost moves with size and quality.

The call: one endpoint, bearer auth

gpt-image-2 answers on POST /v1/images/generations with Authorization: Bearer $TOKEN_SHARE_KEY — the standard OpenAI-compatible image shape, so an existing client usually needs only a base URL and a key.

The catalog describes it as an image generation and editing model with flexible sizes and high-fidelity image inputs. Its capability list is image and nothing else: no text, no tools, no thinking. It generates and edits pictures, and it is not a model you hold a conversation with.

Because it has no token context in the catalog sense, there is no context window or max-output figure to plan against. What you plan against instead is the usage the gateway reports back, which is also what you are billed on.

Generate an image and read back the usage you are billed on.
export TOKEN_SHARE_KEY="<your-pool-api-key>"

curl -sS https://token-share.app/v1/images/generations \
  -H "Authorization: Bearer $TOKEN_SHARE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A cute baby sea otter",
    "size": "1024x1024",
    "quality": "high",
    "response_format": "b64_json"
  }' > out.json

# Save the picture.
jq -r '.data[0].b64_json' out.json | base64 --decode > otter.png

# Price it: consumer rates are 0.1x of $5/M input and $30/M output.
jq -r '.usage | "in=\(.input_tokens) out=\(.output_tokens)"' out.json
jq '.usage | (.input_tokens / 1000000 * 0.50) + (.output_tokens / 1000000 * 3.00)' out.json

What it costs, and why nobody can quote you a per-image price

The multiplier is 0.1×, applied to official rates of $5 per million input tokens and $30 per million output. You are charged $0.50/M and $3.00/M. Cached input, where it applies, is priced separately from fresh input.

What that turns into per picture depends on the request. The catalog is explicit that billing runs on the tokens the gateway reports, so cost scales with resolution and quality — a 1024×1024 at standard quality and a large image at high quality are not the same bill, and the difference is not a fixed ratio you can carry between settings.

The consequence for planning is simple: measure, do not assume. Generate one image at the exact size and quality your product uses, read the usage object, and multiply. That measured figure is valid for that setting and no other.

Against the per-image alternatives

The other two image ids here are billed by the picture, both at 0.2×: grok-imagine-image is $0.002 per image (0.2× of $0.01), grok-imagine-image-quality is $0.008 (0.2× of $0.04). gpt-image-2 is the only one of the three at 0.1×, and the only one whose cost you cannot state before the call.

That is a genuine trade between two kinds of certainty. A per-image price lets you budget by multiplication and never be surprised by a parameter change. A token-billed price can land lower or higher depending on what you ask for, and it moves when your product's image settings move.

Which is better is a question about your workload, not about the models. A fixed daily count at a fixed size favours arithmetic you can do in advance; a mix of sizes, edits and quality levels is where measuring a representative sample is the only honest way to forecast. Run both on the same twenty prompts and compare the invoice line, not the marketing.

Operating it in production

Log the usage object on every generation. It is the only record of what a request actually cost, and once your image settings are a product decision rather than a constant, a stored per-request token count is what lets you attribute a monthly bill to a feature.

Set your image parameters explicitly rather than relying on defaults. A default that changes upstream is a silent price change on a token-billed model, and the first place it shows up is the invoice.

If you also generate video, note that it is a different id with a different route and a different unit: grok-imagine-video-1.5 is 0.2× charged per video second on /openai/v1/videos. Nothing about the image endpoint carries over.

Common questions

Is gpt-image-2 cheaper than the Grok image models?
It carries the lower multiplier — 0.1× against 0.2× — but that does not settle the per-picture comparison, because the two are billed in different units. grok-imagine-image is a fixed $0.002 per image; gpt-image-2 costs whatever its reported tokens come to at $0.50/M input and $3.00/M output, which depends on the size and quality you request. One quick bound, before you count input at all: $0.002 buys about 667 output tokens at $3.00/M, so a gpt-image-2 image whose usage reports more output tokens than that already costs more than a grok-imagine-image picture. Measure your own settings and compare the two totals.
Can gpt-image-2 edit an existing image?
The catalog describes it as an image generation and editing model with high-fidelity image inputs, so image input is part of what it does. Billing does not change shape for an edit: it is still the tokens the gateway reports, at $0.50/M input and $3.00/M output, so an edit that carries a large source image is priced accordingly.
Why does the model page show no context window?
Because it is an image model and the catalog records no context or max-output figure for it. Any such number quoted for gpt-image-2 elsewhere is not from this catalog. The figures that do apply are its 0.1× multiplier and the $5/$30 per-million official rates behind it.