---
title: "Creates a job that fine-tunes a specified model from a given training file.
Response includes details of the enqueued job including job status and hyper parameters.
The name of the fine-tuned model is added to the response once complete."
method: POST
path: "/fine_tuning/jobs"
tags: ["Fine-tuning:"]
---

# Creates a job that fine-tunes a specified model from a given training file.
Response includes details of the enqueued job including job status and hyper parameters.
The name of the fine-tuned model is added to the response once complete.

`POST /fine_tuning/jobs`

## Query parameters

- `api-version` string, required

## Request body

- FineTuningJobCreation — Defines the values of a fine tune job.
  - `model` string, required — The identifier (model-id) of the base model used for this fine-tune.
  - `training_file` string, required — The file identity (file-id) that is used for training this fine tuned model.
  - `validation_file` string — The file identity (file-id) that is used to evaluate the fine tuned model during training.
  - `hyperparameters` FineTuningHyperParameters — The hyper parameter settings used in a fine tune job.
    - `n_epochs` integer — The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
    - `batch_size` integer — The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass. In general, we've found that larger batch sizes tend to work better for larger datasets. The default value as well as the maximum value for this property are specific to a base model.
    - `learning_rate_multiplier` number, double — The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pre-training multiplied by this value. Larger learning rates tend to perform better with larger batch sizes. We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.
  - `suffix` string — The suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name.
  - `seed` integer — The seed used for the finetuning job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you.
  - `integrations` WandBIntegrationRequestWrapper[] — A list configurations for integrations supporting the fine-tuning job. There are many integrations planned, so make sure to check and act on the integration type.
    - `type` 'wandb', required — List of Fine Tune integrations available.
    - `wandb` WandBIntegrationRequest, required
      - `project` string, required
      - `name` string
      - `entity` string
      - `tags` string[]
  - `method` SupervisedMethodRequest
    - `type` 'dpo' | 'supervised', required

## Response `201`

The fine tune has been successfully created.

- FineTuningJob — Defines the values of a fine tune job.
  - `object` 'list' | 'fine_tuning.job' | 'file' | 'fine_tuning.job.event' | 'fine_tuning.job.checkpoint' | 'model' | 'upload' | 'upload.part' | 'batch' | 'wandb' — Defines the type of an object.
  - `created_at` integer — A timestamp when this job or item was created (in unix epochs).
  - `id` string — The identity of this item.
  - `status` 'created' | 'pending' | 'running' | 'pausing' | 'paused' | 'resuming' | 'succeeded' | 'cancelled' | 'failed' — The state of a finetunes object or fine tuning job.
  - `model` string, required — The identifier (model-id) of the base model used for the fine-tune.
  - `fine_tuned_model` string — The identifier (model-id) of the resulting fine tuned model. This property is only populated for successfully completed fine-tune runs. Use this identifier to create a deployment for inferencing.
  - `training_file` string, required — The file which is used for training.
  - `validation_file` string — The file which is used to evaluate the fine tuned model during training.
  - `result_files` string[] — The result file identities (file-id) containing training and evaluation metrics in csv format. The file is only available for successfully completed fine-tune runs.
  - `finished_at` integer — A timestamp when this job or item has finished successfully (in unix epochs).
  - `organisation_id` string — The organisation id of this fine tune job. Unused on Azure OpenAI; compatibility for OpenAI only.
  - `trained_tokens` integer — The total number of billable tokens processed by this fine tuning job.
  - `error` FineTuningJobError — For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.
    - `code` string — The machine-readable error code..
    - `message` string — The human-readable error message.
    - `param` string — The parameter that was invalid, usually training_file or validation_file. This field will be null if the failure was not parameter-specific.
  - `estimated_finish` integer — The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.
  - `hyperparameters` FineTuningHyperParameters — The hyper parameter settings used in a fine tune job.
    - `n_epochs` integer — The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
    - `batch_size` integer — The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass. In general, we've found that larger batch sizes tend to work better for larger datasets. The default value as well as the maximum value for this property are specific to a base model.
    - `learning_rate_multiplier` number, double — The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pre-training multiplied by this value. Larger learning rates tend to perform better with larger batch sizes. We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.
  - `suffix` string — The suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name.
  - `seed` integer — The seed used for the finetuning job.
  - `integrations` WandBIntegrationRequestWrapper[] — A list configurations for integrations supporting the fine-tuning job. There are many integrations planned, so make sure to check and act on the integration type.
    - `type` 'wandb', required — List of Fine Tune integrations available.
    - `wandb` WandBIntegrationRequest, required
      - `project` string, required
      - `name` string
      - `entity` string
      - `tags` string[]
  - `method` SupervisedMethod
    - `type` 'dpo' | 'supervised', required

## Other responses

- `default` — An error occurred.

---

[API](https://skmtc.net/azure/apis/cognitiveservices-azureopenai-authoring.md) · [All operations](https://skmtc.net/azure/apis/cognitiveservices-azureopenai-authoring/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/cognitiveservices-azureopenai-authoring/revisions/b177dc430e39/schema)
