> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/models/train/cancel-a-training-job.md).

# Stop or Cancel a Training Job

Stop training early and save the model, or cancel training and discard its weights.

You can end a training job before it finishes. Stop training early to save the current model weights. Cancel training to discard the weights.

<table data-search="false"><thead><tr><th></th><th>Stop Training Early</th><th>Cancel Training</th></tr></thead><tbody><tr><td>Use when</td><td>The model has converged or already meets your goals.</td><td>You do not want a model from the training job.</td></tr><tr><td>Model weights</td><td>Saved</td><td>Discarded</td></tr><tr><td>Credits</td><td>You pay for the credits used.</td><td>You may receive a refund if you cancel early in the job. A refund is not issued after many epochs.</td></tr></tbody></table>

After either action, you can start another training job with the same dataset version.

You can also set a [credit cap](/models/train/train-a-model.md#set-a-credit-cap) when you start a job, so it stops on its own once it reaches a credit limit. A cap stop keeps the model weights.

{% hint style="info" %}
Stopping is cooperative: the job saves its weights and exits at the end of its current epoch. If a job gets stuck and never responds to the stop request, Roboflow ends it after about 8 hours. That job shows as failed instead of stopped, saves no model weights, and its credits are refunded. The same happens when Roboflow stops a job because the workspace ran out of credits and the job never responds to the stop request.
{% endhint %}

## Web App

### Stop Training Early

Use early stopping when the training graphs show that the model has converged or already meets your goals, but the job has many epochs left.

Click "Stop Training Early":

<figure><img src="https://3448603185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcmo9mhfIjYrvFFy1U7dk%2Fuploads%2Fgit-blob-b5a19294cac494e32a15968288329041a9985221%2FScreenshot%202025-05-19%20at%2011.44.09.png?alt=media" alt=""><figcaption></figcaption></figure>

Roboflow starts preparing the current model weights. The training job shows that it stopped early:

<figure><img src="https://3448603185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcmo9mhfIjYrvFFy1U7dk%2Fuploads%2Fgit-blob-1cb036787d9a372417f9a97e3cf4eb5a1eff0bc3%2FScreenshot%202025-05-19%20at%2011.44.15.png?alt=media" alt=""><figcaption></figcaption></figure>

It may take several minutes for the model to become available. A green checkmark appears next to the model name when it is ready:

<figure><img src="https://3448603185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcmo9mhfIjYrvFFy1U7dk%2Fuploads%2Fgit-blob-95bebf8c56e90ea3b76e39b09b0166987c56dd3b%2FScreenshot%202025-05-19%20at%2011.46.51.png?alt=media" alt=""><figcaption></figcaption></figure>

For Neural Architecture Search (NAS), training may stop automatically when the model converges. The training results page shows a message when Roboflow skips the remaining epochs.

### Continue Training

A job that stopped early can run more epochs from its last saved checkpoint. Open the training and click "Continue Training". This option is available for RF-DETR and YOLO models.

Roboflow keeps the checkpoint for a few days after the run ends. The button tooltip shows the date until which the training stays resumable. Once the checkpoint expires, the button turns off and you start a new training job instead.

### Cancel Training

Click "Cancel Training" to stop the job and discard its model weights:

<figure><img src="https://3448603185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcmo9mhfIjYrvFFy1U7dk%2Fuploads%2Fgit-blob-6746685187a307ad6d29d783e4ff353856cbc175%2FScreenshot%202025-05-19%20at%2011.41.51.png?alt=media" alt=""><figcaption></figcaption></figure>

## HTTP API

The calling API key needs the `training-job:create` scope.

The version endpoints act on the version's only training. If a version has more than one training, they return `409`: use the training endpoints instead and pass the `trainingId` from [List Trainings](/models/model-ids.md#http-api).

### Stop Training Early

Asks the training to stop and keep its weights. The job saves its weights and exits at the end of its current epoch, so the model appears a few minutes later.

{% openapi src="/files/By6Chmwewc1wp3gv2ojv" path="/{workspace}/{project}/{version}/train/stop" method="post" %}
[trainings.yaml](https://3448603185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcmo9mhfIjYrvFFy1U7dk%2Fuploads%2Fgit-blob-d92b2fd01aad14ee25eb9bc03d302ad152c5767f%2Ftrainings.yaml?alt=media)
{% endopenapi %}

### Cancel Training

Cancels a queued or running training and discards its weights. A job that has run for less than 30 minutes is refunded. For an older job, the first request returns `outcome: "requires_confirmation"` and cancels nothing. Send it again with `continueIfNoRefund: true` to cancel without a refund.

{% openapi src="/files/By6Chmwewc1wp3gv2ojv" path="/{workspace}/{project}/{version}/train/cancel" method="post" %}
[trainings.yaml](https://3448603185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcmo9mhfIjYrvFFy1U7dk%2Fuploads%2Fgit-blob-d92b2fd01aad14ee25eb9bc03d302ad152c5767f%2Ftrainings.yaml?alt=media)
{% endopenapi %}

### Stop a Training by ID

{% openapi src="/files/By6Chmwewc1wp3gv2ojv" path="/{workspace}/{project}/{version}/v2/trainings/stop" method="post" %}
[trainings.yaml](https://3448603185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcmo9mhfIjYrvFFy1U7dk%2Fuploads%2Fgit-blob-d92b2fd01aad14ee25eb9bc03d302ad152c5767f%2Ftrainings.yaml?alt=media)
{% endopenapi %}

### Cancel a Training by ID

{% openapi src="/files/By6Chmwewc1wp3gv2ojv" path="/{workspace}/{project}/{version}/v2/trainings/cancel" method="post" %}
[trainings.yaml](https://3448603185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fcmo9mhfIjYrvFFy1U7dk%2Fuploads%2Fgit-blob-d92b2fd01aad14ee25eb9bc03d302ad152c5767f%2Ftrainings.yaml?alt=media)
{% endopenapi %}

## MCP Server

Connect your AI agent to the [MCP Server](https://docs.roboflow.com/agents/mcp-server) and it can stop a training run with these tools:

<table data-search="false"><thead><tr><th width="290">Tool</th><th>Description</th></tr></thead><tbody><tr><td><code>trainings_stop</code></td><td>Request an early stop. The run finishes its current phase instead of ending at once.</td></tr><tr><td><code>trainings_cancel</code></td><td>Cancel an in-flight training run.</td></tr><tr><td><code>trainings_get</code></td><td>Get a training's status, produced models, and metrics.</td></tr></tbody></table>
