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

# Create job

> Use a model to create a fine-tuning job.



## OpenAPI

````yaml together-openapi.yaml post /fine-tunes
openapi: 3.0.0
info:
  title: Together API
  description: The Together REST API. Please see https://docs.together.ai for more details.
  version: 2.0.0
  termsOfService: https://www.together.ai/terms-of-service
  contact:
    name: Together Support
    url: https://www.together.ai/contact
  license:
    name: MIT
    url: https://github.com/togethercomputer/openapi/blob/main/LICENSE
servers:
  - url: https://api.together.xyz/v1
security:
  - bearerAuth: []
paths:
  /fine-tunes:
    post:
      tags:
        - Fine-tuning
      summary: Create job
      description: Use a model to create a fine-tuning job.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - training_file
                - model
              properties:
                training_file:
                  type: string
                  description: File-ID of a file uploaded to the Together API
                model:
                  type: string
                  description: Name of the base model to run fine-tune job on
                n_epochs:
                  type: integer
                  default: 1
                  description: Number of epochs for fine-tuning
                n_checkpoints:
                  type: integer
                  default: 1
                  description: Number of checkpoints to save during fine-tuning
                batch_size:
                  type: integer
                  default: 32
                  description: Batch size for fine-tuning
                learning_rate:
                  type: number
                  format: float
                  default: 0.00001
                  description: Learning rate multiplier to use for training
                suffix:
                  type: string
                  description: Suffix that will be added to your fine-tuned model name
                wandb_api_key:
                  type: string
                  description: API key for Weights & Biases integration
      responses:
        '200':
          description: Fine-tuning job initiated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinetuneResponse'
components:
  schemas:
    FinetuneResponse:
      type: object
      required:
        - id
        - status
      properties:
        id:
          type: string
          format: uuid
        training_file:
          type: string
        validation_file:
          type: string
        model:
          type: string
        model_output_name:
          type: string
        model_output_path:
          type: string
        TrainingFileNumLines:
          type: integer
        TrainingFileSize:
          type: integer
        created_at:
          type: string
        updated_at:
          type: string
        n_epochs:
          type: integer
        n_checkpoints:
          type: integer
        batch_size:
          type: integer
        learning_rate:
          type: number
        eval_steps:
          type: integer
        lora:
          type: boolean
        lora_r:
          type: integer
        lora_alpha:
          type: integer
        lora_dropout:
          type: integer
        status:
          $ref: '#/components/schemas/FinetuneJobStatus'
        job_id:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/FinetuneEvent'
        token_count:
          type: integer
        param_count:
          type: integer
        total_price:
          type: integer
        epochs_completed:
          type: integer
        queue_depth:
          type: integer
        wandb_project_name:
          type: string
        wandb_url:
          type: string
    FinetuneJobStatus:
      type: string
      enum:
        - pending
        - queued
        - running
        - compressing
        - uploading
        - cancel_requested
        - cancelled
        - error
        - completed
    FinetuneEvent:
      type: object
      properties:
        object:
          type: string
          enum:
            - FinetuneEvent
        created_at:
          type: string
        level:
          $ref: '#/components/schemas/FinetuneEventLevels'
        message:
          type: string
        type:
          $ref: '#/components/schemas/FinetuneEventType'
        param_count:
          type: integer
        token_count:
          type: integer
        wandb_url:
          type: string
        hash:
          type: string
    FinetuneEventLevels:
      type: string
      enum:
        - null
        - info
        - warning
        - error
        - legacy_info
        - legacy_iwarning
        - legacy_ierror
    FinetuneEventType:
      type: string
      enum:
        - job_pending
        - job_start
        - job_stopped
        - model_downloading
        - model_download_complete
        - training_data_downloading
        - training_data_download_complete
        - validation_data_downloading
        - validation_data_download_complete
        - wandb_init
        - training_start
        - checkpoint_save
        - billing_limit
        - epoch_complete
        - training_complete
        - model_compressing
        - model_compression_complete
        - model_uploading
        - model_upload_complete
        - job_complete
        - job_error
        - cancel_requested
        - job_restarted
        - refund
        - warning
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: default

````