> ## 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.

# GLM 전체 모델 인터페이스 - Messages 전체 매개변수

> - Anthropic Messages 프로토콜로 GLM 시리즈 모델을 호출하며, `model` 파라미터로 구체적인 모델을 선택합니다
- 요청 / 응답 구조는 Anthropic API와 동일합니다
- **시스템 프롬프트**: 최상위 `system`으로 전달
- **사고 모드**: 전 시리즈가 기본적으로 사고를 켜며 사고 내용은 `content[type=thinking]` block으로 반환됩니다. `glm-5.2`만 `thinking.type=disabled`로 끌 수 있습니다
- **스트리밍 출력**: SSE 이벤트 스트림
- **도구 호출**: Anthropic `tool_use` / `tool_result` 흐름과 호환
- **이미지 입력**: 실제로 지원하는 모델은 `glm-5.3-flash`뿐이며, 자세한 내용은 `messages` 필드 설명을 참조하세요

<Note>
  **BaseURL**: 기본 BaseURL은 `https://direct.evolink.ai`이며, 텍스트 모델과 장시간 연결을 더 잘 지원합니다. `https://api.evolink.ai`는 멀티모달 서비스의 기본 엔드포인트이자 텍스트 모델의 대체 주소 역할을 합니다.
</Note>

<Note>
  **사고를 끌 수 있는지는 모델마다 다릅니다**: `thinking.type: "disabled"`를 지원하는 모델은 `glm-5.2`뿐이며, `glm-5.3`과 `glm-5.3-flash`는 항상 사고하고 `disabled`를 보내면 오류가 발생합니다. `glm-5.2`에서 마이그레이션할 때는 하드코딩된 `disabled`를 먼저 제거한 뒤 모델을 전환하세요.
</Note>

<Warning>
  **이미지 입력은 `glm-5.3-flash`만 지원하며, 다른 모델에 보내도 오류가 발생하지 않습니다.** `glm-5.3`이나 `glm-5.2`에 이미지 콘텐츠 블록을 보내면 요청은 정상적으로 200을 반환하지만, 모델은 이미지를 읽지 못하고 텍스트 부분만으로 답합니다. 그럴듯해 보이지만 이미지와 무관한 응답이 돌아오며 결과도 요청마다 일치하지 않습니다. 이런 조용한 실패는 운영 환경에서 원인을 찾기 어려우므로, 이미지 이해가 필요하면 `glm-5.3-flash`를 선택하세요.
</Warning>


## OpenAPI

