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

# 이미지 생성

## 소개

이미지 생성 API는 텍스트-이미지, 이미지-이미지, 이미지 편집 등을 지원합니다. 통합 API 인터페이스를 통해 Gemini, Doubao Seedream, GPT Image, Tongyi Qianwen 등 여러 주요 이미지 생성 모델을 호출할 수 있습니다.

## 인증

<ParamField header="Authorization" type="string" required>
  Bearer Token, 예: `Bearer sk-xxxxxxxxxx`
</ParamField>

## 요청 매개변수

<ParamField body="model" type="string" required>
  모델 식별자, 지원 모델:

  * Gemini 시리즈: `gemini-2.5-flash-image` (Nano Banana), `gemini-3-pro-image-preview` (Nano Banana Pro) 등
  * Doubao Seedream 시리즈: `doubao-seedream-3-0-t2i-250415`, `doubao-seedream-4-0-250828`, `doubao-seedream-4-5-251128`, `doubao-seededit-3-0-i2i-250628` 등
  * GPT Image 시리즈: `gpt-image-2` 등
  * Tongyi Qianwen 시리즈: `qwen-image-plus`, `qwen-image-edit-plus` 등
</ParamField>

<ParamField body="prompt" type="string">
  텍스트-이미지 생성용 텍스트 프롬프트
</ParamField>

<ParamField body="response_format" type="string" default="url">
  응답 형식: `b64_json` 또는 `url`

  **참고**: 모델마다 `response_format` 지원이 다릅니다:

  * **Gemini 시리즈**: `b64_json`만 지원, 전달 값과 관계없이 항상 base64 인코딩 이미지 데이터 반환
  * **Doubao Seedream 시리즈**: 보통 URL 링크 반환, `response_format` 매개변수가 적용되지 않을 수 있음
  * **GPT Image 시리즈**: `b64_json`만 지원, base64 인코딩 이미지 데이터 강제 반환
  * **Tongyi Qianwen 시리즈**: `b64_json`과 `url` 모두 지원, 매개변수 값에 따라 해당 형식 반환(`b64_json`은 URL에서 다운로드 후 base64로 변환)
</ParamField>

<ParamField body="contents" type="array">
  이미지-이미지 또는 맥락 대화용 다중 턴 콘텐츠
</ParamField>

## 기본 예제

