---
title: "Create a fine tuning job"
method: POST
path: "/ai/fine_tuning/jobs"
tags: ["Fine Tuning"]
---

# Create a fine tuning job

`POST /ai/fine_tuning/jobs`

Creates a new fine-tuning job that trains a model on the provided dataset, and returns the created job.

## Request body

- CreateFineTuningJobRequest
  - `hyperparameters` object — The hyperparameters used for the fine-tuning job.
    - `n_epochs` integer — The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. 'auto' decides the optimal number of epochs based on the size of the dataset. If setting the number manually, we support any number between 1 and 50 epochs.
  - `model` string, required — The base model that is being fine-tuned.
  - `suffix` string — Optional suffix to append to the fine tuned model's name.
  - `training_file` string, required — The storage bucket or object used for training.

## Response `200`

Successful Response

- FineTuningJob — The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.
  - `created_at` integer, required — The Unix timestamp (in seconds) for when the fine-tuning job was created.
  - `finished_at` integer, nullable, required — The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
  - `hyperparameters` object, required — The hyperparameters used for the fine-tuning job.
    - `n_epochs` integer, required — The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
  - `id` string, required — The name of the fine-tuned model that is being created.
  - `model` string, required — The base model that is being fine-tuned.
  - `organization_id` string, required — The organization that owns the fine-tuning job.
  - `status` 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled', required — The current status of the fine-tuning job.
  - `trained_tokens` integer, nullable, required — The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
  - `training_file` string, required — The storage bucket or object used for training.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/revisions/ec31f78cf002/schema)
