Skip to main content

Create a fine tuning job

POST 
/ai/fine_tuning/jobs

Create a new fine tuning job.

Request

Body

required

    model stringrequired

    The base model that is being fine-tuned.

    training_file stringrequired

    The storage bucket or object used for training.

    suffix string

    Optional suffix to append to the fine tuned model's name.

    hyperparameters

    object

    The hyperparameters used for the fine-tuning job.

    n_epochs integer

    Possible values: >= 1 and <= 10

    Default value: 3

    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.

    The hyperparameters used for the fine-tuning job.

Responses

200: Successful Response

422: Validation Error

Request samples


curl -L 'https://api.telnyx.com/v2/ai/fine_tuning/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"model": "string",
"training_file": "string",
"suffix": "string",
"hyperparameters": {
"n_epochs": 3
}
}'

Response samples


{
"id": "string",
"created_at": 0,
"finished_at": 0,
"hyperparameters": {
"n_epochs": 3
},
"model": "string",
"organization_id": "string",
"status": "queued",
"trained_tokens": 0,
"training_file": "string"
}