신규: GPT Image 2.5 Flare와 Sunburst. 가입하면 3장 무료, 이후 장당 8 크레딧.
GPT Image 2.5 사용해 보기
공개 API

GPT Image Hub API 문서

Bearer API 키를 사용해 이미지 생성, 모델 목록, 크레딧 잔액, 생성 결과 조회 엔드포인트를 호출합니다.

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

빠른 시작

1
API 키 생성

로그인한 뒤 계정에서 API 키 페이지를 열고 키를 생성한 다음, 한 번만 표시되는 시크릿 키를 저장하세요.

2
모델 및 크레딧 확인

모델 기능을 확인하려면 /api/v1/models를 호출하고 잔액을 확인하려면 /api/v1/credits를 호출하세요.

3
생성 요청 제출

/api/v1/images/generations를 호출합니다. 오래 걸리는 호출은 async를 true로 설정하고 반환된 poll_url을 폴링하세요.

엔드포인트

GET/api/v1/modelsNo

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

GET/api/v1/creditsBearer

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

POST/api/v1/images/generationsBearer

프롬프트로 이미지를 생성하거나, async=true로 설정해 백그라운드 작업으로 대기열에 등록합니다.

GET/api/v1/generations/:generationIdBearer

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

인증

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

Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

모델

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

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

Z-Image Turbo

z-image-turbo
alibaba
API 모델 IDz-image-turbo
공급자alibaba
크레딧15
기본 옵션auto, 1K
지원되는 품질1K, 2K
지원되는 비율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
참조 이미지지원되지 않음

요청 필드

필드값메모
modelz-image-turbo이 모델 ID로 설정되어야 합니다.
size1024x1024OpenAI-compatible output size, for example auto or 1024x1024
qualityhigh사용 가능한 품질: auto, low, medium, high
n1이미지 수(1~4)
reference_image-multipart/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": "z-image-turbo",
    "prompt": "A cinematic product photo with premium studio lighting",
    "size": "1024x1024",
    "quality": "high",
    "n": 1
  }'

크레딧

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

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

이미지 생성

이미지 생성 엔드포인트는 기본적으로 생성이 완료될 때까지 기다립니다. async를 true로 설정하면 generation id를 즉시 받을 수 있으며, /api/v1/generations/:generationId를 폴링해 결과를 확인합니다. 크레딧은 공급자 생성 전에 차감되며, 공급자 쪽에서 실패하거나 요청보다 적은 이미지를 반환하면 자동으로 환불됩니다.

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
  }'

비동기 작업

curl https://www.gptimagehub.com/api/v1/images/generations \
  -H "Authorization: Bearer gih_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042-hero-image" \
  -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": 7
  },
  "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": 7
  },
  "balance": {
    "credits": 113,
    "account_type": "PRO",
    "next_expiration": null
  }
}

생성 결과 조회

생성 엔드포인트가 반환한 ID로 저장된 생성 로그와 이미지 URL을 조회합니다. 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": "invalidRequest"
  }
}
HTTPcode설명
400invalidRequest요청 본문 또는 매개변수가 잘못되었습니다.
401missingApiKeyAuthorization 헤더가 누락되었습니다.
401invalidApiKeyAPI 키가 존재하지 않거나 취소되었습니다.
401expiredApiKeyAPI 키가 만료되었습니다.
401emailUnverified계정 이메일이 아직 인증되지 않았습니다. 발송된 이메일에서 인증을 완료한 후 다시 시도하세요.
402insufficientCredits계정에 충분한 크레딧이 없습니다.
404notFound요청한 리소스를 찾을 수 없습니다.
429rateLimited요청이 너무 많습니다. Retry-After 헤더에 지정된 시간(초) 동안 대기한 후 다시 시도하세요.
429freeTierLimited무료 가입 크레딧만 있는 계정은 시간당 최대 10개의 이미지를 생성할 수 있습니다.
500generationFailed이미지 생성에 실패했습니다.
503serviceUnavailable서비스를 일시적으로 사용할 수 없습니다. Retry-After 헤더 이후에 다시 시도하세요.

한도

  • 프로덕션 환경에서 동기식 생성은 최대 800초 동안 실행될 수 있습니다.
  • n은 1에서 4 사이여야 합니다.
  • 참조 이미지는 PNG, JPG, JPEG 및 WebP를 지원합니다. 모든 참조 이미지를 포함한 전체 요청은 4.5MB 미만을 유지해야 합니다(이미지 총합은 4MB 미만으로 유지). 더 큰 요청은 API에 도달하기 전에 호스팅 플랫폼에서 일반 텍스트 413으로 거부되므로, 먼저 이미지 크기를 조정하거나 압축하세요.
  • 최대 참조 이미지 수는 각 모델의 reference_image_limit에 의해 정의됩니다.
  • 속도 제한: API 키당 분당 60회의 생성 요청 및 IP 주소당 분당 120회. 모든 응답에는 RateLimit-Limit, RateLimit-Remaining 및 RateLimit-Reset 헤더가 포함되며, 429 응답에는 Retry-After도 포함됩니다.
  • 생성을 안전하게 재시도하려면 Idempotency-Key 헤더(최대 120자)를 전송하세요. 동일한 API 키로 동일한 키를 다시 요청하면 요금이 다시 청구되지 않고 기존 생성 결과가 반환됩니다.
  • 비동기 모드는 poll_url과 함께 202를 반환합니다. 웹후크는 아직 지원되지 않습니다.