> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GPT-Image-2.5 공식 채널 이미지 생성

> Sunburst 및 Flare 비동기 이미지 작업, R2 결과 저장, 공식 요금의 80% 토큰 과금

Azure 공식 채널을 통해 두 GPT-Image-2.5 모델을 호출합니다. 요청을 제출하면 비동기 작업 ID가 즉시 반환됩니다. 백그라운드에서 이미지를 생성하고 결과를 R2에 저장한 후 제공합니다.

| 모델                | model                             |
| ----------------- | --------------------------------- |
| Sunburst Official | `gpt-image-2.5-sunburst-official` |
| Flare Official    | `gpt-image-2.5-flare-official`    |

표에 있는 전체 모델 이름을 사용하세요. `gpt-image-2.5-official`은 시리즈 이름이며 요청의 model 값으로 사용할 수 없습니다.

중국 본토에서는 `https://api.toapis.com`을 `https://api.toapis.cn`으로 바꾸세요. [콘솔](https://toapis.com/console/token)에서 API Key를 만들고 `TOAPIS_API_KEY` 환경 변수에 설정하세요.

## 제출 및 조회

Flare 이미지 한 장을 제출합니다. Sunburst를 호출하려면 model 값을 바꾸세요:

```bash theme={null}
curl --fail-with-body --request POST \
  --url https://api.toapis.com/v1/images/generations \
  --header "Authorization: Bearer $TOAPIS_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-image-2.5-flare-official",
    "prompt": "A small blue circle on a plain white background",
    "quality": "low",
    "size": "1024x1024",
    "n": 1
  }'
```

```json theme={null}
{
  "id": "tsk_img_example",
  "object": "generation.task",
  "model": "gpt-image-2.5-flare-official",
  "status": "pending",
  "progress": 0,
  "created_at": 1789099098,
  "metadata": {}
}
```

제출 응답의 `id`를 저장하고 아래 `TASK_ID`를 해당 값으로 바꾸세요:

```bash theme={null}
curl --fail-with-body \
  --url https://api.toapis.com/v1/images/generations/TASK_ID \
  --header "Authorization: Bearer $TOAPIS_API_KEY"
```

제출 응답 상태는 `pending`입니다. 조회 시 `queued` 또는 `in_progress`를 거쳐 `completed` 또는 `failed`가 됩니다. `completed`이면 `result.data[].url`에서 R2 이미지 URL을 가져오고, `failed`이면 `error`를 확인하세요. 몇 초 간격으로 같은 작업 ID를 조회하세요. 고품질 생성은 몇 분 걸릴 수 있으므로 중복 제출하지 말고 조회를 계속하세요. 전체 필드는 [이미지 작업 상태 API](../../tasks/image-status)를 참고하세요.

## 요청 매개변수

<ParamField header="Authorization" type="string" required>
  ToAPIs API Key를 `Bearer YOUR_API_KEY` 형식으로 사용합니다. Azure 자격 증명은 필요하지 않습니다.
</ParamField>

<ParamField body="model" type="string" required>
  `gpt-image-2.5-sunburst-official` / `gpt-image-2.5-flare-official`.
</ParamField>

<ParamField body="prompt" type="string" required>
  생성할 이미지를 설명합니다. 참조 이미지를 사용할 때는 유지하거나 변경할 내용을 설명하세요.
</ParamField>

<ParamField body="quality" type="string" default="high">
  `low`, `medium`, `high`, `xhigh`, `max`를 지원합니다. 품질과 크기는 실제 토큰 사용량과 처리 시간에 영향을 줍니다.
</ParamField>

<ParamField body="size" type="string" default="1024x1024">
  `1024x1024`, `1536x1024`, `1024x1536` 같은 픽셀 크기를 사용하세요. 사용자 지정 크기는 업스트림 검증을 통과해야 합니다. 이 예제에는 별도의 resolution 필드가 필요하지 않습니다.
</ParamField>

<ParamField body="background" type="string">
  선택 사항입니다. 투명 배경을 요청하려면 `transparent`를 지정하세요. 생략하면 업스트림 기본값을 사용합니다. 기본 PNG 출력은 투명도를 유지할 수 있습니다.
</ParamField>

<ParamField body="n" type="integer" default={1}>
  현재 공식 채널은 요청당 이미지 한 장을 생성합니다. `1`을 사용하세요.
</ParamField>

## 참조 이미지 URL

이미지 기반 생성에는 같은 JSON 생성 요청에 `image_urls`를 추가하세요. URL은 서버에서 접근할 수 있어야 합니다. [이미지 업로드 API](../../uploads/images)로 URL을 얻을 수 있습니다. 참조 이미지에는 이미지 입력 토큰 요금이 발생합니다. 제출과 조회는 같은 비동기 흐름을 사용합니다.

```bash theme={null}
curl --fail-with-body --request POST \
  --url https://api.toapis.com/v1/images/generations \
  --header "Authorization: Bearer $TOAPIS_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-image-2.5-sunburst-official",
    "prompt": "Keep the subject and replace the background with a snowy forest",
    "image_urls": ["https://example.com/reference.png"],
    "quality": "high",
    "size": "1024x1024",
    "n": 1
  }'
```

## 토큰 요금

2026-09-11에 확인한 표준 요금입니다. 두 공식 모델 모두 공식 토큰 요금의 80%, 즉 20% 할인된 가격으로 과금됩니다:

| 유형         | USD / 1,000,000 tokens |
| ---------- | ---------------------: |
| 텍스트 입력     |                   4.00 |
| 캐시된 텍스트 입력 |                   1.00 |
| 이미지 입력     |                   6.40 |
| 캐시된 이미지 입력 |                   1.60 |
| 이미지 출력     |                  24.00 |

제출 시 할당량을 먼저 예약하고 성공 후 업스트림의 실제 텍스트 및 이미지 토큰 사용량에 따라 차액을 정산합니다. 다섯 품질 단계에 같은 단가가 적용되며 품질별 고정 장당 가격은 없습니다. 제출 전에 충분한 계정 잔액과 API Key 할당량이 필요합니다.

USD 단위 요금 공식:

```text theme={null}
USD = (
  uncached_text_input_tokens * 4
  + cached_text_input_tokens * 1
  + uncached_image_input_tokens * 6.4
  + cached_image_input_tokens * 1.6
  + image_output_tokens * 24
) / 1,000,000
```

예를 들어 캐시되지 않은 텍스트 입력 17 tokens와 이미지 출력 196 tokens의 요금은 `(17 * 4 + 196 * 24) / 1,000,000 = $0.004772`입니다. 이미지 한 장당 고정 가격이 아닙니다.

계정별 가격이나 할인도 적용됩니다. 최종 요금은 사용 로그에서 확인하세요. 최신 가격은 [가격 페이지](https://toapis.com/pricing)와 계정 설정을 따릅니다.

## 관련 모델

[일반 버전](../gpt-image-2.5/generation)과 [VIP 버전](../gpt-image-2.5-vip/generation)은 각각의 전체 모델 이름을 사용합니다. 이 공식 채널에는 `-official` 접미사를 사용하세요.
