Train a Model
Train a model using state-of-the-art technology in the Roboflow dashboard.
About
You can train computer vision models in the Roboflow interface.
Roboflow offers two training options:
Roboflow Custom Train: Our flagship training service, ideal for creating production-ready models.
Neural Architecture Search: Discover novel model architectures and fine tune at the same time.
Also, when you approve your first batch of image annotations, a Roboflow Instant Model is automatically trained. These models can be used immediately for auto labeling or deployment.
Models trained on Roboflow can be deployed with Inference, our on-device inference server, or in the cloud using our Serverless Cloud API with Workflows, Batch Processing with Workflows, or with your model API endpoint.
Model Architectures
The architectures you can train depend on your project type. See the Supported Models table.
Object detection: RF-DETR offers the best accuracy.
Instance segmentation: RF-DETR Seg (Preview) offers the best accuracy.
Keypoint detection: "Roboflow RF-DETR Two-Stage" first finds each object, then predicts its keypoints. You pick a size for each stage.
Semantic segmentation: RF-DETR is available in Nano through 2XL.
Model sizes vary by architecture (ex: RF-DETR offers Nano, Small, Medium, Large, XL, and 2XL). Core, including the Free Tier, supports larger model sizes. Training a SAM3 model is available on Core with credit-based billing.
RF-DETR is released under the Apache 2.0 license, so you can ship it in closed-source, commercial products, including self-hosted deployments, without paying a license fee or open-sourcing your code. RF-DETR XL and 2XL detection, RF-DETR semantic segmentation, and the RF-DETR Two-Stage keypoint model use the Roboflow Platform Model License (PML 1.0): commercial use is included when you deploy on Roboflow, and commercial self-hosting requires the Enterprise add-on. YOLO architectures (ex: YOLO11, YOLO26) are AGPL-3.0: deploying them on Roboflow includes a commercial license for every user, and commercial self-hosting is an Enterprise add-on. See Model Licenses.
Neural Architecture Search (NAS) is available for object detection, instance segmentation, and semantic segmentation in place of a single architecture. It trains and evaluates several model configurations, then recommends the best one for your accuracy and latency needs. NAS requires at least 15 validation images. See NAS training charts.
Checkpoints
Training from a checkpoint uses Transfer Learning: the model starts from the weights of the model you select, which can reduce training time and improve scores. Object detection has three options:
Previous checkpoint: start from an earlier version of your model (object detection, instance segmentation, and keypoint detection). Training is faster. Use it only when that model already performs well.
Public checkpoint: the default, trained on Microsoft COCO. Use it for your first model, or when a previous run did not reach the results you expected. You can also train from a Universe project (object detection only) once you star it in Universe.
Random initialization: start from random weights, with no Transfer Learning. This is for advanced users; most users see worse results.
Classification and semantic segmentation have one checkpoint, trained on ImageNet.
Set a Credit Cap
You can limit how many credits one training run spends. Caps require a plan with usage-based billing. Leave the cap blank to run without one.
When a run reaches its cap, Roboflow stops it and keeps the model weights, the same as stopping training early. While the job runs, the training shows how many of the capped credits it has used.
Each model has a minimum cap: the cost of the shortest run that can still produce a model. A smaller cap is rejected. A cap below the cost estimate is allowed, but the run will likely stop before it finishes.
Neural Architecture Search bills training and architecture search separately, so it has two caps. Setting one leaves the other phase uncapped.
If a capped run stops with credits to spare, you can continue it. The new run can spend what is left under the cap. If less is left than the model's minimum, start a new training instead.
Duration and Cost
Training is priced on the length of the train job. See the credits page. Students and researchers can apply for additional credits.
Larger datasets and larger images take longer to train. You receive an email when training finishes, in most cases within 24 hours.
Action Recognition versions trained with Cosmos 3 Edge are estimated from videos, not images. The estimate counts the version's videos, the length of each one, and the run's video sampling settings, so changing those settings changes the estimate. If the version is missing video details, there is no estimate. V-JEPA 2.1 trainings show no estimate.
Train Multiple Models on a Version
You can train more than one model on the same dataset version to compare architectures or sizes against identical data. Each training runs and is evaluated independently, and the version page lists every training so you can switch between them.
Train From the Agent
You can start a training from Roboflow Agent: open a project tab and click "Train", or ask in chat. You need the Train Model and List Versions permissions.
Before a chat request starts training, the Agent shows the estimated duration and credit cost for that exact setup: the typical cost, since training often stops early, and the cost of a full run over every epoch. Nothing starts until you confirm, and if the full-run estimate changes before the run begins, the Agent asks you to confirm the new number. If the version has not been exported yet, the Agent exports it first and training starts when the export is ready. If the project has no version, you can create one from the same screen.
Web App
Open "Train" in the project navigation and click "Custom Training".


