For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Stop Training Early
Cancel Training

Use when

The model has converged or already meets your goals.

You do not want a model from the training job.

Model weights

Saved

Discarded

Credits

You pay for the credits used.

You may receive a refund if you cancel early in the job. A refund is not issued after many epochs.

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

You can also 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.

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.

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":

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

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

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:

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.

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.

Stop an active training job

post

Asks the version's training to stop early and keep its weights. Works only when the version has exactly one training. During a Neural Architecture Search, it stops the architecture search. Requires training-job:create.

Authorizations
AuthorizationstringRequired

Roboflow API key or OAuth access token.

Path parameters
workspacestringRequired

Workspace URL slug.

projectstringRequired

Project URL slug.

versioninteger · min: 1Required

Dataset version number.

Responses
200

Successful response.

application/json
successbooleanOptional

True when the stop request was recorded.

post/{workspace}/{project}/{version}/train/stop
POST /{workspace}/{project}/{version}/train/stop HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "success": true
}

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.

Cancel a queued training job

post

Cancels the version's training and discards its weights. Works only when the version has exactly one training. If the job has run for less than 30 minutes, cancelling refunds its credits. After that, the request cancels nothing and returns outcome requires_confirmation until you send continueIfNoRefund: true. Requires training-job:create.

Authorizations
AuthorizationstringRequired

Roboflow API key or OAuth access token.

Path parameters
workspacestringRequired

Workspace URL slug.

projectstringRequired

Project URL slug.

versioninteger · min: 1Required

Dataset version number.

Body
continueIfNoRefundbooleanOptional

Send true to cancel a job that has run for 30 minutes or more, which gives no refund.

Default: false
Responses
200

Successful response.

application/json
outcomestring · enumOptional

cancelled: the training is cancelled. pending: the cancel is recorded and finishes shortly. superseded: the training ended first, and status says how. requires_confirmation: nothing was cancelled because no refund is due; send continueIfNoRefund: true to cancel anyway.

Possible values:
successbooleanOptional

True when outcome is cancelled.

refundbooleanOptional

True when the training's credits were refunded.

jobDeletedbooleanOptional

True when the running job was shut down.

jobAlreadyGonebooleanOptional

True when the job had already ended.

statusstringOptional

Final training status. Present when outcome is superseded.

post/{workspace}/{project}/{version}/train/cancel
POST /{workspace}/{project}/{version}/train/cancel HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "continueIfNoRefund": true
}
{
  "outcome": "cancelled",
  "success": true,
  "refund": true,
  "jobDeleted": true
}

Stop a Training by ID

Stop an active training run

post

Asks one training on a version to stop early and keep its weights. During a Neural Architecture Search, it stops the architecture search. Requires training-job:create.

Authorizations
AuthorizationstringRequired

Roboflow API key or OAuth access token.

Path parameters
workspacestringRequired

Workspace URL slug.

projectstringRequired

Project URL slug.

versioninteger · min: 1Required

Dataset version number.

Body
trainingIdstringOptional

Training to stop. Leave it out when the version has only one training.

Responses
200

Successful response.

application/json
successbooleanOptional

True when the stop request was recorded.

post/{workspace}/{project}/{version}/v2/trainings/stop
POST /{workspace}/{project}/{version}/v2/trainings/stop HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "trainingId": "0a1b2c3d4e5f67890abc"
}
{
  "success": true
}

Cancel a Training by ID

Cancel a queued training run

post

Cancels one training on a version and discards its weights. If the job has run for less than 30 minutes, cancelling refunds its credits. After that, the request cancels nothing and returns outcome requires_confirmation until you send continueIfNoRefund: true. Requires training-job:create.

Authorizations
AuthorizationstringRequired

Roboflow API key or OAuth access token.

Path parameters
workspacestringRequired

Workspace URL slug.

projectstringRequired

Project URL slug.

versioninteger · min: 1Required

Dataset version number.

Body
trainingIdstringOptional

Training to cancel. Leave it out when the version has only one training.

continueIfNoRefundbooleanOptional

Send true to cancel a job that has run for 30 minutes or more, which gives no refund.

Default: false
Responses
200

Successful response.

application/json
outcomestring · enumOptional

cancelled: the training is cancelled. pending: the cancel is recorded and finishes shortly. superseded: the training ended first, and status says how. requires_confirmation: nothing was cancelled because no refund is due; send continueIfNoRefund: true to cancel anyway.

Possible values:
successbooleanOptional

True when outcome is cancelled.

refundbooleanOptional

True when the training's credits were refunded.

jobDeletedbooleanOptional

True when the running job was shut down.

jobAlreadyGonebooleanOptional

True when the job had already ended.

statusstringOptional

Final training status. Present when outcome is superseded.

post/{workspace}/{project}/{version}/v2/trainings/cancel
POST /{workspace}/{project}/{version}/v2/trainings/cancel HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 63

{
  "trainingId": "0a1b2c3d4e5f67890abc",
  "continueIfNoRefund": true
}
{
  "outcome": "cancelled",
  "success": true,
  "refund": true,
  "jobDeleted": true
}

MCP Server

Connect your AI agent to the MCP Server and it can stop a training run with these tools:

Tool
Description

trainings_stop

Request an early stop. The run finishes its current phase instead of ending at once.

trainings_cancel

Cancel an in-flight training run.

trainings_get

Get a training's status, produced models, and metrics.

Last updated

Was this helpful?