v3

OpenAPI 3.1.0MIT2026-07-31192456807.8 KB
Fine-tuning

Cancel job

Cancel a currently running fine-tuning job. Returns a FinetuneResponseTruncated object.

post/fine-tunes/{id}/cancel

Path parameters

idstring required

Fine-tune ID to cancel. A string that starts with ft-.

Response

Successfully cancelled the fine-tuning job.

idstring required

Unique identifier for the fine-tune job

status'pending' | 'queued' | 'running' | 'compressing' | 'uploading' | 'cancel_requested' | 'cancelled' | 'error' | 'completed' required
created_atstring date-time required

Creation timestamp of the fine-tune job

updated_atstring date-time required

Last update timestamp of the fine-tune job

started_atstring date-time

Start timestamp of the current stage of the fine-tune job

user_idstring required

ID of the user who created the fine-tune job.

owner_addressstring

Owner address information

total_priceinteger

Total price for the fine-tuning job

token_countinteger

Count of tokens processed

training_filestring

File-ID of the training file

validation_filestring

File-ID of the validation file

packingboolean

Whether sequence packing is being used for training.

max_seq_lengthinteger

Maximum sequence length to use for training. If not specified, uses the maximum allowed for the model and training method.

modelstring

Base model used for fine-tuning

model_output_namestring
suffixstring

Suffix added to the fine-tuned model name

n_epochsinteger

Number of training epochs

n_evalsinteger

Number of evaluations during training

n_checkpointsinteger

Number of checkpoints saved during training

batch_sizeinteger

Batch size used for training

learning_ratenumber

Learning rate used for training

warmup_rationumber

Ratio of warmup steps

max_grad_normnumber

Maximum gradient norm for clipping

weight_decaynumber

Weight decay value used

random_seedinteger nullable

Random seed used for training. Integer when set; null if not stored (e.g. legacy jobs) or no explicit seed was recorded.

wandb_project_namestring

Weights & Biases project name

wandb_namestring

Weights & Biases run name

from_checkpointstring

Checkpoint used to continue training

from_hf_modelstring

Hugging Face Hub repo to start training from

hf_model_revisionstring

The revision of the Hugging Face Hub model to continue training from

early_stoppedboolean

Whether the early-stopping criterion triggered.

early_stopping_best_stepinteger

Step associated with the selected early-stopping artifact. When early_stopping_best_metric is null, no finite best metric was recorded; this is the halt step, not a best-checkpoint step.

early_stopping_best_metricnumber nullable

Best validation loss observed, corresponding to early_stopping_best_step. Null if no improving evaluation was recorded.

Example response

{
  "id": "ft-01234567890123456789",
  "status": "completed",
  "created_at": "2023-05-17T17:35:45.123Z",
  "updated_at": "2023-05-17T18:46:23.456Z",
  "user_id": "user_789xyz012",
  "owner_address": "user@example.com",
  "total_price": 1500,
  "token_count": 850000,
  "events": [],
  "model": "meta-llama/Llama-2-7b-hf",
  "model_output_name": "mynamespace/meta-llama/Llama-2-7b-hf-32162631",
  "n_epochs": 3,
  "training_file": "file-01234567890123456789",
  "wandb_project_name": "my-finetune-project"
}