<Tabs>
  <Tab title="Gemini">
    <Tabs>
      <Tab title="텍스트-이미지">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "gemini-2.5-flash-image",
            "prompt": "A cute orange kitten sitting in a garden, sunny day, high quality photography",
            "size": "16:9",
            "quality": "high",
            "n": 1,
            "temperature": 1.1,
            "top_p": 0.95,
            "response_format": "b64_json",
            "image_size": "2K",
            "mime_type": "image/png",
            "response_modalities": "image"
          }'
        ```
      </Tab>

      <Tab title="이미지-이미지">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "gemini-2.5-flash-image",
            "size": "16:9",
            "quality": "high",
            "image_size": "3K",
            "temperature": 1.1,
            "top_p": 0.95,
            "response_format": "b64_json",
            "contents": [
              {
                "role": "user",
                "parts": [
                  {"text": "Generate an aerial view of Canton Tower based on this image"},
                  {"image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."}
                ]
              }
            ]
          }'
        ```
      </Tab>

      <Tab title="다중 이미지 융합">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "gemini-2.5-flash-image",
            "size": "16:9",
            "image_size": "3K",
            "temperature": 1.1,
            "top_p": 0.95,
            "response_format": "b64_json",
            "contents": [
              {
                "role": "user",
                "parts": [
                  {"text": "Apply the oil painting style from the first image to the content of the second image"},
                  {"image": "https://example.com/style.jpg"},
                  {"image": "https://example.com/content.jpg"}
                ]
              }
            ]
          }'
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Doubao Seedream">
    <Tabs>
      <Tab title="텍스트-이미지">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "doubao-seedream-4-0-250828",
            "prompt": "A cute orange kitten sitting in a garden, sunny day, high quality photography",
            "size": "2048x2048",
            "watermark": false,
            "seed": 12345,
            "optimize_prompt_options": {
              "mode": "standard"
            }
          }'
        ```
      </Tab>

      <Tab title="이미지-이미지">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "doubao-seedream-4-0-250828",
            "prompt": "Change this image to oil painting style",
            "size": "2048x2048",
            "watermark": false,
            "seed": 12345,
            "contents": [
              {
                "role": "user",
                "parts": [
                  {"image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."},
                  {"text": "Change this image to oil painting style"}
                ]
              }
            ]
          }'
        ```
      </Tab>

      <Tab title="연속 이미지 생성">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "doubao-seedream-4-0-250828",
            "prompt": "A cute orange kitten sitting in a garden, sunny day, high quality photography",
            "size": "2048x2048",
            "watermark": false,
            "sequential_image_generation": "auto",
            "sequential_image_generation_options": {
              "max_images": 4
            },
            "optimize_prompt_options": {
              "mode": "standard"
            }
          }'
        ```
      </Tab>

      <Tab title="이미지 편집">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "doubao-seededit-3-0-i2i-250628",
            "prompt": "Change this image to oil painting style",
            "watermark": false,
            "guidance_scale": 2.5,
            "seed": 12345,
            "contents": [
              {
                "role": "user",
                "parts": [
                  {"image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."},
                  {"text": "Change this image to oil painting style"}
                ]
              }
            ]
          }'
        ```
      </Tab>

      <Tab title="3.0 모델 (Guidance Scale)">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "doubao-seedream-3-0-t2i-250415",
            "prompt": "A cute orange kitten sitting in a garden, sunny day, high quality photography",
            "size": "1024x1024",
            "watermark": false,
            "guidance_scale": 7.5,
            "seed": 12345
          }'
        ```
      </Tab>

      <Tab title="4.5 모델 (표준/빠른 모드)">
        ```bash theme={null}
        # 표준 모드
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "doubao-seedream-4-5-251128",
            "prompt": "A cute kitten",
            "size": "2048x2048",
            "watermark": false,
            "optimize_prompt_options": {
              "mode": "standard"
            }
          }'

        # 빠른 모드
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "doubao-seedream-4-0-250828",
            "prompt": "A cute kitten",
            "size": "2048x2048",
            "watermark": false,
            "optimize_prompt_options": {
              "mode": "fast"
            }
          }'
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="GPT Image">
    <Tabs>
      <Tab title="텍스트-이미지">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "gpt-image-2",
            "prompt": "A cute orange kitten sitting in a garden, sunny day, high quality photography",
            "size": "1024x1024",
            "quality": "high",
            "n": 1
          }'
        ```
      </Tab>

      <Tab title="이미지-이미지">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "gpt-image-2",
            "prompt": "Change this image to oil painting style",
            "size": "1024x1024",
            "quality": "high",
            "input_fidelity": "medium",
            "n": 1,
            "image": "data:image/png;base64,iVBORw0KGgoAAxxxx..."
          }'
        ```
      </Tab>

      <Tab title="다중 이미지 융합">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "gpt-image-2",
            "prompt": "Apply the style from the first image to the content of the second image",
            "size": "1024x1024",
            "quality": "high",
            "input_fidelity": "high",
            "n": 2,
            "images": [
              "data:image/png;base64,iVBORw0KGgoAAxxxx...",
              "data:image/png;base64,iVBORw0KGgoAAyyyy..."
            ]
          }'
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Tongyi Qianwen">
    <Tabs>
      <Tab title="텍스트-이미지">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "qwen-image-plus",
            "input": {
              "messages": [
                {
                  "role": "user",
                  "content": [
                    {
                      "text": "一副典雅庄重的对联悬挂于厅堂之中，房间是个安静古典的中式布置，桌子上放着一些青花瓷，对联上左书“义本生知人机同道善思新”，右书“通云赋智乾坤启数高志远”， 横批“智启通义”，字体飘逸，在中间挂着一幅中国风的画作，内容是岳阳楼。"
                    }
                  ]
                }
              ]
            },
            "parameters": {
              "negative_prompt": "1",
              "prompt_extend": true,
              "seed": "4",
              "watermark": true
            }
          }'
        ```
      </Tab>

      <Tab title="이미지 편집">
        ```bash theme={null}
        curl -X POST "https://api.gravitex.ai/v1/images/generations" \
          -H "Authorization: Bearer sk-xxxxxxxxxx" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "qwen-image-edit-plus",
            "input": {
              "messages": [
                {
                  "role": "user",
                  "content": [
                    {
                      "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/fpakfo/image36.webp"
                    },
                    {
                      "text": "Generate an image that matches the depth map. Description: a red, worn-out bicycle parked on a muddy path, with a dense primeval forest in the background."
                    }
                  ]
                }
              ]
            },
            "parameters": {
              "n": 2,
              "negative_prompt": "low quality",
              "watermark": true,
              "size": "2048*2048",
              "seed": 1
            }
          }'
        ```
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

## 모델별 매개변수

모델마다 지원하는 매개변수가 다릅니다. 아래는 모델별 상세 매개변수 설명입니다:

<Tabs>
  <Tab title="Doubao Seedream">
    <ParamField body="image " type="string">
      doubao-seedream-3-0-t2i-250415는 입력 이미지에 이 매개변수를 지원하지 않습니다.
      URL 또는 Base64 인코딩을 지원합니다. doubao-seedream-4.5와 doubao-seedream-4.0은 단일 또는 다중 이미지 입력을 지원하며(다중 이미지 융합 예제 참고), doubao-seededit-3.0-i2i는 단일 이미지 입력만 지원합니다.
    </ParamField>

    <ParamField body="size" type="string">
      이미지 크기, 지원 크기는 모델 버전에 따라 다름:

      * **doubao-seedream-3.0**: `1024x1024`, `1152x864`, `864x1152`, `1280x720`, `720x1280`, `1248x832`, `832x1248`, `1512x648`
      * **doubao-seedream-4.0/4.5**: `2048x2048`, `2304x1728`, `1728x2304`, `2560x1440`, `1440x2560`, `2496x1664`, `1664x2496`, `3024x1296` (2K) or `4096x4096`, `4704x3520`, `3520x4704`, `5504x3040`, `3040x5504`, `4992x3328`, `3328x4992`, `6240x2656` (4K)
    </ParamField>

    <ParamField body="watermark" type="boolean" default="false">
      워터마크 추가 여부
    </ParamField>

    <ParamField body="seed" type="integer">
      생성 결과의 무작위성을 제어하는 시드. 동일 시드는 유사한 결과를 생성합니다. 범위: `0`\~`2147483647`
    </ParamField>

    <ParamField body="guidance_scale" type="number">
      가이던스 스케일, 생성 이미지가 프롬프트와 얼마나 일치하는지 제어. 값이 높을수록 엄격하고, 낮을수록 자유로움. 권장 범위: `1.0-10.0`, 기본값: `2.5`. `doubao-seedream-3.0-t2i-250415`와 `doubao-seededit-3.0-i2i-250628`만 지원
    </ParamField>

    <ParamField body="sequential_image_generation" type="string">
      연속 이미지 생성 토글, `doubao-seedream-4.0`과 `doubao-seedream-4.5`만 지원:

      * `"auto"`: 연속 이미지 생성 활성화
      * `"disabled"`: 연속 이미지 생성 비활성화(기본값)
    </ParamField>

    <ParamField body="sequential_image_generation_options" type="object">
      연속 이미지 생성 구성 옵션, `sequential_image_generation`이 `"auto"`일 때만 적용:

      * `max_images` (integer): 최대 이미지 수, 범위 `1-4`, 기본값 `4`
    </ParamField>

    <ParamField body="optimize_prompt_options" type="object">
      doubao-seedream-4.5(현재 standard 모드만 지원)와 doubao-seedream-4.0만 이 매개변수 지원

      * `mode` (string): 최적화 모드
        * `"standard"`: 표준 모드, 품질은 높지만 시간이 더 걸림(기본값, 4.0과 4.5 모두 지원)
        * `"fast"`: 빠른 모드, 시간은 짧지만 품질은 보통(4.0만 지원)
    </ParamField>
  </Tab>

  <Tab title="GPT Image">
    <ParamField body="size" type="string">
      이미지 크기, 지원: `1024x1024`, `1024x1536`, `1536x1024`. 기본값: `1024x1024`
    </ParamField>

    <ParamField body="quality" type="string" default="high">
      이미지 품질:

      * `"low"`: 가장 빠른 생성 속도, 최저 비용
      * `"medium"`: 품질과 속도의 균형
      * `"high"`: 최고 품질, 가장 풍부한 디테일(gpt-image-2 기본값)
    </ParamField>

    <ParamField body="n" type="integer" default="1">
      생성할 이미지 수, 범위: `1-10`. 생성마다 해당 할당량 소비
    </ParamField>

    <ParamField body="input_fidelity" type="string">
      입력 충실도, 이미지-이미지 모드에서만 적용:

      * `"low"`: 더 많은 창의적 자유, 원본과 차이 큼
      * `"medium"`: 충실도와 창의성의 균형
      * `"high"`: 원본 특징 유지, 변화 작음
      * `"auto"`: 적절한 충실도 자동 선택
    </ParamField>

    <ParamField body="image" type="string">
      단일 입력 이미지, URL 또는 Base64 형식 지원(`data:image/...;base64,...`)
    </ParamField>

    <ParamField body="images" type="array">
      다중 입력 이미지 배열, 최대 10장. 각 이미지는 URL 또는 Base64 형식 지원
    </ParamField>
  </Tab>

  <Tab title="Gemini">
    <ParamField body="size" type="string">
      이미지 종횡비, 지원: `1:1`, `3:2`, `2:3`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`. 픽셀 크기(예: `1024x1024`)도 사용 가능하며, 시스템이 해당 비율로 자동 변환
    </ParamField>

    <ParamField body="quality" type="string">
      이미지 품질, `imageSize` 매개변수에 매핑:

      * `"hd"`, `"high"`, `"2K"`: `2K` 해상도로 매핑
      * `"standard"`, `"medium"`, `"low"`, `"auto"`, `"1K"`: `1K` 해상도로 매핑(기본값)
    </ParamField>

    <ParamField body="n" type="integer" default="1">
      생성할 이미지 수(`sample_count` 매개변수에 해당)
    </ParamField>

    <ParamField body="aspect_ratio" type="string">
      종횡비, `size` 매개변수와 동일한 기능
    </ParamField>

    <ParamField body="person_generation" type="string" default="allow_adult">
      인물 생성 제어, 기본값: `"allow_adult"`
    </ParamField>

    <ParamField body="max_output_tokens" type="integer" default="32768">
      출력 토큰 제한, 기본값: `32768`
    </ParamField>

    <ParamField body="top_p" type="number" default="0.95">
      Top-P 샘플링 값, 범위: `0.0-1.0`, 기본값: `0.95`
    </ParamField>

    <ParamField body="image_size" type="string">
      이미지 크기, 지원: `1K`(기본값), `2K`, `4K`
    </ParamField>

    <ParamField body="mime_type" type="string" default="image/png">
      출력 형식, 지원: `image/png`(기본값), `image/jpeg`
    </ParamField>

    <ParamField body="response_modalities" type="string" default="image">
      응답 모달리티, 지원: `image`(기본값), `image-text`
    </ParamField>
  </Tab>

  <Tab title="Tongyi Qianwen">
    <ParamField body="parameters" type="object" required>
      생성 매개변수 객체, 다음 필드 포함:

      * `role` (string, 필수): 메시지 발신자 역할, `user`로 설정해야 함
      * `image` (string): qwen-image-edit-plus 모델 전용. URL 또는 Base64 인코딩 이미지 데이터. 입력 이미지 1-3장 지원. 다중 이미지 시 배열 순서로 순서가 정해지며, 출력 종횡비는 마지막 이미지 기준
      * `n` (integer, 필수): 출력 이미지 수, 기본값 1. qwen-image-edit-plus 시리즈는 1-6장 출력 가능. qwen-image-edit은 1장만 지원
      * `negative_prompt` (string): 네거티브 프롬프트, 원하지 않는 요소 제외용
      * `prompt_extend` (boolean, default: true): 프롬프트 확장 활성화 여부. 짧은 프롬프트는 활성화, 상세 프롬프트는 비활성화 권장. qwen-image-edit-plus 시리즈만 지원
      * `watermark` (boolean, default: true): 워터마크 추가 여부
      * `seed` (integer): 랜덤 시드, 범위 `0-2147483647`
    </ParamField>
  </Tab>
