---
updatedAt: 2025-09-22T20:35:01.000Z
agentTools:
  projectIndex: https://docs.v7labs.com/llms.txt
---

# Start TrainingSession

Starting from a ModelTemplate and a Darwin Dataset, spin up a new TrainingSession. If the TrainingSession completes successfully, it will generate a new TrainedModel.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "wind",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://darwin.v7labs.com/ai"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/model_templates/{model_template_id}/training_sessions": {
      "post": {
        "summary": "Start TrainingSession",
        "description": "Starting from a ModelTemplate and a Darwin Dataset, spin up a new TrainingSession. If the TrainingSession completes successfully, it will generate a new TrainedModel.",
        "operationId": "train",
        "parameters": [
          {
            "name": "model_template_id",
            "in": "path",
            "description": "The ID of the ModelTemplate to base the TrainingSession on",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the TrainingSession"
                  },
                  "dataset_identifier": {
                    "type": "string",
                    "description": "A <team-slug>/<dataset-slug> string, identifying a Darwin Dataset"
                  },
                  "device": {
                    "type": "string",
                    "description": "The device the TrainingSession will be started on. It can either be \"gpu\" or \"cpu\", provided that the associated ModelTemplate supports it."
                  },
                  "train_params": {
                    "type": "string",
                    "description": "A list of optional parameters, needed by the ModelTemplate Integration to successfully start a TrainingSession",
                    "default": "{}",
                    "format": "json"
                  },
                  "classes": {
                    "type": "string",
                    "description": "The list of annotation classes to be targeted"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"classes\": [\n\t\t{\n\t\t\t\"name\": \"African Grey Parrot\",\n\t\t\t\"type\": \"polygon\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"European Robin\",\n\t\t\t\"type\": \"polygon\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Nightingale\",\n\t\t\t\"type\": \"polygon\"\n\t\t}\n\t],\n\t\"name\": \"Bird Segmentation Experiment\",\n\t\"dataset_identifier\": \"nest/bird-species\",\n\t\"device\": \"gpu\",\n\t\"train_params\": {\n\t\t\"num_epochs\": 100,\n\t\t\"val_percentage\": 10\n\t}\n}\n"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "classes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "African Grey Parrot"
                          },
                          "type": {
                            "type": "string",
                            "example": "polygon"
                          }
                        }
                      }
                    },
                    "name": {
                      "type": "string",
                      "example": "Bird Segmentation Experiment"
                    },
                    "dataset_identifier": {
                      "type": "string",
                      "example": "nest/bird-species"
                    },
                    "device": {
                      "type": "string",
                      "example": "gpu"
                    },
                    "train_params": {
                      "type": "object",
                      "properties": {
                        "num_epochs": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "val_percentage": {
                          "type": "integer",
                          "example": 10,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```