기간 한정 특가: GPT Image 2 이미지당 $0.008부터
지금 사용하기
공개 API

GPT Image Hub API 문서

Bearer API 키를 사용하여 이미지 생성, 모델 목록, 신용 잔액 및 세대 조회 엔드포인트를 호출합니다.

기본 URLhttps://www.gptimagehub.com인증 헤더Authorization: Bearer gih_live_...

빠른 시작

1
Create an API key

Sign in, open API Keys in your account, create a key, and store the one-time secret.

2
Check models and credits

Call /api/v1/models for model capabilities, then /api/v1/credits for your balance.

3
Submit a generation request

Call /api/v1/images/generations. For long-running calls, set async to true and poll the returned poll_url.

엔드포인트

GET/api/v1/modelsNo

사용 가능한 이미지 모델, 지원되는 비율, 품질 및 크레딧 비용을 나열합니다.

GET/api/v1/creditsBearer

API 키를 소유한 사용자의 크레딧 잔액을 읽습니다.

POST/api/v1/images/generationsBearer

Generate images from a prompt, or set async=true to queue a background task.

GET/api/v1/generations/:generationIdBearer

해당 세대에 대해 저장된 생성 로그와 이미지를 가져옵니다.

인증

모델 목록을 제외한 모든 v1 엔드포인트에는 Authorization 헤더에 API 키가 필요합니다. 원시 키는 생성 시 한 번 표시됩니다. 서버는 해시만 저장합니다.

Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

모델

모델 엔드포인트는 모델 ID, 공급자, 지원되는 종횡비, 지원되는 품질, 참조 이미지 제한 및 이미지당 크레딧을 반환합니다.

curl https://www.gptimagehub.com/api/v1/models

GPT IMAGE 2

gpt-image-2
openai
API 모델 IDgpt-image-2
공급자openai
크레딧1K: 8 | 2K: 10 | 4K: 12
기본 옵션auto, 1K
지원되는 품질1K, 2K, 4K
지원되는 비율auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 5:4, 4:5, 21:9, 9:21, 2:1, 1:2, 3:1, 1:3
참조 이미지최대 이미지: 16

요청 필드

필드가치메모
modelgpt-image-2이 모델 ID로 설정되어야 합니다.
size1024x1024OpenAI-compatible output size, for example auto or 1024x1024
qualityhigh사용 가능한 품질: auto, low, medium, high
n1이미지 수(1~4)
reference_image@./reference.pngmultipart/form-data에만 해당됩니다. 개수는 모델 한도를 초과할 수 없습니다.

JSON 전화

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 with premium studio lighting",
    "size": "1024x1024",
    "quality": "high",
    "n": 1
  }'

참조 이미지 호출

curl https://www.gptimagehub.com/api/v1/images/generations \
  -H "Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -F "model=gpt-image-2" \
  -F "prompt=Use the reference image and render it as a premium studio product shot" \
  -F "size=1024x1024" \
  -F "quality=high" \
  -F "n=1" \
  -F "reference_image=@./reference.png"

크레딧

크레딧 엔드포인트는 API 키를 소유한 사용자에 대한 잔액, 계정 유형 및 향후 크레딧 만료를 반환합니다.

curl https://www.gptimagehub.com/api/v1/credits \
  -H "Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

이미지 생성

The image generation endpoint waits for completion by default. Set async to true to receive a generation id immediately and poll /api/v1/generations/:generationId for the result. Credits are charged before provider generation and refunded automatically when the provider fails or returns fewer images than requested.

JSON 요청

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",
    "size": "1024x1024",
    "quality": "high",
    "n": 1
  }'

Async task

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 with premium studio lighting",
    "size": "1024x1024",
    "quality": "high",
    "n": 1,
    "async": true
  }'
{
  "object": "image_generation",
  "id": "clx_generation_log_id",
  "status": "queued",
  "model": "gpt-image-2",
  "aspect_ratio": "1:1",
  "quality": "1K",
  "created_at": "2026-04-30T08:00:00.000Z",
  "images": [],
  "usage": {
    "credits": 0,
    "credits_requested": 8
  },
  "poll_url": "https://www.gptimagehub.com/api/v1/generations/clx_generation_log_id"
}

참조 이미지 요청

curl https://www.gptimagehub.com/api/v1/images/generations \
  -H "Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -F "model=gpt-image-2" \
  -F "prompt=Use the reference image and render it as a premium studio product shot" \
  -F "size=1024x1024" \
  -F "quality=high" \
  -F "n=1" \
  -F "reference_image=@./reference.png"

응답

{
  "object": "image_generation",
  "id": "clx_generation_log_id",
  "status": "succeeded",
  "model": "gpt-image-2",
  "aspect_ratio": "1:1",
  "quality": "1K",
  "images": [
    {
      "id": "clx_image_id",
      "object": "image",
      "url": "https://cdn.example.com/generations/user/image.png",
      "created_at": "2026-04-30T08:00:00.000Z"
    }
  ],
  "usage": {
    "credits": 8
  },
  "balance": {
    "credits": 112,
    "account_type": "PRO",
    "next_expiration": null
  }
}

생성 검색

생성 엔드포인트에서 반환된 ID를 사용하여 저장된 로그 및 이미지 URLs를 검색합니다. API 키는 동일한 사용자가 소유한 세대만 읽을 수 있습니다.

curl https://www.gptimagehub.com/api/v1/generations/clx_generation_log_id \
  -H "Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

오류

{
  "error": {
    "message": "Invalid request body",
    "code": "invalid_request"
  }
}
HTTPcode설명
400invalid_request요청 본문 또는 매개변수가 잘못되었습니다.
401missingApiKeyAuthorization 헤더가 누락되었습니다.
401invalidApiKeyAPI 키가 존재하지 않거나 취소되었습니다.
401expiredApiKeyAPI 키가 만료되었습니다.
402insufficientCredits계정에 충분한 크레딧이 없습니다.
404notFound요청한 리소스를 찾을 수 없습니다.
500generationFailed이미지 생성에 실패했습니다.

한도

  • Synchronous generation can run for up to 800 seconds on production.
  • n must be between 1 and 4.
  • Reference images support PNG, JPG, JPEG, and WebP. Each file can be up to 50MB.
  • The maximum reference image count is defined by each model's reference_image_limit.
  • Async mode returns 202 with poll_url. Webhooks and a separate API rate limit are not included yet.