> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-hivemind-launch.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat Completion 생성

> 새 Chat Completion을 생성합니다.



## OpenAPI

````yaml /ko/serverless-rl/api-reference/openapi.json post /v1/chat/completions
openapi: 3.1.0
info:
  title: Serverless RL
  version: 1.0.0
servers: []
security: []
paths:
  /v1/chat/completions:
    post:
      tags:
        - chat-completions
      summary: Chat Completion 생성
      description: 새 Chat Completion을 생성합니다.
      operationId: create_chat_completion_v1_chat_completions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
          description: 성공 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
      security:
        - HTTPBearer: []
components:
  schemas:
    ChatCompletionRequest:
      additionalProperties: true
      properties:
        add_generation_prompt:
          default: true
          description: >-
            true이면 생성 프롬프트가 채팅 템플릿에 추가됩니다. 이는 모델의 tokenizer 설정에 있는 채팅 템플릿에서 사용하는
            매개변수입니다.
          title: Add Generation Prompt
          type: boolean
        add_special_tokens:
          default: false
          description: >-
            true이면 채팅 템플릿으로 추가되는 내용 외에도 특수 토큰(예: BOS)이 프롬프트에 추가됩니다. 대부분의 모델에서는
            채팅 템플릿이 특수 토큰 추가를 처리하므로 false로 설정해야 합니다(기본값도 false).
          title: Add Special Tokens
          type: boolean
        allowed_token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Allowed Token Ids
        bad_words:
          items:
            type: string
          title: Bad Words
          type: array
        cache_salt:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            지정하면 다중 사용자 환경에서 공격자가 프롬프트를 추측하지 못하도록 제공된 문자열을 사용해 prefix cache에 솔트를
            추가합니다. 솔트는 무작위여야 하고, 제3자가 접근할 수 없도록 보호되어야 하며, 예측할 수 없을 만큼 충분히 길어야
            합니다(예: 256비트에 해당하는 base64 인코딩 43자).
          title: Cache Salt
        chat_template:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            이 변환에 사용할 Jinja 템플릿입니다. transformers v4.44부터는 기본 채팅 템플릿이 더 이상 허용되지
            않으므로 tokenizer에 채팅 템플릿이 정의되어 있지 않다면 반드시 제공해야 합니다.
          title: Chat Template
        chat_template_kwargs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: 템플릿 렌더러에 전달할 추가 키워드 인수입니다. 채팅 템플릿에서 접근할 수 있습니다.
          title: Chat Template Kwargs
        continue_final_message:
          default: false
          description: >-
            이 값을 설정하면 채팅이 마지막 메시지가 EOS 토큰 없이 열린 형태가 되도록 포맷됩니다. 모델은 새 메시지를 시작하는
            대신 이 메시지를 이어서 생성합니다. 이를 통해 모델 응답의 일부를 "미리 채워 넣을" 수 있습니다.
            `add_generation_prompt`와 동시에 사용할 수 없습니다.
          title: Continue Final Message
          type: boolean
        documents:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          description: >-
            모델이 RAG(검색 증강 생성)를 수행할 때 접근할 수 있는 문서를 나타내는 dict 목록입니다. 템플릿이 RAG를
            지원하지 않으면 이 argument는 아무런 효과가 없습니다. 각 문서는 "title" 및 "text" 키를 포함하는
            dict로 구성하는 것을 권장합니다.
          title: Documents
        echo:
          default: false
          description: true이면 새 메시지가 마지막 메시지와 동일한 역할에 속할 경우, 마지막 메시지 앞에 추가됩니다.
          title: Echo
          type: boolean
        frequency_penalty:
          anyOf:
            - type: number
            - type: 'null'
          default: 0
          title: Frequency Penalty
        ignore_eos:
          default: false
          title: Ignore Eos
          type: boolean
        include_reasoning:
          default: true
          title: Include Reasoning
          type: boolean
        include_stop_str_in_output:
          default: false
          title: Include Stop Str In Output
          type: boolean
        kv_transfer_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: 분리형 서빙에 사용되는 KVTransfer 매개변수입니다.
          title: Kv Transfer Params
        length_penalty:
          default: 1
          title: Length Penalty
          type: number
        logit_bias:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Logit Bias
        logprobs:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          title: Logprobs
        max_completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Completion Tokens
        max_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          deprecated: true
          title: Max Tokens
        messages:
          items:
            anyOf:
              - $ref: '#/components/schemas/ChatCompletionDeveloperMessageParam'
              - $ref: '#/components/schemas/ChatCompletionSystemMessageParam'
              - $ref: '#/components/schemas/ChatCompletionUserMessageParam'
              - $ref: '#/components/schemas/ChatCompletionAssistantMessageParam'
              - $ref: '#/components/schemas/ChatCompletionToolMessageParam'
              - $ref: '#/components/schemas/ChatCompletionFunctionMessageParam'
              - $ref: '#/components/schemas/CustomChatCompletionMessageParam'
              - $ref: '#/components/schemas/Message'
          title: Messages
          type: array
        min_p:
          anyOf:
            - type: number
            - type: 'null'
          title: Min P
        min_tokens:
          default: 0
          title: Min Tokens
          type: integer
        mm_processor_kwargs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: HF 프로세서에 전달할 추가 kwargs입니다.
          title: Mm Processor Kwargs
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        'n':
          anyOf:
            - type: integer
            - type: 'null'
          default: 1
          title: 'N'
        parallel_tool_calls:
          anyOf:
            - type: boolean
            - type: 'null'
          default: true
          title: Parallel Tool Calls
        presence_penalty:
          anyOf:
            - type: number
            - type: 'null'
          default: 0
          title: Presence Penalty
        priority:
          default: 0
          description: >-
            요청의 우선순위입니다(값이 낮을수록 더 먼저 처리되며, 기본값은 0). 서빙 중인 모델이 우선순위 스케줄링을 사용하지 않는
            경우, 0이 아닌 우선순위를 지정하면 오류가 발생합니다.
          title: Priority
          type: integer
        prompt_logprobs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prompt Logprobs
        reasoning_effort:
          anyOf:
            - enum:
                - low
                - medium
                - high
              type: string
            - type: 'null'
          title: Reasoning Effort
        repetition_detection:
          anyOf:
            - $ref: '#/components/schemas/RepetitionDetectionParams'
            - type: 'null'
          description: >-
            출력 토큰에서 반복되는 N-gram 패턴을 감지하기 위한 매개변수입니다. 이러한 반복이 감지되면 생성이 조기에 종료됩니다.
            LLM은 때때로 반복적이고 유용하지 않은 토큰 패턴을 생성하며, 최대 출력 길이에 도달할 때까지 멈추지 않을 수
            있습니다(예: 'abcdabcdabcd...' 또는 '\emoji \emoji \emoji ...'). 이 기능은 이러한
            동작을 감지해 조기에 종료함으로써 시간과 토큰을 절약합니다.
        repetition_penalty:
          anyOf:
            - type: number
            - type: 'null'
          title: Repetition Penalty
        request_id:
          description: >-
            이 요청과 관련된 request_id입니다. 호출자가 이를 설정하지 않으면 random_uuid가 생성됩니다. 이 ID는
            Inference 과정 전반에서 사용되며 Response에 반환됩니다.
          title: Request Id
          type: string
        response_format:
          anyOf:
            - $ref: '#/components/schemas/ResponseFormat'
            - $ref: '#/components/schemas/StructuralTagResponseFormat'
            - $ref: '#/components/schemas/LegacyStructuralTagResponseFormat'
            - type: 'null'
          title: Response Format
        return_token_ids:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            지정하면 생성된 텍스트와 함께 token ID도 결과에 포함됩니다. 스트리밍 모드에서는 prompt_token_ids가 첫
            번째 청크에만 포함되고, token_ids에는 각 청크의 delta token이 포함됩니다. 이는 디버깅하거나 생성된
            텍스트를 입력 token에 다시 매핑해야 할 때 유용합니다.
          title: Return Token Ids
        return_tokens_as_token_ids:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            'logprobs'와 함께 지정하면 JSON으로 인코딩할 수 없는 token을 식별할 수 있도록 token이
            'token_id:{token_id}' 형식의 문자열로 표현됩니다.
          title: Return Tokens As Token Ids
        seed:
          anyOf:
            - maximum: 9223372036854776000
              minimum: -9223372036854776000
              type: integer
            - type: 'null'
          title: Seed
        skip_special_tokens:
          default: true
          title: Skip Special Tokens
          type: boolean
        spaces_between_special_tokens:
          default: true
          title: Spaces Between Special Tokens
          type: boolean
        stop:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          default: []
          title: Stop
        stop_token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: []
          title: Stop Token Ids
        stream:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          title: Stream
        stream_options:
          anyOf:
            - $ref: '#/components/schemas/StreamOptions'
            - type: 'null'
        structured_outputs:
          anyOf:
            - $ref: '#/components/schemas/StructuredOutputsParams'
            - type: 'null'
          description: 구조화된 출력용 추가 kwargs입니다.
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
        tool_choice:
          anyOf:
            - const: none
              type: string
            - const: auto
              type: string
            - const: required
              type: string
            - $ref: '#/components/schemas/ChatCompletionNamedToolChoiceParam'
            - type: 'null'
          default: none
          title: Tool Choice
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionToolsParam'
              type: array
            - type: 'null'
          title: Tools
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          title: Top K
        top_logprobs:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          title: Top Logprobs
        top_p:
          anyOf:
            - type: number
            - type: 'null'
          title: Top P
        truncate_prompt_tokens:
          anyOf:
            - maximum: 9223372036854776000
              minimum: -1
              type: integer
            - type: 'null'
          title: Truncate Prompt Tokens
        use_beam_search:
          default: false
          title: Use Beam Search
          type: boolean
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
        vllm_xargs:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - items:
                      anyOf:
                        - type: string
                        - type: integer
                        - type: number
                    type: array
              type: object
            - type: 'null'
          description: 맞춤형 확장에서 사용하는 추가 요청 매개변수로, 문자열 값 또는 숫자 값(또는 그 목록)을 받습니다.
          title: Vllm Xargs
      required:
        - messages
      title: ChatCompletionRequest
      type: object
    ChatCompletionResponse:
      additionalProperties: true
      properties:
        choices:
          items:
            $ref: '#/components/schemas/ChatCompletionResponseChoice'
          title: Choices
          type: array
        created:
          title: Created
          type: integer
        id:
          title: Id
          type: string
        kv_transfer_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: KVTransfer 매개변수입니다.
          title: Kv Transfer Params
        model:
          title: Model
          type: string
        object:
          const: chat.completion
          default: chat.completion
          title: Object
          type: string
        prompt_logprobs:
          anyOf:
            - items:
                anyOf:
                  - additionalProperties:
                      $ref: '#/components/schemas/Logprob'
                    type: object
                  - type: 'null'
              type: array
            - type: 'null'
          title: Prompt Logprobs
        prompt_token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Prompt Token Ids
        service_tier:
          anyOf:
            - enum:
                - auto
                - default
                - flex
                - scale
                - priority
              type: string
            - type: 'null'
          title: Service Tier
        system_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: System Fingerprint
        usage:
          $ref: '#/components/schemas/UsageInfo'
      required:
        - model
        - choices
        - usage
      title: ChatCompletionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ChatCompletionDeveloperMessageParam:
      additionalProperties: true
      description: >-
        사용자가 보낸 메시지와 관계없이 모델이 따라야 하는 개발자 제공 지침입니다. o1 모델 및 이후 모델에서는 `developer`
        메시지가 기존 `system` 메시지를 대체합니다.
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
              type: array
          title: Content
        name:
          title: Name
          type: string
        role:
          const: developer
          title: Role
          type: string
      required:
        - content
        - role
      title: ChatCompletionDeveloperMessageParam
      type: object
    ChatCompletionSystemMessageParam:
      additionalProperties: true
      description: >-
        사용자가 보낸 메시지와 관계없이 모델이 따라야 하는 개발자 제공 지침입니다. o1 모델 및 그 이후 모델에서는 이 용도로 대신
        `developer` 메시지를 사용하세요.
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
              type: array
          title: Content
        name:
          title: Name
          type: string
        role:
          const: system
          title: Role
          type: string
      required:
        - content
        - role
      title: ChatCompletionSystemMessageParam
      type: object
    ChatCompletionUserMessageParam:
      additionalProperties: true
      description: 프롬프트 또는 추가 컨텍스트 정보를 포함한, 최종 사용자가 보낸 메시지입니다.
      properties:
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
                  - $ref: '#/components/schemas/ChatCompletionContentPartImageParam'
                  - $ref: >-
                      #/components/schemas/ChatCompletionContentPartInputAudioParam
                  - $ref: '#/components/schemas/File'
              type: array
          title: Content
        name:
          title: Name
          type: string
        role:
          const: user
          title: Role
          type: string
      required:
        - content
        - role
      title: ChatCompletionUserMessageParam
      type: object
    ChatCompletionAssistantMessageParam:
      additionalProperties: true
      description: 사용자 메시지에 대한 응답으로 모델이 보낸 메시지입니다.
      properties:
        audio:
          anyOf:
            - $ref: '#/components/schemas/Audio'
            - type: 'null'
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
                  - $ref: '#/components/schemas/ChatCompletionContentPartRefusalParam'
              type: array
            - type: 'null'
          title: Content
        function_call:
          anyOf:
            - $ref: '#/components/schemas/FunctionCall-Input'
            - type: 'null'
        name:
          title: Name
          type: string
        refusal:
          anyOf:
            - type: string
            - type: 'null'
          title: Refusal
        role:
          const: assistant
          title: Role
          type: string
        tool_calls:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/ChatCompletionMessageFunctionToolCallParam
              - $ref: '#/components/schemas/ChatCompletionMessageCustomToolCallParam'
          title: Tool Calls
          type: array
      required:
        - role
      title: ChatCompletionAssistantMessageParam
      type: object
    ChatCompletionToolMessageParam:
      additionalProperties: true
      properties:
        content:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
              type: array
          title: Content
        role:
          const: tool
          title: Role
          type: string
        tool_call_id:
          title: Tool Call Id
          type: string
      required:
        - content
        - role
        - tool_call_id
      title: ChatCompletionToolMessageParam
      type: object
    ChatCompletionFunctionMessageParam:
      additionalProperties: true
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        name:
          title: Name
          type: string
        role:
          const: function
          title: Role
          type: string
      required:
        - content
        - name
        - role
      title: ChatCompletionFunctionMessageParam
      type: object
    CustomChatCompletionMessageParam:
      additionalProperties: true
      description: Chat Completion API에서 커스텀 역할을 활성화합니다.
      properties:
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ChatCompletionContentPartTextParam'
                  - $ref: '#/components/schemas/ChatCompletionContentPartImageParam'
                  - $ref: >-
                      #/components/schemas/ChatCompletionContentPartInputAudioParam
                  - $ref: '#/components/schemas/File'
                  - $ref: '#/components/schemas/ChatCompletionContentPartAudioParam'
                  - $ref: '#/components/schemas/ChatCompletionContentPartVideoParam'
                  - $ref: '#/components/schemas/ChatCompletionContentPartRefusalParam'
                  - $ref: >-
                      #/components/schemas/CustomChatCompletionContentSimpleImageParam
                  - $ref: >-
                      #/components/schemas/ChatCompletionContentPartImageEmbedsParam
                  - $ref: >-
                      #/components/schemas/ChatCompletionContentPartAudioEmbedsParam
                  - $ref: >-
                      #/components/schemas/CustomChatCompletionContentSimpleAudioParam
                  - $ref: >-
                      #/components/schemas/CustomChatCompletionContentSimpleVideoParam
                  - type: string
                  - $ref: '#/components/schemas/CustomThinkCompletionContentParam'
              type: array
          title: Content
        name:
          title: Name
          type: string
        reasoning:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning
        role:
          title: Role
          type: string
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
        tool_calls:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/ChatCompletionMessageFunctionToolCallParam
              type: array
            - type: 'null'
          title: Tool Calls
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionFunctionToolParam'
              type: array
            - type: 'null'
          title: Tools
      required:
        - role
      title: CustomChatCompletionMessageParam
      type: object
    Message:
      properties:
        author:
          $ref: '#/components/schemas/Author'
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
        content:
          items:
            $ref: '#/components/schemas/Content'
          title: Content
          type: array
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        recipient:
          anyOf:
            - type: string
            - type: 'null'
          title: Recipient
      required:
        - author
      title: Message
      type: object
    RepetitionDetectionParams:
      description: 출력 토큰에서 반복되는 N-gram 패턴을 감지하기 위한 매개변수입니다.
      properties:
        max_pattern_size:
          default: 0
          title: Max Pattern Size
          type: integer
        min_count:
          default: 0
          title: Min Count
          type: integer
        min_pattern_size:
          default: 0
          title: Min Pattern Size
          type: integer
      title: RepetitionDetectionParams
      type: object
    ResponseFormat:
      additionalProperties: true
      properties:
        json_schema:
          anyOf:
            - $ref: '#/components/schemas/JsonSchemaResponseFormat'
            - type: 'null'
        type:
          enum:
            - text
            - json_object
            - json_schema
          title: Type
          type: string
      required:
        - type
      title: ResponseFormat
      type: object
    StructuralTagResponseFormat:
      additionalProperties: true
      properties:
        format:
          title: Format
        type:
          const: structural_tag
          title: Type
          type: string
      required:
        - type
        - format
      title: StructuralTagResponseFormat
      type: object
    LegacyStructuralTagResponseFormat:
      additionalProperties: true
      properties:
        structures:
          items:
            $ref: '#/components/schemas/LegacyStructuralTag'
          title: Structures
          type: array
        triggers:
          items:
            type: string
          title: Triggers
          type: array
        type:
          const: structural_tag
          title: Type
          type: string
      required:
        - type
        - structures
        - triggers
      title: LegacyStructuralTagResponseFormat
      type: object
    StreamOptions:
      additionalProperties: true
      properties:
        continuous_usage_stats:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          title: Continuous Usage Stats
        include_usage:
          anyOf:
            - type: boolean
            - type: 'null'
          default: true
          title: Include Usage
      title: StreamOptions
      type: object
    StructuredOutputsParams:
      properties:
        _backend:
          anyOf:
            - type: string
            - type: 'null'
          title: Backend
        _backend_was_auto:
          default: false
          title: Backend Was Auto
          type: boolean
        choice:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Choice
        disable_additional_properties:
          default: false
          title: Disable Additional Properties
          type: boolean
        disable_any_whitespace:
          default: false
          title: Disable Any Whitespace
          type: boolean
        disable_fallback:
          default: false
          title: Disable Fallback
          type: boolean
        grammar:
          anyOf:
            - type: string
            - type: 'null'
          title: Grammar
        json:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Json
        json_object:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Json Object
        regex:
          anyOf:
            - type: string
            - type: 'null'
          title: Regex
        structural_tag:
          anyOf:
            - type: string
            - type: 'null'
          title: Structural Tag
        whitespace_pattern:
          anyOf:
            - type: string
            - type: 'null'
          title: Whitespace Pattern
      title: StructuredOutputsParams
      type: object
    ChatCompletionNamedToolChoiceParam:
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/ChatCompletionNamedFunction'
        type:
          const: function
          default: function
          title: Type
          type: string
      required:
        - function
      title: ChatCompletionNamedToolChoiceParam
      type: object
    ChatCompletionToolsParam:
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/FunctionDefinition'
        type:
          const: function
          default: function
          title: Type
          type: string
      required:
        - function
      title: ChatCompletionToolsParam
      type: object
    ChatCompletionResponseChoice:
      additionalProperties: true
      properties:
        finish_reason:
          anyOf:
            - type: string
            - type: 'null'
          default: stop
          title: Finish Reason
        index:
          title: Index
          type: integer
        logprobs:
          anyOf:
            - $ref: '#/components/schemas/ChatCompletionLogProbs'
            - type: 'null'
        message:
          $ref: '#/components/schemas/ChatMessage'
        stop_reason:
          anyOf:
            - type: integer
            - type: string
            - type: 'null'
          title: Stop Reason
        token_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Token Ids
      required:
        - index
        - message
      title: ChatCompletionResponseChoice
      type: object
    Logprob:
      properties:
        decoded_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Decoded Token
        logprob:
          title: Logprob
          type: number
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
      required:
        - logprob
      title: Logprob
      type: object
    UsageInfo:
      additionalProperties: true
      properties:
        completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          title: Completion Tokens
        prompt_tokens:
          default: 0
          title: Prompt Tokens
          type: integer
        prompt_tokens_details:
          anyOf:
            - $ref: '#/components/schemas/PromptTokenUsageInfo'
            - type: 'null'
        total_tokens:
          default: 0
          title: Total Tokens
          type: integer
      title: UsageInfo
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ChatCompletionContentPartTextParam:
      additionalProperties: true
      description: >-
        [텍스트 입력](https://platform.openai.com/docs/guides/text-generation)에 대해
        알아보세요.
      properties:
        text:
          title: Text
          type: string
        type:
          const: text
          title: Type
          type: string
      required:
        - text
        - type
      title: ChatCompletionContentPartTextParam
      type: object
    ChatCompletionContentPartImageParam:
      additionalProperties: true
      description: '[이미지 입력](https://platform.openai.com/docs/guides/vision)에 대해 알아보세요.'
      properties:
        image_url:
          $ref: '#/components/schemas/ImageURL'
        type:
          const: image_url
          title: Type
          type: string
      required:
        - image_url
        - type
      title: ChatCompletionContentPartImageParam
      type: object
    ChatCompletionContentPartInputAudioParam:
      additionalProperties: true
      description: '[오디오 입력](https://platform.openai.com/docs/guides/audio)에 대해 알아보세요.'
      properties:
        input_audio:
          $ref: '#/components/schemas/InputAudio'
        type:
          const: input_audio
          title: Type
          type: string
      required:
        - input_audio
        - type
      title: ChatCompletionContentPartInputAudioParam
      type: object
    File:
      additionalProperties: true
      description: >-
        텍스트 생성을 위한 [file inputs](https://platform.openai.com/docs/guides/text)에
        대해 알아보세요.
      properties:
        file:
          $ref: '#/components/schemas/FileFile'
        type:
          const: file
          title: Type
          type: string
      required:
        - file
        - type
      title: File
      type: object
    Audio:
      additionalProperties: true
      description: |-
        모델의 이전 오디오 응답에 대한 데이터입니다.
        [자세히 알아보기](https://platform.openai.com/docs/guides/audio).
      properties:
        id:
          title: Id
          type: string
      required:
        - id
      title: Audio
      type: object
    ChatCompletionContentPartRefusalParam:
      additionalProperties: true
      properties:
        refusal:
          title: Refusal
          type: string
        type:
          const: refusal
          title: Type
          type: string
      required:
        - refusal
        - type
      title: ChatCompletionContentPartRefusalParam
      type: object
    FunctionCall-Input:
      additionalProperties: true
      description: |-
        사용 중단되었으며 `tool_calls`로 대체되었습니다.

        모델이 생성한, 호출해야 할 함수의 이름과 인수입니다.
      properties:
        arguments:
          title: Arguments
          type: string
        name:
          title: Name
          type: string
      required:
        - arguments
        - name
      title: FunctionCall
      type: object
    ChatCompletionMessageFunctionToolCallParam:
      additionalProperties: true
      description: 모델이 생성한 함수 도구 call입니다.
      properties:
        function:
          $ref: '#/components/schemas/Function'
        id:
          title: Id
          type: string
        type:
          const: function
          title: Type
          type: string
      required:
        - id
        - function
        - type
      title: ChatCompletionMessageFunctionToolCallParam
      type: object
    ChatCompletionMessageCustomToolCallParam:
      additionalProperties: true
      description: 모델이 생성한 맞춤형 도구 call입니다.
      properties:
        custom:
          $ref: '#/components/schemas/Custom'
        id:
          title: Id
          type: string
        type:
          const: custom
          title: Type
          type: string
      required:
        - id
        - custom
        - type
      title: ChatCompletionMessageCustomToolCallParam
      type: object
    ChatCompletionContentPartAudioParam:
      additionalProperties: true
      properties:
        audio_url:
          $ref: '#/components/schemas/AudioURL'
        type:
          const: audio_url
          title: Type
          type: string
      required:
        - audio_url
        - type
      title: ChatCompletionContentPartAudioParam
      type: object
    ChatCompletionContentPartVideoParam:
      additionalProperties: true
      properties:
        type:
          const: video_url
          title: Type
          type: string
        video_url:
          $ref: '#/components/schemas/VideoURL'
      required:
        - video_url
        - type
      title: ChatCompletionContentPartVideoParam
      type: object
    CustomChatCompletionContentSimpleImageParam:
      additionalProperties: true
      description: |-
        일반 image_url만 허용하는 매개변수의 더 단순한 버전입니다.
        OpenAI API에서 지원되지만 문서화되어 있지는 않습니다.

        예:
        {
            "image_url": "https://example.com/image.jpg"
        }
      properties:
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Uuid
      title: CustomChatCompletionContentSimpleImageParam
      type: object
    ChatCompletionContentPartImageEmbedsParam:
      additionalProperties: true
      properties:
        image_embeds:
          anyOf:
            - type: string
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Image Embeds
        type:
          const: image_embeds
          title: Type
          type: string
        uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Uuid
      required:
        - type
      title: ChatCompletionContentPartImageEmbedsParam
      type: object
    ChatCompletionContentPartAudioEmbedsParam:
      additionalProperties: true
      properties:
        audio_embeds:
          anyOf:
            - type: string
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Audio Embeds
        type:
          const: audio_embeds
          title: Type
          type: string
        uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Uuid
      required:
        - type
      title: ChatCompletionContentPartAudioEmbedsParam
      type: object
    CustomChatCompletionContentSimpleAudioParam:
      additionalProperties: true
      description: |-
        일반 audio_url만 받는 더 단순한 버전의 매개변수입니다.

        예:
        {
            "audio_url": "https://example.com/audio.mp3"
        }
      properties:
        audio_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Audio Url
      title: CustomChatCompletionContentSimpleAudioParam
      type: object
    CustomChatCompletionContentSimpleVideoParam:
      additionalProperties: true
      description: |-
        일반 audio_url만 허용하는 매개변수의 더 단순한 버전입니다.

        예:
        {
            "video_url": "https://example.com/video.mp4"
        }
      properties:
        uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Uuid
        video_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Url
      title: CustomChatCompletionContentSimpleVideoParam
      type: object
    CustomThinkCompletionContentParam:
      additionalProperties: true
      description: |-
        일반 텍스트와 불리언 값을 허용하는 Think Completion Content Param입니다.

        예:
        {
            "thinking": "I am thinking about the answer",
            "closed": True,
            "type": "thinking"
        }
      properties:
        closed:
          title: Closed
          type: boolean
        thinking:
          title: Thinking
          type: string
        type:
          const: thinking
          title: Type
          type: string
      required:
        - thinking
        - type
      title: CustomThinkCompletionContentParam
      type: object
    ChatCompletionFunctionToolParam:
      additionalProperties: true
      description: 응답을 생성하는 데 사용할 수 있는 함수 도구입니다.
      properties:
        function:
          $ref: >-
            #/components/schemas/openai__types__shared_params__function_definition__FunctionDefinition
        type:
          const: function
          title: Type
          type: string
      required:
        - function
        - type
      title: ChatCompletionFunctionToolParam
      type: object
    Author:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        role:
          $ref: '#/components/schemas/Role'
      required:
        - role
      title: Author
      type: object
    Content:
      properties: {}
      title: Content
      type: object
    JsonSchemaResponseFormat:
      additionalProperties: true
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        name:
          title: Name
          type: string
        schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema
        strict:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Strict
      required:
        - name
      title: JsonSchemaResponseFormat
      type: object
    LegacyStructuralTag:
      additionalProperties: true
      properties:
        begin:
          title: Begin
          type: string
        end:
          title: End
          type: string
        schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema
      required:
        - begin
        - end
      title: LegacyStructuralTag
      type: object
    ChatCompletionNamedFunction:
      additionalProperties: true
      properties:
        name:
          title: Name
          type: string
      required:
        - name
      title: ChatCompletionNamedFunction
      type: object
    FunctionDefinition:
      additionalProperties: true
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        name:
          title: Name
          type: string
        parameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters
      required:
        - name
      title: FunctionDefinition
      type: object
    ChatCompletionLogProbs:
      additionalProperties: true
      properties:
        content:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatCompletionLogProbsContent'
              type: array
            - type: 'null'
          title: Content
      title: ChatCompletionLogProbs
      type: object
    ChatMessage:
      additionalProperties: true
      properties:
        annotations:
          anyOf:
            - $ref: '#/components/schemas/Annotation'
            - type: 'null'
        audio:
          anyOf:
            - $ref: '#/components/schemas/ChatCompletionAudio'
            - type: 'null'
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        function_call:
          anyOf:
            - $ref: '#/components/schemas/FunctionCall-Output'
            - type: 'null'
        reasoning:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning
        refusal:
          anyOf:
            - type: string
            - type: 'null'
          title: Refusal
        role:
          title: Role
          type: string
        tool_calls:
          items:
            $ref: '#/components/schemas/ToolCall'
          title: Tool Calls
          type: array
      required:
        - role
      title: ChatMessage
      type: object
    PromptTokenUsageInfo:
      additionalProperties: true
      properties:
        cached_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cached Tokens
      title: PromptTokenUsageInfo
      type: object
    ImageURL:
      additionalProperties: true
      properties:
        detail:
          enum:
            - auto
            - low
            - high
          title: Detail
          type: string
        url:
          title: Url
          type: string
      required:
        - url
      title: ImageURL
      type: object
    InputAudio:
      additionalProperties: true
      properties:
        data:
          title: Data
          type: string
        format:
          enum:
            - wav
            - mp3
          title: Format
          type: string
      required:
        - data
        - format
      title: InputAudio
      type: object
    FileFile:
      additionalProperties: true
      properties:
        file_data:
          title: File Data
          type: string
        file_id:
          title: File Id
          type: string
        filename:
          title: Filename
          type: string
      title: FileFile
      type: object
    Function:
      additionalProperties: true
      description: 모델이 호출한 함수입니다.
      properties:
        arguments:
          title: Arguments
          type: string
        name:
          title: Name
          type: string
      required:
        - arguments
        - name
      title: Function
      type: object
    Custom:
      additionalProperties: true
      description: 모델이 호출한 맞춤형 도구입니다.
      properties:
        input:
          title: Input
          type: string
        name:
          title: Name
          type: string
      required:
        - input
        - name
      title: Custom
      type: object
    AudioURL:
      additionalProperties: true
      properties:
        url:
          title: Url
          type: string
      required:
        - url
      title: AudioURL
      type: object
    VideoURL:
      additionalProperties: true
      properties:
        url:
          title: Url
          type: string
      required:
        - url
      title: VideoURL
      type: object
    openai__types__shared_params__function_definition__FunctionDefinition:
      additionalProperties: true
      properties:
        description:
          title: Description
          type: string
        name:
          title: Name
          type: string
        parameters:
          additionalProperties: true
          title: Parameters
          type: object
        strict:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Strict
      required:
        - name
      title: FunctionDefinition
      type: object
    Role:
      description: 메시지 작성자의 역할입니다(``chat::Role``과 동일).
      enum:
        - user
        - assistant
        - system
        - developer
        - tool
      title: Role
      type: string
    ChatCompletionLogProbsContent:
      additionalProperties: true
      properties:
        bytes:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Bytes
        logprob:
          default: -9999
          title: Logprob
          type: number
        token:
          title: Token
          type: string
        top_logprobs:
          items:
            $ref: '#/components/schemas/ChatCompletionLogProb'
          title: Top Logprobs
          type: array
      required:
        - token
      title: ChatCompletionLogProbsContent
      type: object
    Annotation:
      additionalProperties: true
      description: 웹 검색 사용 시의 URL 인용입니다.
      properties:
        type:
          const: url_citation
          title: Type
          type: string
        url_citation:
          $ref: '#/components/schemas/AnnotationURLCitation'
      required:
        - type
        - url_citation
      title: Annotation
      type: object
    ChatCompletionAudio:
      additionalProperties: true
      description: >-
        오디오 출력 모달리티가 요청된 경우, 이 객체에는 모델의 오디오 응답 데이터가 포함됩니다. [자세히
        알아보기](https://platform.openai.com/docs/guides/audio).
      properties:
        data:
          title: Data
          type: string
        expires_at:
          title: Expires At
          type: integer
        id:
          title: Id
          type: string
        transcript:
          title: Transcript
          type: string
      required:
        - id
        - data
        - expires_at
        - transcript
      title: ChatCompletionAudio
      type: object
    FunctionCall-Output:
      additionalProperties: true
      properties:
        arguments:
          title: Arguments
          type: string
        name:
          title: Name
          type: string
      required:
        - name
        - arguments
      title: FunctionCall
      type: object
    ToolCall:
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/FunctionCall-Output'
        id:
          title: Id
          type: string
        type:
          const: function
          default: function
          title: Type
          type: string
      required:
        - function
      title: ToolCall
      type: object
    ChatCompletionLogProb:
      additionalProperties: true
      properties:
        bytes:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Bytes
        logprob:
          default: -9999
          title: Logprob
          type: number
        token:
          title: Token
          type: string
      required:
        - token
      title: ChatCompletionLogProb
      type: object
    AnnotationURLCitation:
      additionalProperties: true
      description: 웹 검색 사용 시의 URL 인용입니다.
      properties:
        end_index:
          title: End Index
          type: integer
        start_index:
          title: Start Index
          type: integer
        title:
          title: Title
          type: string
        url:
          title: Url
          type: string
      required:
        - end_index
        - start_index
        - title
        - url
      title: AnnotationURLCitation
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````