POST
/
fine_tunes
/
create_finetune
curl --request POST \
  --url https://api.getflex.ai/v1/fine_tunes/create_finetune \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "model": "<string>",
  "dataset_id": "<string>",
  "n_epochs": 123,
  "train_with_lora": true,
  "batch_size": 123,
  "wandb_key": "<string>",
  "learning_rate": 123,
  "n_checkpoints_and_evaluations_per_epoch": 1,
  "save_only_best_checkpoint": false,
  "lora_config": {},
  "early_stopping_config": {}
}'
{
  "id": "<string>",
  "config": {},
  "user_id": "<string>",
  "model_id": "<string>",
  "name": "<string>",
  "checkpoints_count": 123,
  "total_steps": 123,
  "dataset_id": "<string>",
  "engine_data": {
    "runpod_run_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required
model
string
required
dataset_id
string
required
n_epochs
integer
required
train_with_lora
boolean
required
batch_size
integer
wandb_key
string
learning_rate
number
n_checkpoints_and_evaluations_per_epoch
integer
default:1
save_only_best_checkpoint
boolean
default:false
lora_config
object
early_stopping_config
object

Response

200
application/json
Successful response
id
string
config
object
user_id
string
model_id
string
name
string
checkpoints_count
integer
total_steps
integer
dataset_id
string
engine_data
object