> ## 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 fine-tune



## OpenAPI

````yaml /openapi/model-distillation/management.openapi.yaml post /tasks/{alias}/finetunes
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:
  /tasks/{alias}/finetunes:
    parameters:
      - $ref: '#/components/parameters/WandbEntity'
      - $ref: '#/components/parameters/TaskAlias'
    post:
      tags:
        - Fine-tunes
      summary: Create a fine-tune
      operationId: createFinetune
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                dataset_id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                relabel_run_id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                model_name:
                  type: string
                base_model:
                  type: string
                  minLength: 1
                default_temperature:
                  type: number
                  minimum: 0
                  maximum: 2
                  default: 0
                model_config:
                  type: object
                  properties:
                    max_examples:
                      type: integer
                      exclusiveMinimum: 0
                      maximum: 9007199254740991
                    config:
                      type: object
                      properties:
                        batch_size:
                          anyOf:
                            - type: string
                              const: auto
                            - type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                        learning_rate:
                          anyOf:
                            - type: number
                              exclusiveMinimum: 0
                            - type: array
                              minItems: 1
                              items:
                                type: number
                                minimum: 0
                        assistant_turns:
                          type: string
                          enum:
                            - all
                            - last
                        metric_logging:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties: {}
                      additionalProperties: false
                    experimental_config:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties: {}
                  additionalProperties: false
              required:
                - dataset_id
                - model_name
                - base_model
              additionalProperties: false
      responses:
        '202':
          description: Training was queued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Finetune'
        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
    TaskAlias:
      name: alias
      in: path
      required: true
      schema:
        type: string
        pattern: ^[a-z0-9-]{1,64}$
  schemas:
    Finetune:
      type: object
      additionalProperties: true
      required:
        - id
        - task_id
        - dataset_id
        - model_name
        - base_model
        - default_temperature
        - status
        - training_progress
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        task_id:
          type: string
          format: uuid
        dataset_id:
          type: string
          format: uuid
        relabel_run_id:
          type:
            - string
            - 'null'
          format: uuid
        model_name:
          type: string
        base_model:
          type: string
        model_config:
          oneOf:
            - $ref: '#/components/schemas/FinetuneModelConfig'
            - type: 'null'
        default_temperature:
          type: number
          minimum: 0
          maximum: 2
          default: 0
        status:
          type: string
          enum:
            - queued
            - training
            - deployed
            - failed
        training_progress:
          type: number
          minimum: 0
          maximum: 100
        dataset_artifact_ref:
          type:
            - string
            - 'null'
        model_artifact_ref:
          type:
            - string
            - 'null'
        input_usd_per_mtok:
          type:
            - number
            - 'null'
        output_usd_per_mtok:
          type:
            - number
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    FinetuneModelConfig:
      type: object
      additionalProperties: false
      properties:
        max_examples:
          type: integer
          minimum: 1
        config:
          type: object
          additionalProperties: false
          properties:
            batch_size:
              oneOf:
                - type: string
                  const: auto
                - type: integer
                  minimum: 1
            learning_rate:
              oneOf:
                - type: number
                  exclusiveMinimum: 0
                - type: array
                  minItems: 1
                  items:
                    type: number
                    minimum: 0
            assistant_turns:
              type: string
              enum:
                - all
                - last
            metric_logging:
              $ref: '#/components/schemas/JsonObject'
        experimental_config:
          $ref: '#/components/schemas/JsonObject'
    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
    JsonObject:
      type: object
      additionalProperties: true
  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.

````