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

# Seed Messages — API 레퍼런스

> - Anthropic Messages 형식으로 Seed를 호출합니다. Claude Code 등 호환 도구에서도 사용할 수 있습니다.
- 상태를 저장하지 않으므로 매 턴 전체 기록을 보내고 assistant의 추론 블록을 그대로 다시 보내세요.
- 텍스트, 이미지, 문서를 지원합니다. Lite의 오디오 입력에는 Chat Completions 또는 Responses를 사용하세요.
- 추론은 기본으로 활성화됩니다. `thinking`으로 끄거나 `output_config.effort`로 강도를 조정합니다.
- 모든 모델이 함수 호출을 지원합니다. Seed 2.1과 `doubao-seed-evolving`은 웹 검색도 지원합니다. (`web_search_20250305`)
- JSON Object 또는 JSON Schema 형식으로 구조화 출력을 반환합니다. (`output_config.format`)
- 반복된 긴 접두사가 적중하면 자동으로 캐시 요금이 적용됩니다. `cache_control`은 필요 없으며 적중량은 `usage.cache_read_input_tokens`에서 확인합니다.
- `stream=true`이면 Anthropic SSE 이벤트가 `message_start` → `content_block_start` / `content_block_delta` / `content_block_stop` → `message_delta` → `message_stop` 순서로 전달됩니다. 최종 사용량은 `message_delta`에 포함됩니다.
- **Seed 2.0 이전 모델 이름**: `doubao-seed-2.0-pro` / `doubao-seed-2.0-lite`는 현재 `doubao-seed-2-1-lite` 모델로, `doubao-seed-2.0-code`는 `doubao-seed-evolving` 모델로 연결됩니다. 파라미터 동작은 새 모델을 따릅니다. 새 연동에는 새 모델 이름을 사용하세요. `doubao-seed-2.0-mini`는 영향을 받지 않습니다
- [빠른 시작](/ko/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-messages-quickstart)

> [!NOTE]
>
> **BaseURL**: 기본 BaseURL은 `https://direct.evolink.ai`이며, 텍스트 모델 지원이 더 우수하고 장시간 연결을 지원합니다. `https://api.evolink.ai`는 멀티모달 서비스의 주력 엔드포인트이며, 텍스트 모델에 대해서는 대체 주소로 사용됩니다.