</Tabs>

## 응답 형식

```json theme={null}
{
  "code": 200,
  "msg": "Success",
  "data": {
    "data": [
      {
        "url": "",
        "b64_json": "iVBORw0KGgoAAAANSUhEUgAABAAAAAQA...",
        "revised_prompt": ""
      }
    ],
    "created": 1757320007
  }
}
```

## 지원 모델

### Gemini 시리즈

**모델명**: `gemini-2.5-flash-image` (Nano Banana)

**핵심 기능**:

* ✅ 텍스트-이미지(순수 텍스트 설명으로 이미지 생성)
* ✅ 이미지-이미지(단일 이미지 + 텍스트로 새 이미지 생성)
* ✅ 다중 이미지-단일 이미지(2-5장 융합 생성)
* ✅ 다중 턴 대화형 이미지 생성(맥락 기반 연속 수정)

**지원 종횡비**: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

**이미지 입력**: URL 및 Base64 형식 지원, 최대 7MB

**모델명**: `gemini-3-pro-image-preview` (Nano Banana Pro)

**핵심 기능**:

* ✅ 텍스트-이미지(순수 텍스트 설명으로 이미지 생성)
* ✅ 이미지-이미지(단일 이미지 + 텍스트로 새 이미지 생성)
* ✅ 다중 이미지-단일 이미지(2-5장 융합 생성)
* ✅ 다중 턴 대화형 이미지 생성(맥락 기반 연속 수정)
* ✅ 더 높은 품질 출력

