GPT 이미지
고품질 이미지 생성 및 편집을 위한 GPT 이미지 1.5
기능
- 텍스트-이미지 생성
- 프롬프트를 이용한 이미지 편집
- 다중 품질 수준
- 유연한 이미지 크기
요금제
| Quality | 1024×1024 | 1536×1024 |
|---|---|---|
| low | 2 (~$0.02) | 3 (~$0.03) |
| medium | 8 (~$0.09) | 10 (~$0.11) |
| high | 30 (~$0.33) | 40 (~$0.44) |
Total credits = base_credits × num_images
엔드포인트
POST
/api/v1/images/generate매개변수
| Parameter | 타입 | 필수 | 설명 |
|---|---|---|---|
| model | string | 필수 | Must be "gpt-image-1.5" |
| prompt | string | 필수 | Text description of the image |
| quality | string | 선택 사항 | "low", "medium", or "high" (default: medium) |
| image_size | string | 선택 사항 | "1024x1024", "1536x1024", or "1024x1536" |
| num_images | number | 선택 사항 | Number of images (1-4) |
| input_image | string | 선택 사항 | URL or base64 for image editing |
요청 예시
{
"model": "gpt-image-1.5",
"prompt": "A serene Japanese garden with cherry blossoms",
"quality": "high",
"image_size": "1024x1024",
"num_images": 1
}응답 예시
{
"success": true,
"data": {
"task_id": "task_gpt123",
"credits_used": 30,
"remaining_credits": 470,
"model": "gpt-image-1.5"
}
}코드 예제
curl -X POST https://gateway.nanobananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-1.5",
"prompt": "A serene Japanese garden with cherry blossoms",
"quality": "high",
"image_size": "1024x1024"
}'