POST
/
v1
/
fine_tuning
/
jobs
Create a fine-tuning job
curl --request POST \
  --url https://api.studio.nebius.com/v1/fine_tuning/jobs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "meta-llama/Llama-3.1-70B-Instruct",
  "training_file": "file_123456",
  "validation_file": "file_123456",
  "hyperparameters": {
    "batch_size": 8,
    "learning_rate": 0.00001,
    "n_epochs": 3,
    "warmup_ratio": 0,
    "weight_decay": 0,
    "lora": false,
    "lora_r": 8,
    "lora_alpha": 8,
    "lora_dropout": 0,
    "packing": true,
    "max_grad_norm": 1,
    "context_length": 8192
  },
  "integrations": [
    {
      "type": "<string>",
      "wandb": {
        "project": "<string>",
        "name": "<string>",
        "entity": "<string>",
        "tags": [
          "<string>"
        ],
        "api_key": "<string>"
      }
    }
  ],
  "seed": 42,
  "tags": "my-ft-job",
  "extra_body": {}
}'
{
  "id": "<string>",
  "created_at": 123,
  "error": {
    "code": "<string>",
    "message": "<string>",
    "param": "<string>"
  },
  "finished_at": 123,
  "hyperparameters": {
    "batch_size": 8,
    "learning_rate": 0.00001,
    "n_epochs": 3,
    "warmup_ratio": 0,
    "weight_decay": 0,
    "lora": false,
    "lora_r": 8,
    "lora_alpha": 8,
    "lora_dropout": 0,
    "packing": true,
    "max_grad_norm": 1,
    "context_length": 8192
  },
  "integrations": [
    {
      "type": "<string>",
      "wandb": {
        "project": "<string>",
        "name": "<string>",
        "entity": "<string>",
        "tags": [
          "<string>"
        ]
      }
    }
  ],
  "model": "<string>",
  "object": "fine_tuning.job",
  "organization_id": "",
  "result_files": [],
  "seed": 0,
  "suffix": "<string>",
  "status": "validating_files",
  "trained_tokens": 123,
  "training_file": "<string>",
  "validation_file": "<string>",
  "estimated_finish": 123,
  "trained_steps": 123,
  "total_steps": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required

The name of the model to fine-tune

Examples:

"meta-llama/Llama-3.1-70B-Instruct"

"meta-llama/Llama-3.1-70B"

"meta-llama/Llama-3.1-8B-Instruct"

"meta-llama/Llama-3.1-8B"

training_file
string
required

The ID of the uploaded training data file

Examples:

"file_123456"

validation_file
string | null

The ID of the uploaded validation data file

Examples:

"file_123456"

hyperparameters
object | null

Training hyperparameters

integrations
Integrations · array

Job integration paramaters

seed
integer | null

The seed controls the reproducibility of the job

Examples:

42

tags
string[] | null

List of tags to associate with the job

Examples:

"my-ft-job"

extra_body
object | null

Extra params to pass to the fine-tuning job

Response

Successful Response

id
string
required
created_at
integer
required
hyperparameters
object
required
model
string
required
status
enum<string>
required
Available options:
validating_files,
queued,
running,
succeeded,
failed,
cancelled
training_file
string
required
error
object | null
finished_at
integer | null
integrations
Integrations · array
object
enum<string>
default:fine_tuning.job
Available options:
TitleConst
Objectfine_tuning.job
organization_id
string
default:""
result_files
string[]
seed
integer
default:0
suffix
string | null
Maximum length: 64
trained_tokens
integer | null
validation_file
string | null
estimated_finish
integer | null
trained_steps
integer | null
total_steps
integer | null