**지원 종횡비**: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

**이미지 입력**: URL 및 Base64 형식 지원, 최대 7MB

### Doubao Seedream 시리즈

**모델명**: `doubao-seedream-3-0-t2i-250415`

**핵심 기능**:

* ✅ 텍스트-이미지(순수 텍스트 설명으로 이미지 생성)
* ✅ 가이던스 스케일 조절 지원
* ✅ 랜덤 시드 제어 지원
* ❌ 이미지-이미지 미지원

**지원 크기**: 1024×1024, 1152×864, 864×1152, 1280×720, 720×1280, 1248×832, 832×1248, 1512×648

**모델명**: `doubao-seedream-4-0-250828`

**핵심 기능**:

* ✅ 텍스트-이미지(순수 텍스트 설명으로 이미지 생성)
* ✅ 이미지-이미지(단일 이미지 + 텍스트로 새 이미지 생성)
* ✅ 다중 이미지 융합(2-5장 융합 생성)
* ✅ 연속 이미지 생성
* ✅ 2K/4K 해상도 지원
* ✅ 다양한 이미지 형식 지원

**지원 크기**:

* 2K: 2048×2048, 2304×1728, 1728×2304, 2560×1440, 1440×2560, 2496×1664, 1664×2496, 3024×1296
* 4K: 4096×4096, 4704×3520, 3520×4704, 5504×3040, 3040×5504, 4992×3328, 3328×4992, 6240×2656