Choose a training engine: a single architecture or NAS.
Choose an architecture and a size. The list shows only the architectures your project type supports. SAM3 shows a "Request Feature" button until your Workspace has access.
Pick your data. You do not need a version first: "Current Dataset" uses your latest images and annotations, and Roboflow creates the version with the name and splits on the card when training starts. A saved version uses the data frozen in it.
Optionally adjust "Customize Training Recipe", which holds "Training Preprocessing", "Online Augmentations", "Checkpoint", "Hyperparameters", and, for NAS, "Latency Band".
Optionally enter a "Credit Cap" ("Training Credit Cap" and "Search Credit Cap" for NAS). The model's minimum appears under the input. See Set a Credit Cap.
Review the estimated duration and credit cost in the training summary, then click "Start Training".


To start from a saved version's settings, click "Reuse Preprocessing and Augmentations" (or "Copy Preprocessing and Augmentations to Current Dataset" for baked training) on its card. This copies its preprocessing, augmentations, class remapping, and tag filters into "Current Dataset", where you can edit them.
With a saved version, the recipe's preprocessing and augmentation rows are locked, since they were applied when the version was generated. Otherwise, "Training Preprocessing" and "Online Augmentations" apply only to that run and do not change the version. To see the settings a model used, select it on the version page and open its "Training Recipe" card.
HTTP API
Once a project has a generated dataset version, you can queue a training job on it. The calling API key needs the training-job:create scope.
Start a Training Job
Queues a training job on a dataset version. Training runs in the background: a 204 response means the job is queued, not finished. The response has no training ID. To follow progress, poll Get Training Results, or list the version's trainings to find the new one.
If the version is not ready to train, the 400 error carries a remedy that names the fix, so a script or agent can act on it without reading the message. Plan limits apply the same way they do in the web app.
Queues a training job on a dataset version. Requires training-job:create. The response has no body and no training ID; use the v2 trainings endpoints to find the training. On a version with several trainings, those endpoints are also how you get its results.
Roboflow API key or OAuth access token.
Workspace URL slug.
Project URL slug.
Dataset version number.
Architecture and size to train (ex: rfdetr-nano, rfdetr-small, yolov11n). It must suit the project type. An unknown or unsupported value returns 400 with the code invalid_model_type and the valid choices in availableModelTypes.
rfdetr-smallCheckpoint to start from: a model ID from this or another workspace you can access. Leave it out to start from the default public checkpoint.
Number of epochs. Values above 300 are lowered to 300. Defaults depend on the model type.
Training speed preset. accurate needs a plan that includes it. The model type takes precedence.
fastPossible values: Most credits the training may spend before Roboflow stops it and keeps the weights. Must be at least the model's minimum, and needs a plan with usage-based billing.
Most credits the Neural Architecture Search architecture search may spend. Neural Architecture Search model types only.
Completed with no response body.
No content
Training did not start. error.code says why (ex: invalid_model_type, invalid_credit_cap, train_not_enabled, insufficient_train_credits, train_quota_exhausted, accurate_train_not_available, nas_not_available_for_plan, sam3_not_available_for_plan). When the version is not ready, error.remedy names the fix: rebalance (images sit in the wrong splits), upload (add images), annotate (label images), regenerate (generate a new version), wait (a rebalance or generation is still running), or export.
Authentication is missing or invalid.
The API key lacks training-job:create, or the request sends a trainRecipe or stages without the online augmentation training feature.
The resource does not exist or is not accessible.
The version is a legacy single-model version that already has a training (error.code LEGACY_VERSION_SINGLE_MODEL). Generate a new version to train another model.
The request rate is too high.
POST /{workspace}/{project}/{version}/train HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"modelType": "rfdetr-small",
"epochs": 100
}No content
Start a Training and Get Its ID
Takes the same fields as Start a Training Job, and returns the new trainingId. Use it when a version can hold several trainings and you want to stop, cancel, or read this one later.
Queues a training job on a dataset version and returns its training ID. Accepts the same fields as Start a Training Job. Requires training-job:create.
Roboflow API key or OAuth access token.
Workspace URL slug.
Project URL slug.
Dataset version number.
Architecture and size to train (ex: rfdetr-nano, rfdetr-small, yolov11n). It must suit the project type. An unknown or unsupported value returns 400 with the code invalid_model_type and the valid choices in availableModelTypes.
rfdetr-smallCheckpoint to start from: a model ID from this or another workspace you can access. Leave it out to start from the default public checkpoint.
Number of epochs. Values above 300 are lowered to 300. Defaults depend on the model type.
Training speed preset. accurate needs a plan that includes it. The model type takes precedence.
fastPossible values: Most credits the training may spend before Roboflow stops it and keeps the weights. Must be at least the model's minimum, and needs a plan with usage-based billing.
Most credits the Neural Architecture Search architecture search may spend. Neural Architecture Search model types only.
Successful response.
ID of the new training. Pass it to the v2 get, cancel, and stop endpoints.
Training status: initializing, queued, generating, training, running, mining (Neural Architecture Search is searching architectures), finished, failed, cancelled, or stopped. not_started when the version has no training.
finishedID of the training job.
Training did not start. error.code says why (ex: invalid_model_type, invalid_credit_cap, train_not_enabled, insufficient_train_credits, train_quota_exhausted, accurate_train_not_available, nas_not_available_for_plan, sam3_not_available_for_plan). When the version is not ready, error.remedy names the fix: rebalance (images sit in the wrong splits), upload (add images), annotate (label images), regenerate (generate a new version), wait (a rebalance or generation is still running), or export.
Authentication is missing or invalid.
The API key lacks training-job:create, or the request sends a trainRecipe or stages without the online augmentation training feature.
The resource does not exist or is not accessible.
The version is a legacy single-model version that already has a training (error.code LEGACY_VERSION_SINGLE_MODEL). Generate a new version to train another model.
The request rate is too high.
POST /{workspace}/{project}/{version}/v2/trainings HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"modelType": "rfdetr-small",
"epochs": 100
}{
"trainingId": "0a1b2c3d4e5f67890abc",
"status": "queued",
"jobId": "train-0a1b2c3d"
}Python SDK
Version.train() schedules training on the Roboflow platform. The call returns once the job is queued - training itself runs asynchronously.
Parameters
model_type(str) - architecture identifier. Common values:rfdetr-nano,rfdetr-base,yolov8,yolov11. Project-type dependent. Pass an invalid value to get the full list back as an error.speed(str, optional) -"fast"(default) or"accurate". Accurate training is a paid feature.checkpoint(str, optional) - id of a checkpoint to resume from.epochs(int, optional) - number of epochs. Defaults are model-type-dependent.plot_in_notebook(bool, defaultFalse) - display training progress inline (notebook only).
After training
Once training completes, the Version's .model property returns the hosted model:
See Run a Model on an Image for the full inference reference.
CLI
You can start model training from the command line. Training runs on Roboflow's cloud infrastructure.
Command
Or use the shorthand (without start):
Options
-p, --project
Project ID (required)
-v, --version
Version number (required)
-t, --type
Model type, e.g. yolov8n, rfdetr-nano
--checkpoint
Checkpoint to resume training from
--speed
Training speed preset
--epochs
Number of training epochs
Examples
Start training with a specific model type:
Resume from a checkpoint:
JSON Output
MCP Server
Connect your AI agent to the MCP Server and it can train a model with these tools:
trainings_describe_recipe
Describe the tuning options for a model type and return a ready-to-submit recipe.
trainings_create
Start a training run on a dataset version.
trainings_get
Get a training's status, produced models, and metrics.
trainings_list
List the training runs on a dataset version.
Next steps
Review how your model performed and compare training runs. See Evaluate Trained Models.
Deploy your model with the Serverless Cloud API.
Last updated
Was this helpful?