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

# Create a routed chat completion

> Send a standard Chat Completions request. `model` accepts a task alias,
a version pin such as `alias@v2`, or a direct registered-provider
reference such as `openai/gpt-5.6-sol`. Task requests are traced automatically.




## OpenAPI

````yaml /openapi/model-distillation/proxy.openapi.yaml post /chat/completions
openapi: 3.1.0
info:
  title: Model Distillation Inference Proxy
  version: 1.0.0
  description: >
    OpenAI-compatible Chat Completions with W&B authentication, task routing,

    provider credentials, parameter overrides, sticky traffic, and
    training-grade traces.
servers:
  - url: https://proxy.training.wandb.ai/v1
    description: Production
security:
  - WandbApiKey: []
tags:
  - name: Chat Completions
paths:
  /chat/completions:
    post:
      tags:
        - Chat Completions
      summary: Create a routed chat completion
      description: >
        Send a standard Chat Completions request. `model` accepts a task alias,

        a version pin such as `alias@v2`, or a direct registered-provider

        reference such as `openai/gpt-5.6-sol`. Task requests are traced
        automatically.
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            examples:
              task:
                summary: Task-routed request
                value:
                  model: ticket-classifier
                  messages:
                    - role: user
                      content: Classify this support request.
                  metadata:
                    wandb.entity: your-team
                    wandb.thread_id: conversation-4827
              direct:
                summary: Direct provider request
                value:
                  model: openai/gpt-5.6-sol
                  messages:
                    - role: user
                      content: Say hello.
            schema:
              type: object
              properties:
                model:
                  type: string
                  minLength: 1
                  description: Task alias, `alias@vN`, or `{provider}/{model-id}`.
                messages:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        enum:
                          - developer
                          - system
                          - user
                          - assistant
                          - tool
                          - function
                      content:
                        description: >-
                          Text, multimodal content parts, or null where allowed
                          by the role.
                      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: >-
                        Accessible entity that owns the task or provider. Omit
                        to use the key's default entity.
                      type: string
                      minLength: 1
                    wandb.thread_id:
                      description: Preferred conversation and sticky-routing identifier.
                      type: string
                      minLength: 1
                    gen_ai.conversation.id:
                      description: >-
                        Conversation identifier used when `wandb.thread_id` is
                        absent.
                      type: string
                      minLength: 1
                    wandb.turn_index:
                      description: >-
                        Trusted source turn index used during replay and dataset
                        reconstruction.
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    wandb.project:
                      description: >-
                        `project` or `entity/project`; opts a direct provider
                        call into tracing.
                      type: string
                    wandb.trace_surface:
                      description: Trace-surface override for an opted-in direct call only.
                      type: string
                      enum:
                        - spans
                        - calls
                        - both
                    user.id:
                      description: End-user identity attached to the trace.
                      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: >-
            Provider response. Streaming requests return server-sent events and
            end with `[DONE]`.
          headers:
            x-proxy-request-id:
              description: Request identifier for support and trace correlation.
              schema:
                type: string
                format: uuid
          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: >-
        Proxy-generated error. A provider-generated error retains the provider's
        status and response body.
      headers:
        x-proxy-request-id:
          description: Request identifier for support and trace correlation.
          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: >-
        W&B API key whose personal/default entity or teams own the selected task
        and providers.

````