````yaml ko/api-manual/language-series/glm/messages/messages-reference.json POST /v1/messages
openapi: 3.1.0
info:
  title: GLM 전체 모델 인터페이스 - Messages 전체 매개변수
  description: >-
    Anthropic Messages 프로토콜로 Zhipu GLM 시리즈 텍스트 모델을 호출하기 위한 전체 API 레퍼런스입니다.


    **수록 모델**: `glm-5.3`, `glm-5.3-flash`, `glm-5.2` (`model` 파라미터로 선택)


    **호환성 안내**:

    - 경로: `/v1/messages` (Anthropic 표준 경로)

    - 요청 / 응답 구조는 Anthropic Messages API와 동일

    - 지원 필드: `model` `messages`(필수) `system` `max_tokens` `temperature` `top_p`
    `top_k` `stop_sequences` `stream` `thinking` `tools` `tool_choice`
    `metadata`


    **공통 기능**:

    - 1M token 컨텍스트 윈도우, 최대 출력 131,072 tokens

    - 사고 모드: 전 시리즈가 **기본적으로 사고를 켜며**, 사고 내용은 `content[type=thinking]` block으로
    반환되고 output tokens에 계산됩니다

    - 프롬프트 캐시: 암묵적 프리픽스 캐시로 동일한 프리픽스의 반복 요청이 자동 적중하며(`cache_read_input_tokens`에
    반영) `cache_control`을 수동으로 설정할 필요가 없습니다. `cache_creation_input_tokens`는 항상
    0입니다


    **모델 간 차이**(사고를 끌 수 있는지, 이미지를 읽을 수 있는지)는 아래 `model`, `thinking`, `messages`
    필드 설명을 참조하세요.
  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 프로토콜 인터페이스
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: GLM 대화 인터페이스 (전체 모델, Anthropic 호환)
      description: >-
        - Anthropic Messages 프로토콜로 GLM 시리즈 모델을 호출하며, `model` 파라미터로 구체적인 모델을
        선택합니다

        - 요청 / 응답 구조는 Anthropic API와 동일합니다

        - **시스템 프롬프트**: 최상위 `system`으로 전달

        - **사고 모드**: 전 시리즈가 기본적으로 사고를 켜며 사고 내용은 `content[type=thinking]` block으로
        반환됩니다. `glm-5.2`만 `thinking.type=disabled`로 끌 수 있습니다

        - **스트리밍 출력**: SSE 이벤트 스트림

        - **도구 호출**: Anthropic `tool_use` / `tool_result` 흐름과 호환

        - **이미지 입력**: 실제로 지원하는 모델은 `glm-5.3-flash`뿐이며, 자세한 내용은 `messages` 필드 설명을
        참조하세요
      operationId: createMessageGLM
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageRequest'
            examples:
              simple:
                summary: 최소 실행 가능 요청
                value:
                  model: glm-5.3
                  max_tokens: 1024
                  messages:
                    - role: user
                      content: 안녕하세요, 세계
              system_prompt:
                summary: system 프롬프트 포함
                value:
                  model: glm-5.3
                  max_tokens: 2048
                  system: 당신은 숙련된 한국어 기술 편집자입니다.
                  messages:
                    - role: user
                      content: GLM-5.3을 세 문장으로 소개해 주세요.
              stop_sequences:
                summary: 사용자 정의 중지 시퀀스
                value:
                  model: glm-5.3
                  max_tokens: 50
                  thinking:
                    type: disabled
                  stop_sequences:
                    - '3'
                  messages:
                    - role: user
                      content: 'Output exactly: 1 2 3 4 5 6'
              tool_use:
                summary: 도구 호출(Anthropic tool_use 스타일)
                value:
                  model: glm-5.3
                  max_tokens: 2048
                  messages:
                    - role: user
                      content: 도쿄의 날씨를 조회해서 알려주세요
                  tools:
                    - name: get_weather
                      description: 지정한 도시의 현재 날씨를 조회합니다
                      input_schema:
                        type: object
                        properties:
                          city:
                            type: string
                            description: '도시 이름, 예: Tokyo'
                        required:
                          - city
                  tool_choice:
                    type: auto
              streaming:
                summary: 스트리밍 출력(SSE)
                value:
                  model: glm-5.3
                  max_tokens: 1024
                  stream: true
                  messages:
                    - role: user
                      content: 봄에 관한 짧은 시를 써 주세요
              disable_thinking_glm52_only:
                summary: 사고 모드 비활성화 (glm-5.2만 지원)
                value:
                  model: glm-5.2
                  max_tokens: 512
                  thinking:
                    type: disabled
                  messages:
                    - role: user
                      content: '한 문장으로: 일본의 수도는?'
                description: >-
                  사고를 끌 수 있는 모델은 `glm-5.2`뿐입니다. `glm-5.3`과 `glm-5.3-flash`에
                  `thinking.type=disabled`를 보내면 오류가 발생합니다.
              vision_flash:
                summary: 이미지 입력 (glm-5.3-flash 전용)
                description: >-
                  `glm-5.3-flash`는 비전을 기본 지원합니다. 이미지는 `image` 콘텐츠 블록으로 전달하며,
                  `source`는 `base64`와 `url` 두 가지 방식을 지원합니다.
                value:
                  model: glm-5.3-flash
                  max_tokens: 1024
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: 이 이미지에는 무엇이 있나요?
                        - type: image
                          source:
                            type: base64
                            media_type: image/png
                            data: <BASE64_ENCODED_IMAGE>
      responses:
        '200':
          description: 메시지 객체
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                with_thinking:
                  summary: 기본적으로 thinking content block 포함
                  value:
                    id: msg_0842a705-9d0b-4eaa-b12d-09a4106326c5
                    type: message
                    role: assistant
                    model: glm-5.3
                    content:
                      - type: thinking
                        thinking: 사용자가 한 단어로 인사해 달라고 요청했으니 "Hi"라고 답하면 됩니다.
                        signature: ''
                      - type: text
                        text: Hi.
                    stop_reason: end_turn
                    usage:
                      input_tokens: 18
                      output_tokens: 101
                      cache_creation_input_tokens: 0
                      cache_read_input_tokens: 0
                      prompt_tokens_details:
                        cached_tokens: 0
                tool_use:
                  summary: 도구 호출 트리거(stop_reason=tool_use)
                  value:
                    id: msg_067e85db-53df-43a1-bd38-09c53375f2f0
                    type: message
                    role: assistant
                    model: glm-5.3
                    content:
                      - type: tool_use
                        id: toolu_36b8a98e284c426799f08612
                        name: get_weather
                        input:
                          city: Tokyo
                    stop_reason: tool_use
                    usage:
                      input_tokens: 161
                      output_tokens: 11
                      cache_creation_input_tokens: 0
                      cache_read_input_tokens: 0
                      prompt_tokens_details:
                        cached_tokens: 0
        '400':
          description: 잘못된 요청 파라미터
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                request_id: req_xxx
                error:
                  type: invalid_request_error
                  message: Invalid request
        '401':
          description: 인증 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: authentication_error
                  message: Authentication error
        '402':
          description: 할당량 부족
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: billing_error
                  message: Insufficient quota
        '403':
          description: 권한 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: permission_error
                  message: Permission denied
        '404':
          description: 모델 또는 리소스를 찾을 수 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: not_found_error
                  message: Model not found
        '429':
          description: 속도 제한
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: rate_limit_error
                  message: Rate limited
        '500':
          description: 서버 내부 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: 업스트림 서비스 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 서비스 일시적으로 사용 불가
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateMessageRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: >
            호출할 모델:


            | 모델 ID | 포지셔닝 | 사고 끄기 | 이미지 입력 |

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

            | `glm-5.3` | 플래그십 모델, 복잡한 소프트웨어 엔지니어링과 에이전트 작업 능력이 전반적으로 향상; 1M
            컨텍스트 | 끌 수 없음 | 미지원 |

            | `glm-5.3-flash` | 경량 멀티모달 모델, 비용이 매우 낮고 비전을 기본 지원; 1M 컨텍스트 | 끌 수
            없음 | 지원 |

            | `glm-5.2` | 이전 세대 플래그십, 복잡한 추론과 초장문 컨텍스트; 1M 컨텍스트 | 끌 수
            있음(`thinking.type=disabled`) | 미지원 |
          enum:
            - glm-5.3
            - glm-5.3-flash
            - glm-5.2
          example: glm-5.3
          default: glm-5.3
        max_tokens:
          type: integer
          description: >-
            생성되는 내용 길이의 상한(토큰 수)


            **설명**:

            - GLM 시리즈는 최대 **131,072 tokens**(128K) 출력 길이를 지원하며 `1024` 이상 설정을
            권장합니다

            - thinking으로 생성되는 토큰도 이 상한에 포함됩니다

            - 상한에 도달하면 내용이 잘리고 응답은 `stop_reason=max_tokens`가 됩니다
          minimum: 1
          maximum: 131072
          example: 1024
        messages:
          type: array
          description: >-
            대화 메시지 목록으로, user / assistant가 턴마다 번갈아 나타납니다


            **설명**:

            - 최소 1개의 메시지가 필요합니다

            - 마지막 메시지는 보통 `role=user`입니다

            - 멀티턴 컨텍스트를 지원하며 모델이 이력을 참조합니다


            **이미지 입력**: `glm-5.3-flash`만 지원하며, `content` 배열 안의
            `{"type":"image","source":{...}}` 블록으로 전달합니다.


            `glm-5.3`이나 `glm-5.2`에 이미지 콘텐츠 블록을 보내면 **오류는 발생하지 않지만 모델이 이미지를 읽지
            못합니다**. 요청은 정상적으로 200을 반환하고, 모델은 텍스트 부분만으로 답하므로 그럴듯해 보이지만 이미지와 무관한
            응답이 돌아오며, 결과도 요청마다 일치하지 않습니다.


            이런 조용한 실패는 운영 환경에서 원인을 찾기 어려우므로, 이미지 이해가 필요하면 `glm-5.3-flash`를
            선택하세요.
          items:
            $ref: '#/components/schemas/InputMessage'
          minItems: 1
        system:
          description: >-
            시스템 프롬프트로, AI의 역할과 동작을 설정하는 데 사용합니다


            **설명**:

            - 문자열 또는 콘텐츠 블록 배열을 지원합니다

            - 최상위 `system` 필드로 전달합니다(messages에 넣지 마세요)

            - 모델이 system 제약을 따릅니다

            - **너무 긴 system은 잘릴 수 있습니다**: 긴 컨텍스트가 필요하면 `messages`에 넣고, 모두
            `system`에 쌓지 마세요
          oneOf:
            - type: string
              example: You are a helpful assistant.
            - type: array
              description: 콘텐츠 블록 배열 형식의 시스템 프롬프트. text 블록은 cache_control을 가질 수 있습니다
              items:
                type: object
                required:
                  - type
                  - text
                properties:
                  type:
                    type: string
                    enum:
                      - text
                  text:
                    type: string
                  cache_control:
                    $ref: '#/components/schemas/CacheControl'
        temperature:
          type: number
          description: |-
            샘플링 온도

            **설명**:
            - 값이 높을수록 출력이 더 발산적이고, 낮을수록 더 확정적입니다
            - 권장 범위 `[0, 1]`
          minimum: 0
          maximum: 1
          example: 1
        top_p:
          type: number
          description: |-
            핵 샘플링 임계값

            **설명**:
            - 범위 `[0, 1]`
            - temperature와 top_p를 동시에 조정하지 않는 것을 권장합니다
          minimum: 0
          maximum: 1
          example: 0.9
        top_k:
          type: integer
          description: |-
            확률이 가장 높은 K개의 token 중에서만 샘플링합니다(Anthropic 고유 파라미터)

            **설명**:
            - 값이 작을수록 출력이 더 확정적이고, 클수록 후보가 더 다양합니다
          minimum: 0
          example: 10
        stop_sequences:
          type: array
          description: >-
            사용자 정의 중지 시퀀스: 생성이 그중 어느 문자열에라도 적중하면 중지합니다


            **설명**:

            - 적중 시 잘리며, 적중 지점 이전 내용은 정상적으로 반환됩니다

            - **주의**: 중지 시퀀스에 적중할 때 GLM 시리즈의 `stop_reason`은 `end_turn`을
            반환하며(Anthropic 표준인 `stop_sequence`가 아님), 응답에도 `stop_sequence` 필드가
            포함되지 않습니다. 클라이언트가 `stop_reason=="stop_sequence"`로 적중을 판단한다면 별도 처리가
            필요합니다
          items:
            type: string
          example:
            - |+


        stream:
          type: boolean
          description: >-
            SSE로 스트리밍 반환할지 여부


            - `true`: Server-Sent Events 스트리밍 반환(표준 Anthropic 이벤트 시퀀스:
            message_start / content_block_start / content_block_delta /
            message_delta / message_stop)

            - `false`: 완전한 응답 후 한 번에 반환(기본값)
          default: false
          example: false
        thinking:
          type: object
          description: >-
            심층 사고를 제어합니다


            **설명**:

            - GLM 시리즈는 모두 추론 모델이며, **이 필드를 전달하지 않으면 기본적으로 사고가 켜집니다**

            - 켜져 있으면 응답 `content` 배열에 `type="thinking"` 추론 과정 block이
            나타납니다(output 토큰으로 과금되며 `signature`는 빈 문자열일 수 있음)

            - **`type` 이진 스위치만 유효**: `budget_tokens`, `effort` 등 사고 예산 / 등급
            파라미터는 적용되지 않습니다(무시됨)


            **끌 수 있는지는 모델마다 다릅니다**:

            - `glm-5.2`: `{"type":"disabled"}`를 전달하면 사고를 꺼서 output 토큰을 크게 줄일 수
            있습니다

            - `glm-5.3` / `glm-5.3-flash`: **항상 사고하며 끌 수 없습니다**. `disabled`를 보내면
            오류가 발생합니다


            **그 결과 `glm-5.3` 시리즈는 이 엔드포인트에서 사고 비용을 줄일 수 없습니다.** 끌 수도
            없고(`disabled`는 오류),

            줄일 수도 없습니다(`budget_tokens`와 `effort` 모두 적용되지 않으며, 최상위
            `reasoning_effort`는 OpenAI 프로토콜 필드라 이 엔드포인트에서는 무시됩니다).

            사고 내용은 output 토큰으로 과금되므로 이 엔드포인트에서 그 비용은 피할 수 없습니다.


            **사고 비용을 제어하려면 [Chat Completions
            API](../chat-completions/chat-completions-reference)로 전환하세요** ——

            그쪽의 `reasoning_effort`는 `low` / `high` / `max` 세 단계가 실제로 적용됩니다.
            `glm-5.2`는 이 제약을 받지 않으며, 이 엔드포인트에서도 사고를 바로 끌 수 있습니다.


            **`glm-5.2`에서 마이그레이션**: 기존 코드에 `thinking.type=disabled`가 하드코딩되어 있다면
            `glm-5.3`으로 전환하기 전에 해당 필드를 제거해야 하며, 그렇지 않으면 요청이 바로 실패합니다.

            또한 사고를 꺼서 비용을 관리하고 있었다면 이 엔드포인트에는 동등한 대안이 없으므로, 전환 시 Chat
            Completions API로의 이전도 함께 고려해야 합니다.
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - enabled
                - disabled
              description: |-
                - thinking 필드를 전달하지 않음: 기본적으로 사고가 켜짐
                - `disabled`: 사고를 끄고 바로 답변
                - `enabled`: Anthropic 표준의 명시적 활성화 값
        tools:
          type: array
          description: |-
            도구 정의 목록

            **설명**:
            - Anthropic tool 정의 규범을 따릅니다
            - `input_schema`는 JSON Schema 객체를 사용합니다
            - 모델은 표준 `tool_use` block을 반환하며, `stop_reason=tool_use`입니다
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: object
          description: 도구 선택 전략
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - auto
                - none
              description: |-
                - `auto`: 모델이 도구 호출 여부를 자동으로 결정
                - `none`: 도구 호출 금지
        metadata:
          type: object
          description: 요청 메타데이터
          properties:
            user_id:
              type: string
              description: >-
                최종 사용자를 나타내는 고유 식별자로, 사용자 단위 모니터링과 남용 탐지에 사용할 수 있습니다(해시 처리된 ID
                사용 권장)
    MessageResponse:
      type: object
      description: Anthropic 스타일의 메시지 응답
      properties:
        id:
          type: string
          description: '메시지 고유 ID(형식: `msg_<uuid>`)'
        type:
          type: string
          enum:
            - message
          description: 응답 객체 유형
        role:
          type: string
          enum:
            - assistant
        model:
          type: string
          description: 실제 사용된 모델
          example: glm-5.3
        content:
          type: array
          description: |-
            응답 콘텐츠 블록 목록

            **포함될 수 있는 block type**:
            - `thinking`: 추론 과정(사고가 켜져 있을 때, 기본적으로 켜짐)
            - `text`: 최종 답변 텍스트
            - `tool_use`: 모델이 발생시킨 도구 호출
          items:
            $ref: '#/components/schemas/OutputContentBlock'
        stop_reason:
          type: string
          description: |-
            중지 사유

            - `end_turn`: 자연스러운 종료(stop_sequences에 적중할 때도 이 값을 반환)
            - `max_tokens`: max_tokens 상한 도달
            - `tool_use`: 모델이 도구 호출을 트리거
          enum:
            - end_turn
            - max_tokens
            - tool_use
        usage:
          $ref: '#/components/schemas/AnthropicUsage'
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - error
        error:
          type: object
          properties:
            type:
              type: string
              description: >-
                오류 유형(예: invalid_request_error / authentication_error /
                billing_error 등)
            message:
              type: string
              description: 오류 설명
        request_id:
          type: string
          description: 요청 추적 ID
    InputMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
          description: >-
            메시지 발신자 역할로, user / assistant가 번갈아 나타납니다


            - `user`: 사용자 메시지(`tool_result` block을 회신할 때도 사용)

            - `assistant`: 어시스턴트의 과거 응답(`text` / `thinking` / `tool_use` blocks
            포함 가능)


            **`system`을 받지 않습니다**: 시스템 프롬프트는 최상위 `system` 필드로 전달하세요.
        content:
          description: >-
            메시지 내용


            **설명**:

            - 일반 텍스트는 문자열을 그대로 전달합니다

            - 구조화할 때는 content block 배열(`text` / `image` / `tool_use` /
            `tool_result` / `thinking`)을 전달합니다

            - `image` 콘텐츠 블록은 **`glm-5.3-flash`만 지원**합니다. 다른 모델에 보내도 오류는 발생하지
            않지만 모델이 이미지를 읽지 못합니다
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentBlock'
    CacheControl:
      type: object
      description: >-
        프롬프트 캐시 표식


        **설명**: GLM 시리즈는 암묵적 캐시(동일한 프리픽스로 자동 생성되며 적중은
        `cache_read_input_tokens`에서 확인, 워밍업 필요)를 사용하므로 이 명시적 표식에 의존하지 않습니다.
        `cache_control`은 정상적으로 전달할 수 있지만 무시될 수 있으며, 암묵적 캐시에는 영향을 주지 않습니다.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - ephemeral
          description: 캐시 마커 유형
    Tool:
      type: object
      required:
        - name
        - input_schema
      properties:
        name:
          type: string
          description: |-
            도구 이름

            **설명**:
            - `a-zA-Z0-9_-`만 허용
            - 최대 64자
        description:
          type: string
          description: 도구 기능 설명으로, 모델이 언제 호출할지 판단하는 데 사용
        input_schema:
          type: object
          description: |-
            도구 입력 파라미터의 JSON Schema 객체

            **설명**:
            - `type`은 반드시 `object`
            - `properties`와 `required`를 선언해야 합니다
        cache_control:
          $ref: '#/components/schemas/CacheControl'
    OutputContentBlock:
      type: object
      description: 응답 내의 콘텐츠 블록
      properties:
        type:
          type: string
          enum:
            - text
            - thinking
            - tool_use
        text:
          type: string
          description: type=`text`일 때의 텍스트
        thinking:
          type: string
          description: type=`thinking`일 때의 추론 과정 텍스트
        signature:
          type: string
          description: type=`thinking`일 때의 서명 (빈 문자열일 수 있음)
        id:
          type: string
          description: type=`tool_use`일 때의 도구 호출 ID
        name:
          type: string
          description: type=`tool_use`일 때의 도구 이름
        input:
          type: object
          description: type=`tool_use`일 때 모델이 생성한 JSON 입력 파라미터
    AnthropicUsage:
      type: object
      description: Token 사용 통계(Anthropic 규범)
      properties:
        input_tokens:
          type: integer
          description: 입력 token 수(캐시 미적중 부분)
          example: 18
        output_tokens:
          type: integer
          description: 출력 token 수(thinking 포함)
          example: 101
        cache_creation_input_tokens:
          type: integer
          description: >-
            캐시에 기록된 토큰 수입니다. GLM 시리즈는 암묵적 캐시를 사용하며 명시적인 캐시 생성 과정이 없으므로 **이 필드는
            항상 0입니다**.
          example: 0
        cache_read_input_tokens:
          type: integer
          description: >-
            암묵적 프리픽스 캐시에 적중한 입력 토큰 수입니다. 동일한 프리픽스의 반복 요청은 자동으로 적중하며
            `cache_control`을 설정할 필요가 없습니다. 적중한 부분은 캐시 단가로 과금되어 미적중 입력 단가보다 훨씬
            저렴합니다. 첫 요청은 0입니다.
          example: 0
        prompt_tokens_details:
          type: object
          description: 입력 토큰 세부 정보 (캐시 적중 필드, GLM 시리즈에서도 함께 반환)
          properties:
            cached_tokens:
              type: integer
              description: 캐시에 적중한 입력 token 수
              example: 0
    ContentBlock:
      type: object
      description: |-
        메시지 콘텐츠 블록

        **지원하는 type**:
        - `text`: 텍스트 내용
        - `image`: 이미지 (**`glm-5.3-flash` 전용**, 다른 모델에서는 오류가 없지만 이미지를 읽지 못함)
        - `tool_use`: 이전 턴의 assistant 도구 호출을 다시 전달
        - `tool_result`: 도구 실행 결과
        - `thinking`: 이전 턴의 assistant 사고 내용을 다시 전달
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
            - image
            - tool_use
            - tool_result
            - thinking
        text:
          type: string
          description: type=`text`일 때의 텍스트 내용
        source:
          type: object
          description: |-
            이미지 소스 (type=`image`일 때 필수, **`glm-5.3-flash`만 지원**)

            `base64` 인라인과 `url` 두 가지 방식을 지원합니다.
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - base64
                - url
              description: |-
                이미지 전달 방식

                - `base64`: 이미지 데이터를 인라인으로 전달
                - `url`: 공개 이미지 주소, 업스트림 서비스가 직접 다운로드
            media_type:
              type: string
              description: 이미지 MIME 유형(`type=base64`일 때 필수)
              example: image/png
            data:
              type: string
              description: Base64 인코딩 이미지 데이터(`type=base64`일 때 필수, `data:` 접두사 제외)
              example: iVBORw0KGgoAAAANSUhEUgAA...
            url:
              type: string
              description: 공개 이미지 URL(`type=url`일 때 필수)
              example: https://example.com/photo.jpg
        id:
          type: string
          description: 도구 호출 ID(tool_use일 때 필수)
        name:
          type: string
          description: 도구 이름(tool_use일 때 필수)
        input:
          type: object
          description: 도구 입력 파라미터(tool_use일 때, JSON 객체)
        tool_use_id:
          type: string
          description: 대응하는 도구 호출 ID(tool_result일 때 필수, tool_use.id로 회신)
        content:
          description: 도구 실행 결과(tool_result), 문자열 또는 content block 배열
          oneOf:
            - type: string
            - type: array
              items:
                type: object
        thinking:
          type: string
          description: 회신하는 assistant 사고 과정 내용(type=`thinking`일 때 사용)
        signature:
          type: string
          description: >-
            반환된 thinking 내용의 서명으로, 멀티턴으로 이어서 생성할 때 원본 그대로 다시 보내야 합니다 (빈 문자열이 반환될
            수 있음)
        cache_control:
          $ref: '#/components/schemas/CacheControl'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##모든 인터페이스는 Bearer Token 인증이 필요합니다##


        **API Key 발급**:


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


        **요청 헤더에 추가**:

        ```

        Authorization: Bearer YOUR_API_KEY

        ```


        **참고**: EvoLink는 `/v1/messages`에 대해 일괄적으로 Bearer Token 인증을 사용합니다.

````