---
title: "Create a new fine-tuning job"
method: POST
path: "/v1/fine-tuning"
tags: ["Fine-tuning Jobs"]
---

# Create a new fine-tuning job

`POST /v1/fine-tuning`

## Request

- The document declares no server URL.
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/luminolabs/apis/fine-tuning-jobs-api/docs/v1/fine-tuning/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- FineTuningJobCreate
  - `base_model_name` string, required
  - `dataset_name` string, required
  - `parameters` object, required
    - `batch_size` integer
    - `num_epochs` integer
    - `shuffle` boolean
    - `lr` number, float
    - `seed` integer
  - `name` string, required: The name of the fine-tuning job
  - `type` 'LORA' | 'QLORA', required: The type of fine-tuning job to run

## Response `201`

Created

- FineTuningJobResponse
  - `id` string, uuid
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `status` 'NEW' | 'QUEUED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'STOPPING' | 'STOPPED'
  - `base_model_name` string
  - `dataset_name` string
  - `name` string
  - `type` 'LORA' | 'QLORA'
  - `current_step` integer
  - `total_steps` integer
  - `current_epoch` integer
  - `total_epochs` integer
  - `num_tokens` integer: Number of tokens processed in the fine-tuning job

## Other responses

- `400`: Bad request
- `401`: Unauthorized

## Changes

- **2025-02-08** `8fc931edaed6`: 1 breaking, 1 info
  - removed the enum value `FULL` of the request property `type`
  - removed the `FULL` enum value from the `type` response property for the response status `201`
- **2024-10-01** `4dd3016ac5cf`: 1 breaking, 2 warning, 6 info
  - added the new required request property `type`
  - removed the request property `parameters/learning_rate`
  - added the new `QUEUED` enum value to the `status` response property for the response status `201`
  - added the new optional request property `parameters/batch_size`
  - …5 more

[Operation history](https://skmtc.dev/luminolabs/apis/fine-tuning-jobs-api/changes/v1/fine-tuning/post.md)

---

[API](https://skmtc.dev/luminolabs/apis/fine-tuning-jobs-api.md) - [All operations](https://skmtc.dev/luminolabs/apis/fine-tuning-jobs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/luminolabs/apis/fine-tuning-jobs-api/revisions/8fc931edaed6?raw)
