---
title: "Cancel job"
method: POST
path: "/v1/fine-tunes/{id}/cancel"
tags: ["Fine-tuning"]
---

# Cancel job

`POST /v1/fine-tunes/{id}/cancel`

## Request

- Base URL: `https://api.together.ai`
- URL: `https://api.together.ai/v1/fine-tunes/{id}/cancel`
- Auth: HTTP bearer

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

## Path parameters

- `id` string, required: Fine-tune ID to cancel. A string that starts with `ft-`.

## Response `200`

Successfully cancelled the fine-tuning job.

- FinetuneResponseTruncated: A truncated version of the fine-tune response, used for POST /fine-tunes, GET /fine-tunes and POST /fine-tunes/{id}/cancel endpoints
  - `id` string, required: Unique identifier for the fine-tune job
  - `status` 'pending' | 'queued' | 'running' | 'compressing' | 'uploading' | 'cancel_requested' | 'cancelled' | 'error' | 'completed', required
  - `created_at` string, date-time, required: Creation timestamp of the fine-tune job
  - `updated_at` string, date-time, required: Last update timestamp of the fine-tune job
  - `started_at` string, date-time: Start timestamp of the current stage of the fine-tune job
  - `user_id` string, required: ID of the user who created the fine-tune job.
  - `owner_address` string: Owner address information
  - `total_price` integer: Total price for the fine-tuning job
  - `token_count` integer: Count of tokens processed
  - `events` FineTuneEvent[]: Events related to this fine-tune job
    - `object` 'fine-tune-event', required: The object type, which is always `fine-tune-event`.
    - `created_at` string, required
    - `level` string
    - `message` string, required
    - `type` 'job_pending' | 'job_start' | 'job_stopped' | 'model_downloading' | 'model_download_complete' | 'training_data_downloading' | 'training_data_download_complete' | 'validation_data_downloading' | 'validation_data_download_complete' | 'wandb_init' | 'training_start' | 'checkpoint_save' | 'billing_limit' | 'epoch_complete' | 'training_complete' | 'model_compressing' | 'model_compression_complete' | 'model_uploading' | 'model_upload_complete' | 'job_complete' | 'job_error' | 'cancel_requested' | 'job_restarted' | 'refund' | 'warning' | 'early_stopped' | 'tokenized_dataset_upload_complete', required
    - `param_count` integer
    - `token_count` integer
    - `total_steps` integer
    - `wandb_url` string
    - `step` integer
    - `checkpoint_path` string
    - `model_path` string
    - `tokenized_dataset_path` string: Storage path for the tokenized dataset archive associated with this event.
    - `early_stopping_best_step` integer, nullable: For early_stopped events, the selected best-checkpoint step when a finite best metric exists. If early_stopping_best_metric_value is null, this is the halt step.
    - `early_stopping_best_metric_value` number, nullable: For early_stopped events, the best validation loss observed. Null if no improving evaluation was recorded.
  - `training_file` string: File-ID of the training file
  - `validation_file` string: File-ID of the validation file
  - `packing` boolean: Whether sequence packing is being used for training.
  - `max_seq_length` integer: Maximum sequence length to use for training. If not specified, uses the maximum allowed for the model and training method.
  - `model` string: Base model used for fine-tuning
  - `model_output_name` string
  - `suffix` string: Suffix added to the fine-tuned model name
  - `n_epochs` integer: Number of training epochs
  - `n_evals` integer: Number of evaluations during training
  - `n_checkpoints` integer: Number of checkpoints saved during training
  - `batch_size` integer: Batch size used for training
  - `training_type` union: Type of training used (full or LoRA)
    - FullTrainingType
      - `type` 'Full', required
    - LoRATrainingType: LoRA training configuration for a fine-tuning job.
      - `type` 'Lora', required: Identifies this request as a LoRA fine-tune.
      - `lora_r` integer, required: Rank of the LoRA adapter matrices.
      - `lora_alpha` integer, required: Scaling factor applied to the LoRA adapter weights.
      - `lora_dropout` number: Dropout probability applied to LoRA adapter inputs.
      - `lora_trainable_modules` string: Comma-separated LoRA target modules. Use `all-linear` for model defaults; MoE expert modules (`w_up`, `w_gate`, `w_down`) can be combined with attention modules on compatible models. Fine-tuning jobs that target expert modules produce adapter-only output unless the selected model supports merged expert LoRA output.
  - `training_method` union: Method of training used
    - TrainingMethodSFT
      - `method` 'sft', required
      - `train_on_inputs` boolean, required: Whether to mask user messages in conversational data or prompts in instruction data.
    - TrainingMethodDPO
      - `method` 'dpo', required
      - `dpo_beta` number
      - `rpo_alpha` number
      - `dpo_normalize_logratios_by_length` boolean
      - `dpo_reference_free` boolean
      - `simpo_gamma` number
  - `learning_rate` number: Learning rate used for training
  - `lr_scheduler` LRScheduler
    - `lr_scheduler_type` 'linear' | 'cosine', required
    - `lr_scheduler_args` union
      - LinearLRSchedulerArgs
        - `min_lr_ratio` number: The ratio of the final learning rate to the peak learning rate
      - CosineLRSchedulerArgs
        - `min_lr_ratio` number, required: The ratio of the final learning rate to the peak learning rate
        - `num_cycles` number, required: Number or fraction of cycles for the cosine learning rate scheduler
  - `warmup_ratio` number: Ratio of warmup steps
  - `max_grad_norm` number: Maximum gradient norm for clipping
  - `weight_decay` number: Weight decay value used
  - `random_seed` integer, 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_name` string: Weights & Biases project name
  - `wandb_name` string: Weights & Biases run name
  - `from_checkpoint` string: Checkpoint used to continue training
  - `from_hf_model` string: Hugging Face Hub repo to start training from
  - `hf_model_revision` string: The revision of the Hugging Face Hub model to continue training from
  - `progress` FineTuneProgress: Progress information for a fine-tuning job
    - `estimate_available` boolean, required: Whether time estimate is available
    - `seconds_remaining` integer, required: Estimated time remaining in seconds for the fine-tuning job to next state
  - `early_stopped` boolean: Whether the early-stopping criterion triggered.
  - `early_stopping_best_step` integer: 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_metric` number, nullable: Best validation loss observed, corresponding to early_stopping_best_step. Null if no improving evaluation was recorded.

## Other responses

- `400`: Invalid request parameters.
- `404`: Fine-tune ID not found.

## Changes

- **2026-10-22** `bb5257b3173a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/together/apis/together-apis/changes/v1/fine-tunes/:id/cancel/post.md)

---

[API](https://skmtc.dev/together/apis/together-apis.md) - [All operations](https://skmtc.dev/together/apis/together-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/together/apis/together-apis/revisions/93438ddac711?raw)
