v1

latestOpenAPI 3.1.02026-07-2675394318.9 KB
fine-tuning

Create a fine-tuning job

Creates a job that fine-tunes a specified model based on a given dataset.

post/v1/fine_tuning/jobs

Query parameters

ai_project_idstring nullable

Project ID to list fine tuning jobs

Project ID to list fine tuning jobs

Request body

modelstring required

The name of the model to fine-tune

training_filestring required

The ID of the uploaded training data file

validation_filestring nullable

The ID of the uploaded validation data file

seedinteger nullable

The seed controls the reproducibility of the job

suffixstring nullable

The suffix that will be used for output model name

tagsstring[] nullable

List of tags to associate with the job

extra_bodyobject nullable

Extra params to pass to the fine-tuning job

Example request

{
  "model": "meta-llama/Llama-3.1-70B-Instruct",
  "training_file": "file_123456",
  "validation_file": "file_123456",
  "seed": 42
}

Response

Successful Response

idstring required
created_atinteger required
finished_atinteger nullable
modelstring required
object'fine_tuning.job'
organization_idstring
result_filesstring[]
seedinteger
suffixstring nullable
status'validating_files' | 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' required
trained_tokensinteger nullable
training_filestring required
validation_filestring nullable
estimated_finishinteger nullable
trained_stepsinteger nullable
total_stepsinteger nullable

Example response

{
  "error": {
    "status": 500
  }
}