---
title: "Cancel a fine tuning job"
method: POST
path: "/ai/fine_tuning/jobs/{job_id}/cancel"
tags: ["Fine Tuning"]
---

# Cancel a fine tuning job

`POST /ai/fine_tuning/jobs/{job_id}/cancel`

## Request

- Base URL: `https://api.telnyx.com/v2`
- URL: `https://api.telnyx.com/v2/ai/fine_tuning/jobs/{job_id}/cancel`
- Auth: HTTP bearer

Cancels the specified in-progress fine-tuning job and returns the updated job.

## Path parameters

- `job_id` string, required

## Response `200`

Successful Response

- FineTuningJob: The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.
  - `id` string, required: The name of the fine-tuned model that is being created.
  - `created_at` integer, required: The Unix timestamp (in seconds) for when the fine-tuning job was created.
  - `finished_at` integer, nullable, required: The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.
  - `hyperparameters` object, required: The hyperparameters used for the fine-tuning job.
    - `n_epochs` integer, required: The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
  - `model` string, required: The base model that is being fine-tuned.
  - `organization_id` string, required: The organization that owns the fine-tuning job.
  - `status` 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled', required: The current status of the fine-tuning job.
  - `trained_tokens` integer, nullable, required: The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.
  - `training_file` string, required: The storage bucket or object used for training.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api.md) - [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api/llms.txt) - [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api/revisions/a73101b68823?raw)
