---
title: "Create Training"
method: POST
path: "/api/train/trainings"
tags: ["train"]
---

# Create Training

`POST /api/train/trainings`

## Request

- Base URL: `https://app.getdot.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.getdot.ai/api/train/trainings`
- Auth: one of:
  - API key in header `X-API-KEY`
  - API key in cookie `Authorization`
  - OAuth 2 (password, token URL `/api/auth/token`)

## Request body

- TrainingCreateRequest
  - `name` string, required
  - `credit_limit_acc` integer, nullable
  - `source_type` 'bi' | 'file' | 'custom'
  - `start_from` TrainingStartPoint
    - `kind` 'inherit' | 'production' | 'environment'
    - `environment_id` string, nullable
  - `source_chat_id` string, nullable
  - `evaluation_id` string, nullable
  - `evaluation_name` string, nullable
  - `confirm_fresh_baseline` boolean
  - `source` TrainingSource
    - `type` string
    - `dashboard_name` string, nullable
    - `dashboard_url` string, nullable
    - `workbook` string, nullable
    - `view` string, nullable
  - `description` string, nullable
  - `concepts` ConceptRef[]
    - `id` string, nullable
    - `slug` string, nullable
    - `name` string, nullable
    - `source_system` string, nullable
    - `concept_type` 'metric' | 'entity', nullable
    - `source` object, nullable
    - `labels` string[]
    - `description` string, nullable
  - `questions` QuestionSeed[]
    - `question` string, required
    - `concept_id` string, nullable
    - `concept_slug` string, nullable
    - `expected_answer` string, nullable
    - `answer_type` 'number' | 'currency' | 'percent' | 'count' | 'ratio' | 'date' | 'text'
    - `source` QuestionSource
      - `system` string, nullable
      - `workbook` string, nullable
      - `view` string, nullable
      - `dashboard_name` string, nullable
      - `dashboard_url` string, nullable
      - `dashboard_id` string, nullable
      - `tile_id` string, nullable
      - `look_id` string, nullable
      - `query_id` string, nullable
      - `method` 'tile_read' | 'reconstructed', nullable
      - `reconstruction_accepted` boolean, nullable
      - `compiled_sql` string, nullable
      - `filters` object
      - `question_filters` object, nullable
      - `extracted_at` string, nullable
      - `definition` string, nullable
      - `legacy_run_status` string, nullable
      - `legacy_run_id` string, nullable
  - `ground_truth_values` GroundTruthValueRequest[]
    - `metric` string, required
    - `question` string, nullable
    - `value` string, required
    - `period` string, nullable
    - `answer_type` 'number' | 'currency' | 'percent' | 'count' | 'ratio' | 'date'
    - `unit` string, nullable
    - `tolerance_pct` number
    - `category` string, nullable
    - `source` PublicQuestionSource
      - `system` string, nullable
      - `workbook` string, nullable
      - `view` string, nullable
      - `dashboard_name` string, nullable
      - `dashboard_url` string, nullable
      - `dashboard_id` string, nullable
      - `tile_id` string, nullable
      - `look_id` string, nullable
      - `query_id` string, nullable
      - `method` 'tile_read' | 'reconstructed', nullable
      - `reconstruction_accepted` boolean, nullable
      - `compiled_sql` string, nullable
      - `filters` object
      - `question_filters` object, nullable
      - `extracted_at` string, nullable
      - `definition` string, nullable
      - `legacy_run_status` string, nullable
      - `legacy_run_id` string, nullable
      - `connection_id` string, nullable
      - `worksheet` string, nullable
      - `category` string, nullable
      - `expected_period` string, nullable
      - `metric` string, nullable
  - `ground_truth_questions` GroundTruthQuestionRequest[]
    - `question` string, required
    - `expected_answer` string, required
    - `answer_type` 'number' | 'currency' | 'percent' | 'count' | 'ratio' | 'date', nullable
    - `unit` string, nullable
    - `tolerance_pct` number
  - `cover_all_slices` boolean
  - `fast` boolean

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getdot/apis/dot-api-2.md) · [All operations](https://skmtc.dev/getdot/apis/dot-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/getdot/apis/dot-api-2/revisions/d26fe7163a7f?raw)
