gpt-image-2 API

image-generation

gpt-image-2 is OpenAI's flagship image generation and editing model, known for photorealistic detail and clean in-image typography. On CaMeL Hub you call it through the OpenAI-compatible Images API — set base_url to https://api.camel-hub.com/v1 — at a flat $0.20 per image call.

Pricing

per 1M input tokensper 1M output tokens
CaMeL Hub$0.2 per request
Provider list price$8.00$30.00

Prices are the public default-group rate in USD per 1M tokens; input and output are billed separately. · Provider list price · verified 2026-07-11

Specifications

Provider
OpenAI
Capabilities
image-generation
Endpoints
openai, anthropic
gpt-image-2 sits at the top of OpenAI's image model family, above gpt-image-1.5 and gpt-image-1-mini. Its standout traits are strong prompt adherence on complex scenes, photorealistic lighting and materials, and — the thing that made the gpt-image line famous — reliably legible text rendered inside the image, which most diffusion-style models still get wrong. Per OpenAI's model spec it accepts text and image inputs and returns images, so it covers both fresh generation and guided editing workloads. On CaMeL Hub the model is billed per call rather than per token: every successful generation costs a flat $0.20, deducted from your balance. That makes budgeting trivial for batch pipelines — 500 marketing assets cost exactly $100, with no surprises from resolution or quality settings inflating output-token counts. You top up by Alipay, WeChat Pay, or international cards, and the same API key that runs your chat models runs this one. Behavior-wise, gpt-image-2 is not a chat model. You reach it through the dedicated images endpoint (client.images.generate with model="gpt-image-2"), it does not stream, and it does not do function calling. Responses come back as image data (base64), ready to write straight to disk or pipe into the next stage of an agent workflow.

What it is good for

Quickstart

OpenAI-compatible: set base_url to https://api.camel-hub.com/v1 and use your CaMeL Hub API key. No SDK changes needed.

cURL

curl https://api.camel-hub.com/v1/images/generations \
  -H "Authorization: Bearer $CAMEL_HUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A red panda coding at night, cinematic lighting",
    "n": 1,
    "size": "1024x1024"
  }'

Python

from openai import OpenAI

client = OpenAI(
    api_key="$CAMEL_HUB_KEY",
    base_url="https://api.camel-hub.com/v1",  # <-- the only change vs. the OpenAI default
)

img = client.images.generate(
    model="gpt-image-2",
    prompt="A red panda coding at night, cinematic lighting",
    size="1024x1024",
    n=1,
)
print(img.data[0].url)

Get an API key Browse integration guides

Frequently asked questions

How is gpt-image-2 billed on CaMeL Hub?

Per call, not per token: each image generation costs a flat $0.20, deducted from your account balance. There is no separate input/output token metering for this model on CaMeL Hub, so the price of an image never fluctuates with prompt length or quality settings.

What can gpt-image-2 do — and what can't it?

It is a dedicated image-generation model: you send a text prompt through the Images API and receive an image back. It is not a chat model — it does not stream responses and does not support function calling. For conversational or text tasks, pair it with a chat model like gpt-5.5 on the same API key.

Can I use the official OpenAI SDK?

Yes. CaMeL Hub is OpenAI-compatible: keep the openai Python or Node SDK, set base_url to https://api.camel-hub.com/v1 with your CaMeL Hub API key, then call client.images.generate(model="gpt-image-2", prompt="..."). No other code changes are needed.

How do I get started?

Create an account at https://api.camel-hub.com/console, generate an API key, and top up your balance (Alipay, WeChat Pay, and international cards are all supported). Your first image is one POST to /v1/images/generations away — at $0.20 per call you can prototype heavily for a few dollars.

More from OpenAI

OpenAI

gpt-5.5

OpenAI

gpt-5.4