> [!NOTE]
>
> `web_search_20250305`는 Seed 2.1과 `doubao-seed-evolving`만 지원합니다. Messages는 오디오를 받지 않습니다. `doubao-seed-2-1-lite`로 오디오를 입력하려면 [Chat Completions](https://evolink.ai/docs/ko/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-reference.md) 또는 [Responses](https://evolink.ai/docs/ko/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-responses-reference.md)를 사용하세요.


## OpenAPI

````yaml ko/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-messages-reference.json POST /v1/messages
openapi: 3.1.0
info:
  title: Seed Messages — API 레퍼런스
  description: Seed 모델용 Messages (Anthropic)의 매개변수와 고급 기능입니다.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 프로덕션 (권장)
  - url: https://api.evolink.ai
    description: 대체 URL
security:
  - bearerAuth: []
tags:
  - name: Messages
    description: Anthropic Messages 호환 API
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Seed Messages
      description: >-
        - Anthropic Messages 형식으로 Seed를 호출합니다. Claude Code 등 호환 도구에서도 사용할 수
        있습니다.

        - 상태를 저장하지 않으므로 매 턴 전체 기록을 보내고 assistant의 추론 블록을 그대로 다시 보내세요.

        - 텍스트, 이미지, 문서를 지원합니다. Lite의 오디오 입력에는 Chat Completions 또는 Responses를
        사용하세요.

        - 추론은 기본으로 활성화됩니다. `thinking`으로 끄거나 `output_config.effort`로 강도를 조정합니다.

        - 모든 모델이 함수 호출을 지원합니다. Seed 2.1과 `doubao-seed-evolving`은 웹 검색도 지원합니다.
        (`web_search_20250305`)

        - JSON Object 또는 JSON Schema 형식으로 구조화 출력을 반환합니다.
        (`output_config.format`)

        - 반복된 긴 접두사가 적중하면 자동으로 캐시 요금이 적용됩니다. `cache_control`은 필요 없으며 적중량은
        `usage.cache_read_input_tokens`에서 확인합니다.

        - `stream=true`이면 Anthropic SSE 이벤트가 `message_start` →
        `content_block_start` / `content_block_delta` / `content_block_stop` →
        `message_delta` → `message_stop` 순서로 전달됩니다. 최종 사용량은 `message_delta`에
        포함됩니다.

        - **Seed 2.0 이전 모델 이름**: `doubao-seed-2.0-pro` / `doubao-seed-2.0-lite`는
        현재 `doubao-seed-2-1-lite` 모델로, `doubao-seed-2.0-code`는
        `doubao-seed-evolving` 모델로 연결됩니다. 파라미터 동작은 새 모델을 따릅니다. 새 연동에는 새 모델 이름을
        사용하세요. `doubao-seed-2.0-mini`는 영향을 받지 않습니다

        - [빠른
        시작](/ko/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-messages-quickstart)
      operationId: createMessageSeed
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageRequest'
            examples:
              simple:
                summary: 단일 턴 텍스트 채팅
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 4096
                  messages:
                    - role: user
                      content: 자기소개를 해주세요
              system_prompt:
                summary: 시스템 프롬프트 사용
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 4096
                  system: 당신은 꼼꼼한 기술 편집자입니다. 한국어로 간결하게 답하세요.
                  messages:
                    - role: user
                      content: 컨텍스트 캐시가 무엇인지 설명해 주세요.
              multi_turn:
                summary: 매 턴 전체 기록을 보내는 대화
                value:
                  model: doubao-seed-2-1-turbo
                  max_tokens: 4096
                  messages:
                    - role: user
                      content: 암호는 RED-583입니다. 기억하세요.
                    - role: assistant
                      content: 기억했습니다.
                    - role: user
                      content: 암호가 무엇인가요? 암호만 답하세요.
              streaming:
                summary: 스트리밍 출력
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 4096
                  stream: true
                  messages:
                    - role: user
                      content: 가을을 주제로 네 줄 시를 써 주세요.
              thinking_off:
                summary: 추론 끄기
                value:
                  model: doubao-seed-2-1-turbo
                  max_tokens: 1024
                  thinking:
                    type: disabled
                  messages:
                    - role: user
                      content: 다음 문장을 영어로 번역해 주세요. 오늘 회의는 오후 세 시로 변경되었습니다.
              effort:
                summary: 추론 깊이 조절
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 8192
                  output_config:
                    effort: low
                  messages:
                    - role: user
                      content: 퀵 정렬과 병합 정렬이 각각 적합한 상황을 비교해 주세요.
              vision:
                summary: 이미지 이해
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 4096
                  messages:
                    - role: user
                      content:
                        - type: image
                          source:
                            type: url
                            url: https://www.gstatic.com/webp/gallery/1.jpg
                        - type: text
                          text: 이 이미지의 장면과 주요 요소를 설명해 주세요.
              tool_use:
                summary: Function Call
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 4096
                  messages:
                    - role: user
                      content: 오늘 베이징 날씨를 확인해 주세요.
                  tools:
                    - name: get_weather
                      description: 지정한 도시의 날씨 조회
                      input_schema:
                        type: object
                        properties:
                          city:
                            type: string
                            description: 도시 이름
                        required:
                          - city
                  tool_choice:
                    type: auto
              tool_result:
                summary: 함수 실행 결과 반환
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 4096
                  tools:
                    - name: get_weather
                      description: 지정한 도시의 날씨 조회
                      input_schema:
                        type: object
                        properties:
                          city:
                            type: string
                        required:
                          - city
                  messages:
                    - role: user
                      content: 오늘 베이징 날씨를 확인해 주세요.
                    - role: assistant
                      content:
                        - type: thinking
                          thinking: 날씨 함수를 호출해야 한다…
                          signature: EqQBCkgIARABGAIi...
                        - type: tool_use
                          id: call_01
                          name: get_weather
                          input:
                            city: 베이징
                    - role: user
                      content:
                        - type: tool_result
                          tool_use_id: call_01
                          content: 맑음, 12~22°C, 북풍, 풍력 2
              web_search:
                summary: 웹 검색(Seed 2.1 및 Evolving 전용)
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 4096
                  messages:
                    - role: user
                      content: 지난 한 주간의 주요 기술 뉴스는 무엇인가요?
                  tools:
                    - type: web_search_20250305
                      name: web_search
                      max_uses: 2
              structured_output:
                summary: 구조화 출력 (JSON Schema)
                value:
                  model: doubao-seed-2-1-pro
                  max_tokens: 4096
                  output_config:
                    format:
                      type: json_schema
                      schema:
                        type: object
                        properties:
                          title:
                            type: string
                          tags:
                            type: array
                            items:
                              type: string
                        required:
                          - title
                          - tags
                        additionalProperties: false
                  messages:
                    - role: user
                      content: 컨텍스트 캐싱을 소개하는 기사의 제목과 태그 3개를 작성해 주세요.
      responses:
        '200':
          description: 생성에 성공했습니다. 스트리밍 요청에는 Anthropic SSE 이벤트 스트림이 반환됩니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
            text/event-stream:
              schema:
                type: string
                description: >-
                  일반적인 이벤트 순서는 message_start, content_block_*, message_delta,
                  message_stop입니다.
        '400':
          description: 요청 매개변수 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 인증되지 않음, 토큰이 유효하지 않거나 만료됨
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: 할당량 부족, 충전 필요
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Insufficient quota
                  type: insufficient_quota_error
                  fallback_suggestion: https://evolink.ai/dashboard/credits
        '403':
          description: 접근 권한 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this model
                  type: permission_error
                  param: model
        '404':
          description: 리소스를 찾을 수 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Specified model not found
                  type: not_found_error
                  param: model
                  fallback_suggestion: doubao-seed-2-1-pro
        '429':
          description: 요청 빈도 초과
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
                  type: rate_limit_error
                  fallback_suggestion: retry after 60 seconds
        '500':
          description: 서버 내부 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: internal_server_error
                  fallback_suggestion: try again later
        '502':
          description: 모델 서비스에 일시적인 오류가 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream AI service unavailable
                  type: upstream_error
                  fallback_suggestion: try different model
        '503':
          description: 서비스 일시적으로 사용 불가
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    CreateMessageRequest:
      type: object
      required:
        - model
        - max_tokens
        - messages
      properties:
        model:
          type: string
          description: >-
            모델 선택


            | 모델 ID | 용도 | 컨텍스트 길이 |

            |---|---|---|

            | `doubao-seed-2-1-pro` | 복잡한 추론, 긴 문서 및 대규모 코드 분석에 권장하는 최상위 모델 |
            100만 토큰 |

            | `doubao-seed-2-1-turbo` | 대화, 데이터 추출 및 에이전트 작업에 적합한 저비용 모델 | 25만
            6천 토큰 |

            | `doubao-seed-2-1-lite` | Seed 2.1 최저가 모델. 오디오 입력은 Chat
            Completions와 Responses에서만 지원 | 100만 토큰 |

            | `doubao-seed-evolving` | 새 기능을 평가할 수 있도록 매주 업데이트 | 100만 토큰 |

            | `doubao-seed-2.0-pro` | 이전 모델 이름으로, 현재 `doubao-seed-2-1-lite` 모델로
            연결됩니다 | 100만 토큰 |

            | `doubao-seed-2.0-lite` | 이전 모델 이름으로, 현재 `doubao-seed-2-1-lite` 모델로
            연결됩니다 | 100만 토큰 |

            | `doubao-seed-2.0-mini` | 간단한 작업에 적합한 Seed 2.0 최고속 모델 | 25만 6천 토큰 |

            | `doubao-seed-2.0-code` | 이전 모델 이름으로, 현재 `doubao-seed-evolving` 모델로
            연결됩니다 | 100만 토큰 |


            모델 ID는 Seed 2.1에서 하이픈(`2-1`), Seed 2.0에서 마침표(`2.0`)를 사용합니다.
          enum:
            - doubao-seed-2-1-pro
            - doubao-seed-2-1-turbo
            - doubao-seed-2-1-lite
            - doubao-seed-evolving
            - doubao-seed-2.0-pro
            - doubao-seed-2.0-lite
            - doubao-seed-2.0-mini
            - doubao-seed-2.0-code
          default: doubao-seed-2-1-pro
          example: doubao-seed-2-1-pro
        max_tokens:
          type: integer
          minimum: 1
          example: 4096
          description: >-
            추론과 본문을 합친 최대 출력 토큰 수입니다. 추론을 켰을 때는 1024 이상을 권장합니다. 한도에 도달하면
            `stop_reason`이 `max_tokens`가 되고 추론만 반환될 수 있습니다.
        messages:
          type: array
          minItems: 1
          description: 매 턴 전체 메시지 기록을 보냅니다. assistant의 추론 블록과 서명을 그대로 다시 보내세요.
          items:
            $ref: '#/components/schemas/Message'
        system:
          description: 시스템 프롬프트입니다. 문자열 또는 텍스트 블록 배열을 사용할 수 있습니다.
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/TextBlock'
        stream:
          type: boolean
          default: false
          description: Anthropic SSE 이벤트로 응답을 스트리밍합니다.
        thinking:
          type: object
          description: 추론을 켜거나 끕니다.
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - enabled
                - disabled
              description: >-
                모든 Seed 모델은 기본값인 `enabled`에서 답변 전에 추론합니다. `disabled`에서는 바로 답합니다.
                추론 토큰은 출력량에 포함되며 출력 요금으로 청구됩니다.
        output_config:
          type: object
          description: 추론 강도와 구조화 출력 설정입니다.
          properties:
            effort:
              type: string
              enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
              description: >-
                추론 강도입니다. `minimal`은 바로 답하고 `low`는 속도를 우선하며 `medium`은 속도와 깊이의
                균형을 맞추고 `high`는 복잡한 문제를 깊이 분석합니다.


                Seed 2.1과 `doubao-seed-evolving`의 기본값은 `high`, Seed 2.0은
                `medium`입니다. `none`은 `minimal`, `xhigh`와 `max`는 `high`로 처리합니다.
            format:
              type: object
              description: 구조화 출력 형식
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - json_object
                    - json_schema
                  description: >-
                    `json_object`는 JSON 객체를 반환합니다. 프롬프트에서 JSON 출력을 명시하세요.
                    `json_schema`는 `schema`에 맞는 JSON을 반환합니다.
                schema:
                  type: object
                  additionalProperties: true
                  description: JSON Schema 정의입니다. `json_schema`일 때 필수입니다.
        temperature:
          type: number
          minimum: 0
          maximum: 2
          description: 샘플링 온도 범위는 [0, 2]입니다. `temperature` 또는 `top_p` 중 하나만 조정하세요.
        top_p:
          type: number
          minimum: 0
          maximum: 1
          description: 뉴클리어스 샘플링 확률 임계값입니다. 범위는 [0, 1]입니다.
        stop_sequences:
          type: array
          items:
            type: string
          maxItems: 4
          description: 생성을 멈출 문자열을 최대 4개 지정합니다. 일치한 문자열은 출력에서 제외됩니다. 먼저 추론을 끄세요.
        tools:
          type: array
          description: >-
            모든 Seed 모델은 `name`, `description`, `input_schema`로 정의한 함수를 지원합니다.
            Seed 2.1과 `doubao-seed-evolving`의 웹 검색은 `type=web_search_20250305`,
            `name=web_search`를 사용합니다. `doubao-seed-2.0-mini`에서 웹 검색을 선언하거나
            `web_fetch` 등 다른 서버 도구를 사용하면 400이 반환됩니다. 실제 검색 건마다 모델 요금이 적용됩니다.
          items:
            oneOf:
              - $ref: '#/components/schemas/Tool'
              - $ref: '#/components/schemas/WebSearchTool'
        tool_choice:
          $ref: '#/components/schemas/ToolChoice'
    MessageResponse:
      type: object
      properties:
        id:
          type: string
          description: 응답의 고유 식별자
          example: 0217952345678901234567890abcdef
        type:
          type: string
          enum:
            - message
          description: 항상 `message`입니다.
        role:
          type: string
          enum:
            - assistant
          description: 항상 `assistant`입니다.
        model:
          type: string
          description: 이 요청에 사용된 모델입니다.
          example: doubao-seed-2-1-pro
        content:
          type: array
          description: >-
            생성된 콘텐츠 블록입니다. 추론이 켜져 있으면 보통 `thinking` 다음에 `text`가 옵니다.
            `type="text"`인 블록에서 본문을 읽으세요.
          items:
            oneOf:
              - $ref: '#/components/schemas/TextBlock'
              - $ref: '#/components/schemas/ThinkingBlock'
              - $ref: '#/components/schemas/ToolUseBlock'
              - $ref: '#/components/schemas/ServerToolUseBlock'
              - $ref: '#/components/schemas/WebSearchResultBlock'
          example:
            - type: thinking
              thinking: 사용자는 짧은 자기소개를 원한다…
              signature: EqQBCkgIARABGAIi...
            - type: text
              text: 안녕하세요! 저는 추론, 글쓰기, 코딩을 돕는 Seed 언어 모델입니다.
        stop_reason:
          type: string
          description: |-
            생성 종료 사유입니다.

            - `end_turn`: 정상 종료
            - `max_tokens`: 토큰 한도 도달
            - `stop_sequence`: 중지 시퀀스 일치
            - `tool_use`: 함수 호출 요청
          enum:
            - end_turn
            - max_tokens
            - stop_sequence
            - tool_use
          example: end_turn
        stop_sequence:
          type:
            - string
            - 'null'
          description: 일치한 중지 시퀀스입니다. 일치하는 항목이 없으면 `null`입니다.
        usage:
          $ref: '#/components/schemas/MessageUsage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP 상태 오류 코드
            message:
              type: string
              description: 오류 설명
            type:
              type: string
              description: 오류 유형
            param:
              type: string
              description: 관련 매개변수 이름
            fallback_suggestion:
              type: string
              description: 오류 시 제안
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
          description: 메시지 역할입니다. 시스템 프롬프트는 최상위 `system`에 지정합니다.
        content:
          description: 메시지 내용입니다. 문자열이나 콘텐츠 블록 배열을 사용합니다.
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentBlock'
    TextBlock:
      type: object
      title: 텍스트
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
          description: 항상 `text`입니다.
        text:
          type: string
          description: 텍스트 내용
    Tool:
      type: object
      title: 사용자 정의 함수
      required:
        - name
        - input_schema
      properties:
        name:
          type: string
          description: 함수 이름
        description:
          type: string
          description: 모델이 함수 호출 시점을 판단하는 데 사용하는 설명입니다.
        input_schema:
          type: object
          additionalProperties: true
          description: JSON Schema로 정의한 함수 인수입니다.
    WebSearchTool:
      type: object
      title: 웹 검색(Seed 2.1 및 Evolving 전용)
      required:
        - type
        - name
      properties:
        type:
          type: string
          enum:
            - web_search_20250305
          description: 항상 `web_search_20250305`입니다.
        name:
          type: string
          enum:
            - web_search
          description: 항상 `web_search`입니다.
        max_uses:
          type: integer
          minimum: 1
          description: 이 요청에서 허용하는 최대 검색 횟수입니다.
        allowed_domains:
          type: array
          items:
            type: string
          description: 다음 도메인만 검색합니다.
        blocked_domains:
          type: array
          items:
            type: string
          description: 다음 도메인을 검색에서 제외합니다.
        user_location:
          type: object
          additionalProperties: true
          description: 검색에 참고할 국가, 지역, 도시 등의 위치입니다.
    ToolChoice:
      type: object
      required:
        - type
      description: 도구 선택 정책입니다. 먼저 `tools`를 설정하세요.
      properties:
        type:
          type: string
          enum:
            - auto
            - any
            - tool
            - none
          default: auto
          description: >-
            `auto`: 모델이 결정합니다. `any`: 도구를 하나 이상 호출합니다. `tool`: `name`으로 지정한 도구를
            호출합니다. `none`: 호출하지 않습니다.
        name:
          type: string
          description: '`type`이 `tool`일 때 호출할 도구 이름입니다.'
        disable_parallel_tool_use:
          type: boolean
          default: false
          description: 같은 턴의 병렬 도구 호출을 금지할지 여부입니다.
    ThinkingBlock:
      type: object
      title: 추론
      required:
        - type
        - thinking
      properties:
        type:
          type: string
          enum:
            - thinking
          description: 항상 `thinking`입니다.
        thinking:
          type: string
          description: 모델의 추론 내용입니다. 다음 턴에서 서명과 함께 그대로 다시 보냅니다.
        signature:
          type: string
          description: 추론 서명입니다. 다음 턴에서도 서명, 추론 내용, 블록 순서를 그대로 유지합니다.
    ToolUseBlock:
      type: object
      title: 도구 사용
      required:
        - type
        - id
        - name
        - input
      properties:
        type:
          type: string
          enum:
            - tool_use
          description: 항상 `tool_use`입니다.
        id:
          type: string
          description: 도구 호출 ID입니다. `tool_use_id`로 결과를 연결합니다.
        name:
          type: string
          description: 모델이 호출을 요청한 함수 이름입니다.
        input:
          type: object
          additionalProperties: true
          description: 모델이 생성한 함수 인수 객체입니다.
    ServerToolUseBlock:
      type: object
      title: 웹 검색 호출
      properties:
        type:
          type: string
          enum:
            - server_tool_use
          description: 항상 `server_tool_use`입니다.
        id:
          type: string
          description: 서버 도구 호출 ID입니다.
        name:
          type: string
          description: 도구 이름입니다. 웹 검색은 `web_search`입니다.
        input:
          type: object
          additionalProperties: true
          description: '모델이 생성한 검색 매개변수입니다. 예: `query`.'
    WebSearchResultBlock:
      type: object
      title: 웹 검색 결과
      properties:
        type:
          type: string
          enum:
            - web_search_tool_result
          description: 항상 `web_search_tool_result`입니다.
        tool_use_id:
          type: string
          description: 대응하는 `server_tool_use` ID입니다.
        content:
          description: >-
            검색 결과입니다. 실패 시 `type=web_search_tool_result_error`와 `error_code`가 담긴
            오류 객체가 반환됩니다.
          oneOf:
            - type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - web_search_result
                  title:
                    type: string
                    description: 결과 제목
                  url:
                    type: string
                    description: 결과 URL
                  page_age:
                    type: string
                    description: 페이지 경과 시간
                  encrypted_content:
                    type: string
                    description: 암호화된 내용입니다. 다음 턴에 그대로 다시 보냅니다.
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - web_search_tool_result_error
                error_code:
                  type: string
                  description: 오류 코드
    MessageUsage:
      type: object
      description: 토큰 사용 통계 정보
      properties:
        input_tokens:
          type: integer
          description: 캐시 미적중 입력 토큰 수입니다. `cache_read_input_tokens`는 제외합니다.
          example: 25
        cache_read_input_tokens:
          type: integer
          description: >-
            캐시 적중 요금으로 청구되는 입력 토큰 수입니다. 전체 입력 = `input_tokens` +
            `cache_read_input_tokens`.
          example: 0
        cache_creation_input_tokens:
          type: integer
          description: 항상 0입니다. 이 엔드포인트에는 별도 캐시 쓰기 요금이 없습니다.
          example: 0
        output_tokens:
          type: integer
          description: 추론을 포함한 출력 토큰 수입니다.
          example: 120
        server_tool_use:
          type: object
          description: 웹 검색 사용 시 반환되는 실제 서버 도구 호출 횟수입니다.
          properties:
            web_search_requests:
              type: integer
              description: 이 요청에서 실행한 검색 횟수입니다. 건별로 청구됩니다.
              example: 1
    ContentBlock:
      description: 텍스트, 이미지, 문서, 추론, 함수 호출 및 결과와 후속 턴에 다시 보낼 웹 검색 호출 및 결과입니다.
      oneOf:
        - $ref: '#/components/schemas/TextBlock'
        - $ref: '#/components/schemas/ImageBlock'
        - $ref: '#/components/schemas/DocumentBlock'
        - $ref: '#/components/schemas/ThinkingBlock'
        - $ref: '#/components/schemas/ToolUseBlock'
        - $ref: '#/components/schemas/ToolResultBlock'
        - $ref: '#/components/schemas/ServerToolUseBlock'
        - $ref: '#/components/schemas/WebSearchResultBlock'
    ImageBlock:
      type: object
      title: 이미지
      required:
        - type
        - source
      properties:
        type:
          type: string
          enum:
            - image
          description: 항상 `image`입니다.
        source:
          type: object
          required:
            - type
          description: 이미지 소스
          properties:
            type:
              type: string
              enum:
                - url
                - base64
              description: '`url`: 공개 이미지 URL. `base64`: Base64로 인코딩한 이미지 데이터.'
            url:
              type: string
              description: 이미지 URL입니다. `url`일 때 필수입니다.
            media_type:
              type: string
              enum:
                - image/jpeg
                - image/png
                - image/gif
                - image/webp
              description: 이미지 MIME 유형입니다. `base64`일 때 필수입니다.
            data:
              type: string
              description: 접두사 `data:`를 제외한 Base64 이미지 데이터입니다. `base64`일 때 필수입니다.
    DocumentBlock:
      type: object
      title: 문서
      required:
        - type
        - source
      properties:
        type:
          type: string
          enum:
            - document
          description: 항상 `document`입니다.
        source:
          type: object
          required:
            - type
          description: 문서 소스
          properties:
            type:
              type: string
              enum:
                - url
                - base64
                - text
              description: '`url`: 공개 문서 URL. `base64`: Base64 문서 데이터. `text`: 일반 텍스트.'
            url:
              type: string
              description: 문서 URL입니다. `url`일 때 필수입니다.
            media_type:
              type: string
              description: 문서 MIME 유형입니다. 예시는 `application/pdf`, `text/plain`입니다.
            data:
              type: string
              description: 문서 데이터입니다. `base64` 또는 `text`일 때 필수입니다.
    ToolResultBlock:
      type: object
      title: 함수 결과
      required:
        - type
        - tool_use_id
        - content
      properties:
        type:
          type: string
          enum:
            - tool_result
          description: 항상 `tool_result`입니다.
        tool_use_id:
          type: string
          description: 대응하는 `tool_use` 블록 ID입니다.
        content:
          description: 함수 결과입니다. 문자열이나 텍스트 및 이미지 블록 배열을 사용합니다.
          oneOf:
            - type: string
            - type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/TextBlock'
                  - $ref: '#/components/schemas/ImageBlock'
        is_error:
          type: boolean
          default: false
          description: 함수 실행의 실패 여부입니다.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##모든 API는 Bearer Token 인증이 필요합니다##

        **API Key 받기:**

        [API Key 관리 페이지](https://evolink.ai/dashboard/keys)를 방문하여 API Key를 받으세요

        **요청 헤더에 추가:**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````

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