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

Train and Manage Training Jobs

You can start, cancel, and stop training jobs through the REST API. You can also star NAS (Neural Architecture Search) child models to mark your preferred architectures.

Start a Training Job

Kick off a training run on a dataset version:

POST https://api.roboflow.com/:workspace/:project/:version/train
curl "https://api.roboflow.com/my-workspace/my-detector/3/train?api_key=$ROBOFLOW_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"model_type": "rfdetr-base"}'

Training runs asynchronously. The response confirms that the job was queued, not that it has finished.

The calling API key must have the trainingJob:create scope.

Cancel a Training Job

Cancel an in-progress training job. The job must be in a running or queued state; cancelling a finished job returns a 409 Conflict.

POST https://api.roboflow.com/:workspace/:project/:version/train/cancel
curl "https://api.roboflow.com/my-workspace/my-detector/3/train/cancel?api_key=$ROBOFLOW_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{}'

Example success response:

{
  "success": true
}

Example error response (job already finished):

{
  "error": {
    "type": "Conflict",
    "message": "Cannot cancel non-running train job.",
    "code": "CANNOT_CANCEL"
  }
}

Cancel is not idempotent. If the job has already completed or been cancelled, the endpoint returns 409.

The calling API key must have the trainingJob:create scope.

Stop a Training Job (Early Stop)

Request an early stop for a running training job. Unlike cancel, stop is idempotent and will return success even if the job has already stopped.

Example success response:

The calling API key must have the trainingJob:create scope.

Last updated

Was this helpful?