# 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
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/developer/command-line-interface/train-a-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
