> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mathfi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get training progress

> Returns the real-time progress of all competing algorithms in a training job.

Each algorithm reports its `latestPerformance` and `recentPerformances` (last N iterations).
When one algorithm reaches `performanceThreshold`, the overall status becomes `COMPLETED`
and a model is generated.

**Terminal statuses:** `COMPLETED`, `TIMED_OUT`, `CANCELLED`, `NOT_COMPLETED`, `FAILED`




## OpenAPI

````yaml GET /api/v1/training/{trainingJobKey}/progress
openapi: 3.0.1
info:
  title: MathFi.ai API
  description: >
    The MathFi.ai REST API lets you build predictive AI applications
    programmatically.


    Upload labelled CSV data, train a model, and run predictions — all in
    minutes.

    The API supports binary and multi-class classification on tabular data using

    Cellular Balanced Learning (CBL), running entirely on commodity CPUs.


    ## Base URL


    ```

    https://api.mathfi.ai

    ```


    ## Authentication


    All `/api/v1/*` endpoints require a Bearer token obtained from `POST
    /api/login`.

    Tokens are valid for **1 hour**. Re-authenticate when you receive a `401`.


    ```

    Authorization: Bearer <token>

    ```
  contact:
    name: MathFi.ai
    url: https://mathfi.ai
    email: support@mathfi.ai
  license:
    name: Mathficast Limited
    url: https://mathfi.ai
  version: 1.0.0
servers:
  - url: https://api.mathfi.ai
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Authentication
    description: Obtain a Bearer token to authenticate API requests
  - name: Datasets
    description: Create and manage labelled training data in CSV format
  - name: Training
    description: Train models from datasets using a small set of hyperparameters
  - name: Models
    description: Inspect trained models and their performance metrics
  - name: Predictions
    description: Run inference on unseen data using trained models
paths:
  /api/v1/training/{trainingJobKey}/progress:
    get:
      tags:
        - Training
      summary: Get training progress
      description: >
        Returns the real-time progress of all competing algorithms in a training
        job.


        Each algorithm reports its `latestPerformance` and `recentPerformances`
        (last N iterations).

        When one algorithm reaches `performanceThreshold`, the overall status
        becomes `COMPLETED`

        and a model is generated.


        **Terminal statuses:** `COMPLETED`, `TIMED_OUT`, `CANCELLED`,
        `NOT_COMPLETED`, `FAILED`
      operationId: getTrainingProgress
      parameters:
        - name: trainingJobKey
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Training progress retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingJobProgressOutput'
              examples:
                Training in progress:
                  summary: Four algorithms competing, one completed
                  value:
                    status: COMPLETED
                    jobs:
                      - trainingJobKey: bc9aa412-8d4f-4b00-89af-0e6e3dcf8e57
                        algorithm: BSEV01
                        status: NOT_COMPLETED
                        latestPerformance: 0.6199
                        recentPerformances:
                          - 0.6199
                          - 0.6199
                          - 0.6199
                          - 0.6199
                          - 0.6199
                      - trainingJobKey: d9ab4260-6416-45d6-91e4-7b0b8a0ad56b
                        algorithm: BFIF01
                        status: NOT_COMPLETED
                        latestPerformance: 0.7714
                        recentPerformances:
                          - 0.7713
                          - 0.7713
                          - 0.7714
                          - 0.7714
                      - trainingJobKey: e7edd490-3ee2-49f8-a49c-e9f9759965e8
                        algorithm: BSIX01
                        status: NOT_COMPLETED
                        latestPerformance: 0.8595
                        recentPerformances:
                          - 0.8579
                          - 0.8602
                          - 0.866
                          - 0.8595
                      - trainingJobKey: f2275fde-73ed-43d0-948a-17ff8f586874
                        algorithm: BSEV02
                        status: COMPLETED
                        latestPerformance: 0.92
                        recentPerformances:
                          - 0.9194
                          - 0.92
                          - 0.92
                          - 0.9197
                          - 0.92
        '400':
          description: Invalid training job key
        '500':
          description: Internal server error
components:
  schemas:
    TrainingJobProgressOutput:
      required:
        - status
      type: object
      properties:
        status:
          $ref: '#/components/schemas/TrainingJobStatus'
        targetPerformance:
          type: number
          format: double
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/TrainingJobProgressItem'
    TrainingJobStatus:
      type: string
      description: >
        Status of a training job:


        | Status | Description |

        |---|---|

        | `PENDING` | Queued, not yet started |

        | `RUNNING` | Algorithms competing in parallel |

        | `COMPLETED` | Target performance reached. Champion model created. |

        | `TIMED_OUT` | Did not reach target performance within the time limit |

        | `NOT_COMPLETED` | Stalled — no progress detected for a sustained
        period |

        | `CANCELLED` | Cancelled by the user |

        | `FAILED` | Failed due to an internal error |
      enum:
        - PENDING
        - RUNNING
        - COMPLETED
        - TIMED_OUT
        - NOT_COMPLETED
        - CANCELLED
        - FAILED
    TrainingJobProgressItem:
      type: object
      properties:
        trainingJobKey:
          type: string
          format: uuid
        algorithm:
          type: string
          example: BSEV02
        status:
          $ref: '#/components/schemas/TrainingJobStatus'
        latestPerformance:
          type: number
          format: double
        recentPerformances:
          type: array
          items:
            type: number
            format: double
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Obtain a token from `POST /api/login`. Valid for 1 hour.

````