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

# Create a new fine-tuning job



## OpenAPI

````yaml post /v1/fine-tuning
openapi: 3.0.0
info:
  title: Fine-tuning Jobs API
  version: 1.0.0
  description: API for managing fine-tuning jobs for language models
servers: []
security: []
paths:
  /v1/fine-tuning:
    post:
      tags:
        - Fine-tuning Jobs
      summary: Create a new fine-tuning job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FineTuningJobCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJobResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    FineTuningJobCreate:
      type: object
      required:
        - base_model_name
        - dataset_name
        - parameters
        - name
        - type
      properties:
        base_model_name:
          type: string
        dataset_name:
          type: string
        parameters:
          type: object
          properties:
            batch_size:
              type: integer
              example: 8
            num_epochs:
              type: integer
              example: 3
            shuffle:
              type: boolean
              example: true
            lr:
              type: number
              format: float
              example: 0.0003
            seed:
              type: integer
              example: 42
          additionalProperties: true
        name:
          type: string
          description: The name of the fine-tuning job
        type:
          type: string
          enum:
            - LORA
            - QLORA
          description: The type of fine-tuning job to run
    FineTuningJobResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - NEW
            - QUEUED
            - RUNNING
            - COMPLETED
            - FAILED
            - STOPPING
            - STOPPED
        base_model_name:
          type: string
        dataset_name:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - LORA
            - QLORA
        current_step:
          type: integer
        total_steps:
          type: integer
        current_epoch:
          type: integer
        total_epochs:
          type: integer
        num_tokens:
          type: integer
          description: Number of tokens processed in the fine-tuning job
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
        message:
          type: string
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````