> ## 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.6 공식 채널 이미지 생성

> Sunburst 및 Flare 공식 채널 비동기 이미지 작업, 마크업 편집, GIF 및 SVG 출력, R2 저장 및 토큰 과금

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

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

호출 시 표의 전체 모델명을 사용해야 합니다. `gpt-image-2.6-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.6-flare-official",
    "prompt": "A small blue circle on a plain white background",
    "size": "1:1",
    "resolution": "1k",
    "quality": "medium",
    "n": 1
  }'
```

```json theme={null}
{
  "id": "tsk_img_example",
  "object": "generation.task",
  "model": "gpt-image-2.6-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](https://docs.toapis.com/docs/ko/api-reference/tasks/image-status.md)를 참조하세요.

## 요청 파라미터

**Authorization** `string` *required*

`Bearer YOUR_API_KEY` 형식의 ToAPIs API Key를 사용합니다.

**model** `string` *required*

`gpt-image-2.6-sunburst-official` / `gpt-image-2.6-flare-official`.

**prompt** `string` *required*

이미지 설명. 참조 이미지나 마크업 이미지를 사용할 때는 유지할 부분과 변경할 부분을 설명하세요.

**size** `string` (default: auto)

비율 이름 (`1:1`, `3:2`, `2:3`, `16:9`, `9:16` 등) 또는 픽셀 크기 (`1024x1024`, `1536x1024` 등). GIF 출력 시 size 의미는 GIF 섹션을 참조하세요. 픽셀 크기는 양쪽이 16의 배수이고 16 이상이어야 하며, 각 변은 3840 이하, 긴 변은 짧은 변의 3배 이내여야 합니다. 2560x1440을 넘는 크기는 실험적입니다.

**resolution** `string`

해상도 단계 `1k` / `2k` / `4k`. 명시하면 size에서 추론된 단계보다 우선합니다. 단계는 실제 토큰 사용량과 소요 시간에 영향을 줍니다.

**quality** `string` (default: medium)

`auto`, `low`, `medium`, `high`, `xhigh`, `max` 6단계. `auto`는 요청마다 모델이 품질 단계를 자동 선택합니다. 품질은 실제 토큰 사용량과 소요 시간에 영향을 줍니다.

**n** `integer` (default: 1)

요청당 1\~4장을 생성합니다. `output_format`이 `svg`이면 `1`만 지정할 수 있습니다.

**output\_format** `string`

출력 형식 `png` / `jpeg` / `webp` / `gif` / `svg`. 생략하면 업스트림 기본값을 사용합니다. `gif`와 `svg`의 추가 파라미터와 제약은 아래 각 섹션을 참조하세요.

**output\_compression** `integer`

0-100의 압축률. `jpeg`와 `webp` 출력에만 적용됩니다.

**background** `string`

`transparent` / `opaque` / `auto`. 명시적 투명은 `png` / `webp` 출력에만 적용되며, `svg`는 기본적으로 투명합니다.

**moderation** `string`

콘텐츠 모더레이션 수준 `auto` / `low`.

**complexity** `string`

생성 복잡도 `low` / `medium` / `high`. 생략하면 `high`입니다. 별도 과금은 없습니다.

## 참조 이미지와 마스크

이미지에서 이미지를 생성하려면 같은 JSON 요청에 `image_urls`를 추가하세요. 최대 16장이며 URL은 서버에서 접근 가능해야 합니다. 먼저 [이미지 업로드 API](https://docs.toapis.com/docs/ko/api-reference/uploads/images.md)로 URL을 얻을 수 있습니다. 참조 이미지는 이미지 입력 토큰으로 과금됩니다.

`mask_url`은 PNG 알파 마스크 이미지를 가리키며, 크기는 첫 번째 참조 이미지와 같아야 하고 `image_urls`와 함께 사용해야 합니다.

```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.6-sunburst-official",
    "prompt": "Keep the subject and replace the masked area with a snowy forest",
    "image_urls": ["https://example.com/reference.png"],
    "mask_url": "https://example.com/mask.png",
    "quality": "high",
    "size": "1024x1024",
    "n": 1
  }'
