> ## 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 or rotate a provider

> For recognized providers, sends a minimal test request using the first catalog model before storing the encrypted credential. Then publishes remote provider material unless `local_only` is true. Returns 202 while publication is pending.



## OpenAPI

````yaml /openapi/model-distillation/management.openapi.yaml put /providers/{provider}
openapi: 3.1.0
info:
  title: Model Distillation Management API
  version: 1.0.0
  description: |
    Manage providers, tasks, routing versions, datasets, relabeling, fine-tunes,
    evaluations, analytics, and closed-loop training Automation. This is the
    same API used by Model Distillation Studio.
servers:
  - url: https://distillation.training.wandb.ai/v1
    description: Production
security:
  - WandbApiKey: []
tags:
  - name: Providers
    description: OpenAI-compatible endpoints, credentials, model catalogs, and pricing.
  - name: Tasks
    description: Stable task identity and task-level information.
  - name: Routing
    description: Versioned model targets, weights, and request parameters.
  - name: Datasets
    description: >-
      Reproducible data snapshots, entries, relabeling, and reusable model
      outputs.
  - name: Fine-tunes
    description: Supervised fine-tuning jobs and hosted model artifacts.
  - name: Evaluations
    description: Head-to-head, exact-match, and categorization evaluations.
  - name: Automation
    description: Closed-loop dataset, sweep, evaluation, and promotion runs.
  - name: Analytics
    description: Task traffic, token, error, and estimated-cost read models.
  - name: Studio preferences
    description: Per-task display preferences used by Studio.
paths:
  /providers/{provider}:
    parameters:
      - $ref: '#/components/parameters/WandbEntity'
      - $ref: '#/components/parameters/ProviderName'
    put:
      tags:
        - Providers
      summary: Create or rotate a provider
      description: >-
        For recognized providers, sends a minimal test request using the first
        catalog model before storing the encrypted credential. Then publishes
        remote provider material unless `local_only` is true. Returns 202 while
        publication is pending.
      operationId: putProvider
      requestBody:
        required: true
        content:
          application/json:
            example:
              base_url: https://api.openai.com/v1
              api_key: sk-example
            schema:
              type: object
              properties:
                base_url:
                  type: string
                  format: uri
                api_key:
                  type: string
                  minLength: 1
                local_only:
                  type: boolean
                  default: false
              required:
                - base_url
                - api_key
              additionalProperties: false
      responses:
        '200':
          description: Provider is already applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Provider'
        '202':
          description: Provider was stored and publication is pending.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Provider'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    WandbEntity:
      name: Wandb-Entity
      in: header
      required: false
      description: >-
        Accessible personal or team entity. Omit to use the API key's default
        entity.
      schema:
        type: string
    ProviderName:
      name: provider
      in: path
      required: true
      schema:
        type: string
        pattern: ^[a-z0-9][a-z0-9_-]{0,63}$
  schemas:
    Provider:
      type: object
      required:
        - name
        - entity
        - base_url
        - credential_mode
        - masked_key
        - local_only
        - revision
        - deployments
        - models
      properties:
        name:
          type: string
        entity:
          type: string
        base_url:
          type: string
          format: uri
        credential_mode:
          type: string
          enum:
            - stored
            - passthrough
        masked_key:
          type: string
        local_only:
          type: boolean
        revision:
          type: integer
        deployments:
          type: array
          items:
            $ref: '#/components/schemas/Deployment'
        models:
          type: array
          items:
            $ref: '#/components/schemas/ProviderModel'
    Deployment:
      type: object
      required:
        - proxy_backend
        - status
      additionalProperties: true
      properties:
        proxy_backend:
          type: string
        status:
          type: string
          enum:
            - pending
            - applying
            - applied
            - failed
        applied_revision:
          type: integer
          nullable: true
        external_ref:
          type: string
          nullable: true
        last_error:
          type: string
          nullable: true
    ProviderModel:
      type: object
      required:
        - id
        - model
        - predefined
        - enabled
      properties:
        id:
          type: string
          format: uuid
        model:
          type: string
        predefined:
          type: boolean
        enabled:
          type: boolean
        input_usd_per_mtok:
          type:
            - number
            - 'null'
        output_usd_per_mtok:
          type:
            - number
            - 'null'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
            type:
              type: string
      example:
        error:
          message: Task 'missing' not found in entity 'your-team'
          type: not_found
  responses:
    Error:
      description: Request failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    WandbApiKey:
      type: http
      scheme: bearer
      bearerFormat: W&B API key
      description: A personal or service-account W&B API key.

````