gpt-image-2 API
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 tokens | per 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
What it is good for
- E-commerce product shots and lifestyle mockups without booking a studio
- Marketing banners and social creatives with headline text baked legibly into the image
- Automated blog-cover and thumbnail generation inside a CMS or publishing pipeline
- Concept art, mood boards, and visual ideation for games and film pre-production
- Avatars, mascots, and brand illustration kept in a consistent style across a set
- Agent workflows that need on-demand visuals as one step of a larger toolchain
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.