# Train a Model

You can start model training from the command line. Training runs on Roboflow's cloud infrastructure.

## Command

```bash
roboflow train start -p <project> -v <version> -t <model-type>
```

Or use the shorthand (without `start`):

```bash
roboflow train -p <project> -v <version> -t <model-type>
```

### Options

| Flag              | Description                               |
| ----------------- | ----------------------------------------- |
| `-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:

```bash
roboflow train start -p my-detector -v 3 -t yolov8n
```

Resume from a checkpoint:

```bash
roboflow train start -p my-detector -v 3 -t yolov8n --checkpoint my-checkpoint
```

## JSON Output

```bash
roboflow train start -p my-detector -v 3 -t yolov8n --json
```

```json
{
  "status": "training_started",
  "project": "my-detector",
  "version": 3
}
```