```

## 마크업 편집

`markup_url`은 주석이 달린 참조 이미지를 가리킵니다 (또는 `markup`으로 인라인 주석 객체를 전달). `image_urls`로 원본 이미지를 지정하면 모델이 주석의 의미에 따라 편집합니다. `markup_url`과 `mask_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.6-sunburst-official",
    "prompt": "Follow the markup annotations to adjust the layout",
    "image_urls": ["https://example.com/reference.png"],
    "markup_url": "https://example.com/markup.png",
    "quality": "high",
    "n": 1
  }'
```

## GIF 출력

`output_format`에 `gif`를 지정하면 애니메이션을 생성합니다. `frame_count`로 프레임 수 (2-16), `frame_duration_ms`로 프레임당 길이를 지정합니다. GIF는 텍스트-이미지 생성만 지원하며 `image_urls`, `mask_url`, `markup_url`, `markup`, `output_compression`과 함께 사용할 수 없습니다. `size`는 `512x512` 같은 정확한 픽셀 크기를 전달하거나 생략해 업스트림 기본 프레임 크기를 사용하세요. `1:1` 같은 비율 값은 GIF에서 거부됩니다.

```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.6-flare-official",
    "prompt": "A paper airplane looping across a blue sky, flat illustration",
    "output_format": "gif",
    "frame_count": 8,
    "frame_duration_ms": 200,
    "size": "512x512",
    "n": 1
  }'
```

## SVG 출력

`output_format`에 `svg`를 지정하면 벡터 이미지를 생성합니다. `svg` 객체와 그 안의 `svg.model`도 함께 제공해야 합니다. SVG는 텍스트-이미지 생성만 지원하고 `n`은 `1`만 가능하며 `image_urls`, `mask_url`, `markup_url`, `markup`, `output_compression`과 함께 사용할 수 없습니다. SVG 생성은 `svg.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.6-flare-official",
    "prompt": "A minimalist mountain logo, flat vector style",
    "output_format": "svg",
    "svg": { "model": "gpt-5" },
    "n": 1
  }'
```

## 토큰 가격

두 official 모델은 토큰 항목별로 과금됩니다. 텍스트 입력, 캐시된 텍스트 입력, 이미지 입력, 캐시된 이미지 입력, 이미지 출력이 각각 별도 요금입니다. 제출 시 쿼터가 먼저 차감되고, 성공 후 실제 토큰 사용량에 따라 환불 또는 추가 과금됩니다.

USD 단위 비용 공식:

```text theme={null}
USD = (
  uncached_text_input_tokens * text_input_price
  + cached_text_input_tokens * cached_text_input_price
  + uncached_image_input_tokens * image_input_price
  + cached_image_input_tokens * cached_image_input_price
  + image_output_tokens * image_output_price
) / 1,000,000
```

GIF는 전체 애니메이션의 출력 토큰으로 과금됩니다. SVG 출력은 이미지 토큰 외에 `svg.model`로 지정한 텍스트 모델의 입출력 토큰 요금이 발생합니다.

계정 전용 가격이나 할인은 계속 적용됩니다. 최종 청구 금액은 사용 로그에서 확인할 수 있으며, 최신 가격은 [가격 페이지](https://toapis.com/pricing)와 계정 설정을 따릅니다.

## 관련 모델

[GPT-Image-2.5 공식 채널](https://docs.toapis.com/docs/ko/api-reference/images/gpt-image-2.5-official/generation.md), [일반판](https://docs.toapis.com/docs/ko/api-reference/images/gpt-image-2.5/generation.md), [VIP 판](../gpt-image-2.5-vip/generation)은 각각 고유한 전체 모델명을 사용합니다. 이 공식 채널을 호출할 때는 `-official` 접미사를 사용하세요.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.