**이미지 입력**: JPEG, PNG, WEBP, BMP, TIFF, GIF 형식 지원, 최대 10MB

**제한 사항**: 입력+출력 최대 15장이지만, 너무 많이 출력하지 않는 것을 권장(예: 텍스트-이미지 15장 또는 입력 1장에 출력 14장). 출력이 많을수록 시간이 더 걸립니다.

**모델명**: `doubao-seedream-4-5-251128`

**핵심 기능**:

* ✅ 텍스트-이미지(순수 텍스트 설명으로 이미지 생성)
* ✅ 이미지-이미지(단일 이미지 + 텍스트로 새 이미지 생성)
* ✅ 다중 이미지 융합(2-5장 융합 생성)
* ✅ 연속 이미지 생성
* ✅ 2K/4K 해상도 지원
* ✅ 프롬프트 최적화 옵션 지원
* ✅ 다양한 이미지 형식 지원

**지원 크기**: doubao-seedream-4-0과 동일

**이미지 입력**: JPEG, PNG, WEBP, BMP, TIFF, GIF 형식 지원, 최대 10MB

**제한 사항**: 입력+출력 최대 15장이지만, 너무 많이 출력하지 않는 것을 권장(예: 텍스트-이미지 15장 또는 입력 1장에 출력 14장). 출력이 많을수록 시간이 더 걸립니다.

