GPT Image Hub Public API
Use the GPT Image Hub Public API to list supported image models, check account credits, generate images, and retrieve generation records.
Discovery
- API Catalog: /.well-known/api-catalog
- OpenAPI: /openapi.json
- Status: /api/health
Authentication
Protected endpoints use Bearer API keys created in the account API key page.
Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Endpoints
GET /api/v1/modelslists public image models and does not require authentication.GET /api/v1/creditsreturns the authenticated account credit balance.POST /api/v1/images/generationsgenerates one to four images synchronously.GET /api/v1/generations/{generationId}returns one authenticated generation record.
Models
| ID | Name | Provider | Quality | Reference images |
|---|---|---|---|---|
gpt-image-2 | GPT IMAGE 2 | openai | 1K, 2K, 4K | up to 16 |
nanobanana | Nano Banana | gemini | 1K | up to 3 |
nanobanana2 | Nano Banana 2 | gemini | 1K, 2K, 4K | up to 14 |
nanobananapro | Nano Banana Pro | gemini | 1K, 2K, 4K | up to 14 |
Example
curl https://www.gptimagehub.com/api/v1/images/generations \
-H "Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A cinematic product photo of a transparent perfume bottle on black marble",
"aspect_ratio": "1:1",
"quality": "1K",
"n": 1
}'