All models

OpenAI

GPT Image 2

GPT Image 2 produces one square image. Native output resolution varies by route (1024–1254 pixels).

image

Our price

$0.0054

per image

Official output price

$0.006

per image

10% less

First request

Available
# Set OPERATION_ID once per generation; reuse it when retrying.
OPERATION_ID=$(python3 -c "import uuid; print(uuid.uuid4())")
curl https://api.tokely.me/v1/images/generations \
  -H "Authorization: Bearer $TOKELY_API_KEY" \
  -H "Idempotency-Key: $OPERATION_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-image-2",
  "aspect_ratio": "1:1",
  "resolution": "1K",
  "background": "opaque",
  "n": 1,
  "prompt": "A quiet coastal village at sunrise."
}'

Set TOKELY_API_KEY to your dashboard key. Requests require a funded Tokely balance. Base URL: https://api.tokely.me/v1.

Capabilities & limits

Provider
OpenAI
API model ID
gpt-image-2
Category
Image
Endpoints
POST /v1/images/generations
Output
Image · synchronous response
Supported input
Prompt, Aspect ratio, Resolution, Background, Images
One bounded generation
$0.0054 per image

API reference

Authenticate with Authorization: Bearer YOUR_TOKELY_API_KEY. Use your Tokely base URL and API key.

model
Required string: gpt-image-2
prompt (required)
Text, up to 20000 characters
aspect_ratio
auto, 1:1, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 16:9, 9:16, 2:1, 1:2, 3:1, 1:3, 21:9, 9:21. Default: 1:1
resolution
1K, 2K, 4K. Default: 1K
background
transparent, opaque, auto. Default: opaque
n
Between 1 and 1; whole numbers. Default: 1

Requests are charged to your Tokely balance using the options and rates shown above. Your dashboard records usage.

The response contains the generated image. Save or download the result returned by the API.

400 / 415
Invalid request, parameter, endpoint for this model, or content type.
401 / 403
Invalid, revoked or restricted API key.
402
Insufficient account balance or API key budget.
429
Request limit reached. Retry after the indicated delay.
502 / 503 / 504
Upstream failure, temporary service unavailability or request timeout.

Compare nearby prices

USD for the listed variants with the same billing unit. Generation options can differ; these are not quality benchmarks.
ModelPriceUnitVariant
GPT Image 2OpenAI · this model$0.0054imageOne bounded generation
Seedream 3.0Doubao$0.027imageOne bounded generation
GPT Image 1.5OpenAI$0.0306imageOne bounded generation
Nano BananaGoogle$0.0312imageOne bounded generation
Qwen Image 3.0Qwen$0.036imageOne bounded generation

Compare equivalent generation settings

Match model version, duration, resolution and input requirements before comparing two prices. Results are kept for 30 days; download those you need to keep.

Compare image API costs · OpenAI models · Methodology

Frequently asked questions

How much does GPT Image 2 cost?

One bounded generation: $0.0054 per image. Usage is charged to your Tokely balance.

Do I need a separate OpenAI account?

Use your Tokely API key and balance. A separate provider key is not required.

How do I switch to this model?

Set model to gpt-image-2 and use /v1/images/generations. Keep your Tokely base URL and API key. Use the parameters listed above for this model.

Related versions