**모델명**: `doubao-seededit-3-0-i2i-250628`

**핵심 기능**:

* ✅ 이미지 편집(단일 이미지 + 텍스트 편집)
* ✅ 가이던스 스케일 조절 지원
* ✅ 랜덤 시드 제어 지원
* ✅ 이미지 편집(콘텐츠 수정, 스타일 전환 등)
* ❌ 순수 텍스트-이미지 미지원

**지원 크기**: 적응형(입력 이미지 크기에 따라 자동 조정)

**이미지 입력**: JPEG, PNG 형식 지원, 최대 10MB, 단일 이미지

### GPT 이미지 생성 시리즈

**모델명**: `gpt-image-2`

**핵심 기능**:

* ✅ 텍스트-이미지(순수 텍스트 설명으로 이미지 생성)
* ✅ 이미지-이미지(최대 10장 + 텍스트)
* ✅ 이미지 품질 선택 지원
* ✅ 입력 충실도 조절 지원
* ✅ 다중 이미지 융합 생성

**지원 크기**: 1024×1024, 1024×1536, 1536×1024

**이미지 품질**: `low`, `medium`, `high`

**생성 수**: 요청당 1-10장 생성 가능

**이미지 입력**: JPEG, PNG, GIF, WEBP 형식 지원, 최대 10MB, 최대 10장

### Tongyi Qianwen 시리즈

**모델명**: `qwen-image-plus`

**핵심 기능**:

* ✅ 텍스트-이미지(순수 텍스트 설명으로 이미지 생성)
* ✅ 중영문 텍스트 렌더링(이미지 내 복잡한 텍스트 생성에 강점)
* ✅ 다양한 예술 스타일
* ✅ 지능형 프롬프트 확장
* ❌ 이미지-이미지 미지원

**지원 크기**: 1328×1328, 1664×928, 928×1664, 1472×1140, 1140×1472

**과금 방식**: 이미지당 과금(¥0.18/장)

**모델명**: `qwen-image-edit-plus`

**핵심 기능**:

* ✅ 이미지 편집(이미지 1장 입력, 최대 6장 출력)
* ✅ 이미지 내 텍스트 수정
* ✅ 객체 추가/삭제/이동
* ✅ 이미지 스타일 전환
* ✅ 이미지 디테일 향상

**이미지 입력**: JPEG, JPG, PNG, BMP, TIFF, WEBP 형식 지원, 최대 10MB

**출력 설명**: 실제 출력 수는 이미지 콘텐츠와 편집 복잡도에 따라 달라지며, 최대 6장 생성 가능

## 모범 사례

### 프롬프트 최적화 팁

<Tabs>
  <Tab title="Gemini (Nano Banana)">
    1. **종횡비 요구 명시**: 프롬프트에서 구도 방향 설명
       * 가로: "horizontal composition", "widescreen view" 사용
       * 세로: "vertical composition", "vertical view" 사용

    2. **고품질 키워드**:
       * "high quality", "HD", "professional photography"
       * "8k resolution", "rich details"

    3. **다중 이미지 융합 기법**:
       * 각 이미지의 역할을 명확히 설명
       * 융합 방식 지정(스타일 전환, 요소 결합 등)
  </Tab>

  <Tab title="Doubao Seedream">
    1. **스타일 요구 명시**:
       * 사실적 스타일: "photorealistic", "ultra-realistic" 추가
       * 예술적 스타일: "oil painting style", "watercolor", "sketch" 추가
       * 애니메이션 스타일: "anime style", "2D", "cartoon" 추가

    2. **고품질 키워드**:
       * "4K resolution", "8K quality", "ultra-high details"
       * "professional photography", "cinematic lighting"

    3. **연속 이미지 생성 기법**(doubao-seedream-4.x):
       * 프롬프트 스타일 일관성 유지
       * `sequential_image_generation` 매개변수로 연속 모드 활성화
       * `max_images` 매개변수로 이미지 수 제어(1-4장)

    4. **프롬프트 최적화**(doubao-seedream-4.5):
       * `optimize_prompt_options` 매개변수로 프롬프트 최적화
       * 선택 모드: `standard`(표준), `creative`(창의), `precise`(정밀)
  </Tab>

  <Tab title="GPT Image">
    1. **이미지 품질 명시**:
       * `quality` 매개변수로 품질 제어: `low`, `medium`, `high`
       * 고품질 이미지에는 "professional photography", "high detail", "8K" 등 설명어 추가

    2. **다중 이미지 입력 기법**:
       * 최대 10장 입력 지원
       * `input_fidelity` 매개변수로 입력 이미지 충실도 제어: `low`, `medium`, `high`, `auto`
       * 각 참조 이미지의 역할을 명확히 설명

    3. **프롬프트 최적화**:
       * 원하는 이미지 콘텐츠를 상세히 설명
       * 예술 스타일, 조명 조건, 구도 방식 지정
       * 원하지 않는 콘텐츠 제외를 위한 네거티브 설명 추가

    4. **이미지 수 제어**:
       * `n` 매개변수로 생성 수 제어(1-10장)
       * 복잡한 장면은 여러 장 생성 후 최적 결과 선택 권장
  </Tab>

  <Tab title="Tongyi Qianwen">
    1. **텍스트 렌더링 기법**:
       * 프롬프트에서 텍스트 콘텐츠를 따옴표로 명확히 표시
       * 예: "A poster with title "Summer Sale""

    2. **프롬프트 확장**:
       * 짧은 프롬프트: `prompt_extend: true` 활성화
       * 상세 프롬프트: `prompt_extend: false` 비활성화

    3. **네거티브 프롬프트**:
       * 원하지 않는 요소 제외: "blurry, low quality, watermark"
       * 텍스트 렌더링: "blurry text, typos"
  </Tab>
