REPO STORY / 레포 이야기
apimartdyahafov/gpt-image-1.5-official-api-ko
GPT Image 1.5를 OpenAI 호환 API로 호출, 토큰 기반 종량제 빌링
01 / 뭐 하는 레포인가요?
어떤 일을
도와주나요?
이 레포는 APIMart의 OpenAI 호환 엔드포인트를 통해 OpenAI의 GPT Image 1.5 이미지 생성 모델을 호출하는 방법을 설명합니다. 프롬프트를 POST로 보내면 작업 ID를 받은 후, 폴링(반복 조회)으로 생성된 이미지 URL과 정확한 비용을 얻을 수 있습니다. 같은 API 키와 엔드포인트로 300개 이상의 다른 모델도 접근 가능하며, API 키를 설정한 후 Python이나 curl로 바로 사용할 수 있습니다.
- OpenAI 호환 REST 엔드포인트
- 토큰 기반 종량제 (캐시된 입력 무료)
- 비동기 폴링 방식 작업 처리
동일한 API 키와 엔드포인트로 300+ 다양한 모델 접근 가능하며, 모델 필드 변경만으로 전환합니다.
02 / 내 상황에 맞을까?
이럴 때 써요,
선택 전에 확인해요.
이럴 때 써요
- 애플리케이션에 이미지 생성 기능을 추가하고 각 요청의 비용을 정확히 추적
- 여러 이미지 생성 모델을 비교 테스트하되 단일 API 인터페이스와 통합 결제 사용
- 배치 이미지 생성 작업을 비동기 큐로 처리하고 작업 ID로 진행 상황 모니터링
이럴 땐 다시 확인해요
아래 준비 조건이 맞지 않으면 먼저 환경을 준비해 주세요.
- APIMART_API_KEY 환경변수 설정
- APIMart 계정 및 $1 이상 잔액
- Python 3 및 requests 라이브러리 (Python 예제 실행 시)
깃밥 한국어 요약의 활용 예와 준비 조건을 옮겼어요.
03 / 시작하려면
첫 걸음,
차근차근.
준비할 것
- APIMART_API_KEY 환경변수 설정
- APIMart 계정 및 $1 이상 잔액
- Python 3 및 requests 라이브러리 (Python 예제 실행 시)
- API 키를 환경 변수로 설정합니다.
export APIMART_API_KEY="your-api-key-here"
- curl로 이미지 생성을 요청합니다.
curl --request POST --url https://api.apimart.ai/v1/images/generations \
--header "Authorization: Bearer $APIMART_API_KEY" --header 'Content-Type: application/json' \
-d '{"model":"gpt-image-1.5-official","prompt":"A bamboo forest at sunrise, slow push-in","size":"1:1","resolution":"1K"}'
- Python으로 작업을 제출하고 완료될 때까지 폴링합니다.
import os, time, requests
BASE = "https://api.apimart.ai/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}", "Content-Type": "application/json"}
created = requests.post(f"{BASE}/images/generations", headers=HEADERS, timeout=60, json={
"model": "gpt-image-1.5-official", "prompt": "A bamboo forest at sunrise, slow push-in",
}).json()
task_id = created["data"]["id"]
while True:
task = requests.get(f"{BASE}/tasks/{task_id}", headers=HEADERS, timeout=60).json()["data"]
if task["status"] in ("completed", "failed"):
break
time.sleep(5)
print(task.get("cost"), task["result"]["images"][0]["url"])
명령은 기존 요약에 적힌 그대로예요. 실행하거나 설치 성공을 검증하지 않았어요. 공식 소요시간 미제시.
04 / 이웃 레포
어떤 레포와 연결될까요?
비교 연결망의 정적 스냅샷 · 관계 종류와 기록된 근거예요. 현재 공개된 레포만 표시해요.
apimartt9/kling-v3-api-ko ↗
구체 GitHub 토픽 공유: ai-api-gateway,api-aggregator,api-pricing,apimart-ko,llm-api-gateway
repos.topics 교집합 (ai-api-gateway,api-aggregator,api-pricing,apimart-ko,llm-api-gateway)
연결망 스냅샷 원자료 ↗apimartno/deepseek-v3.2-api-ko ↗
구체 GitHub 토픽 공유: ai-api-gateway,api-aggregator,api-pricing,apimart-ko,llm-api-gateway
repos.topics 교집합 (ai-api-gateway,api-aggregator,api-pricing,apimart-ko,llm-api-gateway)
연결망 스냅샷 원자료 ↗apimartnyylvtdc/gpt-image-2.5-flare-api-ko ↗
구체 GitHub 토픽 공유: ai-api-gateway,api-aggregator,api-pricing,apimart-ko,llm-api-gateway
repos.topics 교집합 (ai-api-gateway,api-aggregator,api-pricing,apimart-ko,llm-api-gateway)
연결망 스냅샷 원자료 ↗apimartchmcg/kling-v3-api-fr ↗
구체 GitHub 토픽 공유: ai-api-gateway,api-aggregator,api-pricing,llm-api-gateway,pay-as-you-go
repos.topics 교집합 (ai-api-gateway,api-aggregator,api-pricing,llm-api-gateway,pay-as-you-go)
연결망 스냅샷 원자료 ↗apimartdecg4/deepseek-v4-pro-api-ja ↗
구체 GitHub 토픽 공유: ai-api-gateway,api-aggregator,api-pricing,llm-api-gateway,pay-as-you-go
repos.topics 교집합 (ai-api-gateway,api-aggregator,api-pricing,llm-api-gateway,pay-as-you-go)
연결망 스냅샷 원자료 ↗cqk4s1t/veo3.1-fast-api-fr ↗
구체 GitHub 토픽 공유: ai-api-gateway,api-aggregator,api-pricing,llm-api-gateway,pay-as-you-go
repos.topics 교집합 (ai-api-gateway,api-aggregator,api-pricing,llm-api-gateway,pay-as-you-go)
연결망 스냅샷 원자료 ↗