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

# 라우팅된 Chat Completion 생성

> 표준 Chat Completion 요청을 보내세요. `model`에는 태스크 별칭,
`alias@v2`와 같이 버전을 고정한 값 또는 `openai/gpt-5.6-sol`과 같은
등록된 공급자에 대한 직접 참조를 지정할 수 있습니다. 태스크 요청은 자동으로 트레이싱됩니다.




## OpenAPI

````yaml ko/openapi/model-distillation/proxy.openapi.yaml POST /chat/completions
openapi: 3.1.0
info:
  title: Model Distillation Inference Proxy
  version: 1.0.0
  description: >
    W&B 인증, 태스크 라우팅,

    공급자 자격 증명, 매개변수 재정의, 고정 트래픽, 트레이닝에 활용할 수 있는 트레이스를 지원하는 OpenAI 호환 Chat
    Completion.
servers:
  - url: https://proxy.training.wandb.ai/v1
    description: 프로덕션
security:
  - WandbApiKey: []
tags:
  - name: Chat Completions
paths:
  /chat/completions:
    post:
      tags:
        - Chat Completions
      summary: 라우팅된 Chat Completion 생성
      description: |
        표준 Chat Completion 요청을 보내세요. `model`에는 태스크 별칭,
        `alias@v2`와 같이 버전을 고정한 값 또는 `openai/gpt-5.6-sol`과 같은
        등록된 공급자에 대한 직접 참조를 지정할 수 있습니다. 태스크 요청은 자동으로 트레이싱됩니다.
      operationId: createChatCompletion
      parameters:
        - name: wandb-cache-mode
          in: header
          required: false
          description: >-
            스트리밍을 사용하지 않는 태스크 라우팅 요청 또는 직접 `provider/model` 요청에 정확히 일치하는 응답 캐싱을
            활성화합니다. 캐시 ID에는 실제 적용된 업스트림 요청 본문과 전달된 경로/쿼리 매개변수가 포함됩니다. 직접 요청의 캐시는
            entity, 공급자 설정, 모델, 그대로 전달되는 사용자 ID 및 전달된 W&B Inference 프로젝트에 따라 추가로
            분리됩니다. `readWrite`는 캐시를 조회하고 응답을 저장하며, `readOnly`는 저장 없이 조회만 하고,
            `writeOnly`는 조회 없이 저장만 합니다. 크기가 8 MiB 이하인 성공 응답만 저장됩니다. 유효하지 않은 값을
            지정하면 HTTP 400이 반환됩니다. `op-cache`도 제공하는 경우 두 헤더에 동일한 모드를 지정해야 합니다.
            스트리밍 요청은 응답 캐싱을 지원하지 않습니다.
          schema:
            type: string
            enum:
              - readWrite
              - readOnly
              - writeOnly
        - name: op-cache
          in: header
          required: false
          deprecated: true
          description: >-
            `wandb-cache-mode`의 OpenPipe 호환 별칭입니다. 동일한 모드를 허용하며, `true`는
            `readWrite`와 같습니다. 두 헤더를 모두 제공하는 경우 동일한 모드를 지정해야 합니다.
          schema:
            type: string
            enum:
              - readWrite
              - readOnly
              - writeOnly
              - 'true'
      requestBody:
        required: true
        content:
          application/json:
            examples:
              task:
                summary: 태스크 라우팅 요청
                value:
                  model: ticket-classifier
                  messages:
                    - role: user
                      content: Classify this support request.
                  metadata:
                    wandb.entity: your-team
                    wandb.thread_id: conversation-4827
              direct:
                summary: 공급자 직접 요청
                value:
                  model: openai/gpt-5.6-sol
                  messages:
                    - role: user
                      content: Say hello.
            schema:
              type: object
              properties:
                model:
                  type: string
                  minLength: 1
                  description: 태스크 별칭, `alias@vN` 또는 `{provider}/{model-id}`.
                messages:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        enum:
                          - developer
                          - system
                          - user
                          - assistant
                          - tool
                          - function
                      content:
                        description: 텍스트, 멀티모달 콘텐츠 구성 요소 또는 역할에 따라 허용되는 null.
                      name:
                        type: string
                      tool_call_id:
                        type: string
                      tool_calls:
                        type: array
                        items:
                          type: object
                          properties: {}
                          additionalProperties: {}
                    required:
                      - role
                    additionalProperties: {}
                metadata:
                  type: object
                  properties:
                    wandb.entity:
                      description: >-
                        태스크 또는 공급자를 소유하며 액세스 권한이 있는 entity입니다. 생략하면 키의 기본
                        entity를 사용합니다.
                      type: string
                      minLength: 1
                    wandb.thread_id:
                      description: 대화 및 고정 라우팅에 우선적으로 사용할 식별자.
                      type: string
                      minLength: 1
                    gen_ai.conversation.id:
                      description: '`wandb.thread_id`가 없을 때 사용하는 대화 식별자.'
                      type: string
                      minLength: 1
                    wandb.turn_index:
                      description: 재생 및 데이터셋 재구성 시 사용하는 신뢰할 수 있는 원본 턴 인덱스.
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    wandb.project:
                      description: '`project` 또는 `entity/project`. 공급자 직접 호출에 트레이싱을 활성화합니다.'
                      type: string
                    wandb.trace_surface:
                      description: 트레이싱이 활성화된 직접 호출에만 적용되는 트레이스 표시 영역 재정의.
                      type: string
                      enum:
                        - spans
                        - calls
                        - both
                    wandb.call_shadow:
                      description: >-
                        태스크 라우팅 span 로깅을 위한 Call 섀도 생성을 요청합니다. 추가하면 트레이스가 중복
                        저장됩니다.
                      type: boolean
                    user.id:
                      description: 트레이스에 연결된 최종 사용자 ID.
                      type: string
                      minLength: 1
                  additionalProperties: {}
                stream:
                  default: false
                  type: boolean
                temperature:
                  type: number
                tools:
                  type: array
                  items:
                    type: object
                    properties: {}
                    additionalProperties: {}
                tool_choice: {}
                response_format:
                  type: object
                  properties: {}
                  additionalProperties: {}
                reasoning_effort:
                  type: string
                max_tokens:
                  type: integer
                  minimum: 1
                  maximum: 9007199254740991
                max_completion_tokens:
                  type: integer
                  minimum: 1
                  maximum: 9007199254740991
              required:
                - model
                - messages
              additionalProperties: {}
      responses:
        '200':
          description: 공급자 응답입니다. 스트리밍 요청은 서버 전송 이벤트를 반환하며 `[DONE]`으로 종료됩니다.
          headers:
            x-proxy-request-id:
              description: 지원팀 문의 및 트레이스 연관 분석에 사용하는 요청 식별자.
              schema:
                type: string
                format: uuid
            wandb-cache-status:
              description: 정확히 일치하는 응답 캐시의 결과입니다. 요청에서 캐시 조회를 활성화한 경우에만 포함됩니다.
              schema:
                type: string
                enum:
                  - hit
                  - miss
            x-wandb-cache:
              deprecated: true
              description: '`wandb-cache-status`의 호환성 별칭.'
              schema:
                type: string
                enum:
                  - hit
                  - miss
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                  created:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  model:
                    type: string
                  choices:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        message:
                          type: object
                          properties: {}
                          additionalProperties: {}
                        finish_reason:
                          anyOf:
                            - type: string
                            - type: 'null'
                      additionalProperties: {}
                  usage:
                    type: object
                    properties: {}
                    additionalProperties: {}
                additionalProperties: {}
            text/event-stream:
              schema:
                type: string
        '400':
          $ref: '#/components/responses/ProxyError'
        '401':
          $ref: '#/components/responses/ProxyError'
        '403':
          $ref: '#/components/responses/ProxyError'
        '404':
          $ref: '#/components/responses/ProxyError'
        '500':
          $ref: '#/components/responses/ProxyError'
        '502':
          $ref: '#/components/responses/ProxyError'
components:
  responses:
    ProxyError:
      description: 프록시에서 생성한 오류입니다. 공급자에서 생성한 오류는 해당 공급자의 상태와 응답 본문을 그대로 유지합니다.
      headers:
        x-proxy-request-id:
          description: 지원 및 트레이스 연관 분석에 사용하는 요청 식별자.
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProxyError'
  schemas:
    ProxyError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              const: proxy_error
          required:
            - message
            - type
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    WandbApiKey:
      type: http
      scheme: bearer
      bearerFormat: W&B API key
      description: 개인/기본 entity 또는 소속 팀이 선택한 태스크와 공급자를 소유하고 있는 W&B API 키.

````