</Tabs>

### 크기 선택 팁

<Tabs>
  <Tab title="소셜 미디어">
    * **WeChat Moments**: 1328×1328 (1:1) 또는 1140×1472 (3:4)
    * **Weibo 헤더**: 1664×928 (16:9)
    * **TikTok 커버**: 928×1664 (9:16)
    * **Xiaohongshu**: 1140×1472 (3:4)
  </Tab>

  <Tab title="디자인 용도">
    * **웹사이트 배너**: 1664×928 (16:9) 또는 21:9
    * **포스터**: 1140×1472 (3:4) 또는 928×1664 (9:16)
    * **제품 이미지**: 1328×1328 (1:1)
    * **모바일 배경화면**: 928×1664 (9:16)
  </Tab>
</Tabs>

## FAQ

<Tabs>
  <Tab title="일반 질문">
    <AccordionGroup>
      <Accordion title="지원하는 이미지 형식은?">
        모델마다 지원 형식이 다릅니다:

        * Gemini: PNG, JPEG, JPG, WEBP, 최대 7MB
        * Doubao Seedream 3.0/4.0: JPEG, PNG, 최대 10MB
        * Doubao Seedream 4.5: JPEG, PNG, WEBP, BMP, TIFF, GIF, 최대 10MB
        * GPT Image: JPEG, PNG, GIF, WEBP, 최대 10MB
        * Tongyi Qianwen: JPEG, JPG, PNG, BMP, TIFF, WEBP, 최대 10MB
      </Accordion>

      <Accordion title="생성된 이미지 URL 유효 기간은?">
        이미지 URL은 약 24시간 유효합니다. 응답 수신 후 즉시 다운로드·저장하거나 자체 스토리지에 업로드하는 것을 권장합니다.
      </Accordion>

      <Accordion title="한 번에 여러 이미지를 생성할 수 있나요?">
        Tongyi Qianwen 시리즈는 요청당 1장 생성합니다. 여러 장이 필요하면 동시에 여러 요청을 보내세요.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Gemini (Nano Banana)">
    <AccordionGroup>
      <Accordion title="대화에서 동일 종횡비를 유지하려면?">
        `contents` 대화 배열에서 각 요청에 `size` 매개변수를 포함해야 하며, 시스템이 지정된 종횡비를 현재 요청에 적용합니다.
      </Accordion>

      <Accordion title="URL 이미지 사용 요구 사항은?">
        URL은 공개 접근 가능한 HTTP/HTTPS 주소여야 하며, PNG, JPEG, JPG, WEBP 형식 지원, 최대 7MB.
      </Accordion>

      <Accordion title="다중 이미지 융합은 몇 장까지 지원하나요?">
        2-5장 동시 입력 지원, 2-3장이 최적 결과에 권장됩니다.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Doubao Seedream">
    <AccordionGroup>
      <Accordion title="doubao-seedream-3.0은 이미지-이미지를 지원하나요?">
        아니요. doubao-seedream-3-0-t2i-250415는 순수 텍스트-이미지 모델로, 텍스트 설명을 통한 이미지 생성만 지원합니다.
      </Accordion>

      <Accordion title="doubao-seedream-4.x가 지원하는 이미지 형식은?">
        doubao-seedream-4.0과 4.5는 JPEG, PNG, WEBP, BMP, TIFF, GIF 형식 지원, 최대 10MB.
      </Accordion>

      <Accordion title="연속 이미지 생성은 어떻게 사용하나요?">
        `sequential_image_generation` 매개변수를 `auto`로 설정해 연속 모드를 활성화합니다. `max_images`로 이미지 수(1-4장)를 제어할 수 있습니다.
      </Accordion>

      <Accordion title="프롬프트 최적화 옵션의 역할은?">
        doubao-seedream-4.5는 `optimize_prompt_options` 매개변수를 지원하며, `standard`(표준), `creative`(창의), `precise`(정밀) 모드로 프롬프트 효과를 최적화합니다.
      </Accordion>

      <Accordion title="doubao-seededit가 지원하는 편집 기능은?">
        doubao-seededit-3-0-i2i-250628은 콘텐츠 수정, 스타일 전환, 디테일 향상 등 이미지 편집을 지원하며, 이미지 1장과 편집 지시가 필요합니다.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="GPT Image">
    <AccordionGroup>
      <Accordion title="GPT Image가 지원하는 이미지 형식은?">
        JPEG, PNG, GIF, WEBP 형식 지원, 최대 10MB.
      </Accordion>

      <Accordion title="최대 몇 장까지 입력할 수 있나요?">
        gpt-image-2는 최대 10장 입력을 지원합니다.
      </Accordion>

      <Accordion title="이미지 품질 매개변수는 어떻게 선택하나요?">
        `quality` 매개변수 옵션: `low`, `medium`, `high`:

        * `low`: 가장 빠른 생성 속도, 최저 비용
        * `medium`: 품질과 속도의 균형
        * `high`: 최고 품질, 가장 풍부한 디테일
      </Accordion>

      <Accordion title="입력 충실도의 역할은?">
        `input_fidelity` 매개변수는 입력 이미지 충실도를 제어하며, 옵션: `low`, `medium`, `high`, `auto`:

        * `low`: 더 많은 창의적 자유, 원본과 차이 큼
        * `high`: 원본 특징 유지, 변화 작음
        * `auto`: 적절한 충실도 자동 선택
      </Accordion>

      <Accordion title="한 번에 여러 이미지를 생성할 수 있나요?">
        예, `n` 매개변수로 생성 수(1-10장)를 제어할 수 있으며, 각 이미지마다 해당 할당량이 소비됩니다.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Tongyi Qianwen">
    <AccordionGroup>
      <Accordion title="qwen-image-plus는 이미지-이미지를 지원하나요?">
        아니요. qwen-image-plus는 순수 텍스트-이미지 모델로, 텍스트 설명을 통한 이미지 생성만 지원합니다.
      </Accordion>

      <Accordion title="중국어 텍스트가 포함된 이미지는 어떻게 생성하나요?">
        프롬프트에서 텍스트 콘텐츠를 명확히 지정하세요. 예: "A poster with title "Double Eleven Sale", subtitle "All Items 50% Off""
      </Accordion>

      <Accordion title="프롬프트 확장과 네거티브 프롬프트를 함께 사용할 수 있나요?">
        예! 충돌하지 않습니다. 권장: 짧은 프롬프트 + 확장 활성화 + 네거티브 프롬프트 추가.
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

## 관련 리소스

<Columns cols={2}>
  <Card title="비디오 생성" icon="video" href="/ko/api-reference/endpoint/video-generation">
    비디오 생성 API 문서 보기
  </Card>

  <Card title="모델 목록" icon="list" href="/ko/api-reference/models">
    지원하는 모든 모델 정보 보기
  </Card>
</Columns>
