> ## 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 job detail

> Get training job detail by key



## OpenAPI

````yaml api-reference/openapi.yaml GET /api/v1/training/{trainingJobKey}
openapi: 3.0.1
info:
  title: MathFi.ai API
  description: >
    The MathFi.ai REST API runs the two products end to end.


    **Feature Refinery** takes your labelled data and works out which columns

    actually carry the signal. It returns a reduced train and test pair, a

    per-column keep/remove decision, and the performance target the refined data

    reached.


    **Model Crucible** takes a dataset, trains every algorithm family against it

    at once, ranks the results on held-out data by fewest wrong decisions, and

    keeps the best three as versions of one model. You pick which one
    predictions

    run against.


    Everything is asynchronous: you create a thing, upload to a signed URL,
    start

    it, then poll until the state is terminal. Nothing streams and nothing
    blocks.
  contact:
    name: MathFi.ai
    url: https://mathfi.ai
    email: support@mathfi.ai
  license:
    name: MathFi.ai
    url: https://mathfi.ai
  version: 1.0.0
servers:
  - url: https://{tenant}-api.mathfi.ai
    description: >-
      Your tenant's API. Each customer has their own, so the host varies.
      Replace {tenant} with the name issued when your tenant was created.
    variables:
      tenant:
        default: your-tenant
        description: The tenant name issued to you.
security:
  - BearerAuth: []
tags:
  - name: Authentication
    description: Exchange credentials for a bearer token
  - name: Feature Refinery
    description: Reduce a dataset to the columns that earn their place
  - name: Datasets
    description: >-
      Prepare labelled data for training, from uploads or from a finished
      refinement
  - name: Training
    description: Run the Crucible against a dataset and choose the champion model
  - name: Models
    description: Trained models and their versions
  - name: Predictions
    description: Score unlabelled data against a champion model
paths:
  /api/v1/training/{trainingJobKey}:
    get:
      tags:
        - Training
      summary: Get training job detail
      description: Get training job detail by key
      operationId: getTrainingDetail
      parameters:
        - name: trainingJobKey
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Training job detail successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingJobOutput'
              examples:
                Successful training job detail response:
                  summary: Successful training job detail response
                  value:
                    trainingJobKey: 3a1a9a83-d549-4f25-b7ed-8174e0c955de
                    datasetKey: 2b0a9a83-d549-4f25-b7ed-8174e0c955cd
                    status: PENDING
                    scalingFactor: 19
                    targetPerformance: 0.85
        '400':
          description: Invalid training detail request
        '500':
          description: Internal server error
components:
  schemas:
    TrainingJobOutput:
      required:
        - datasetKey
        - status
        - targetPerformance
        - trainingJobKey
      type: object
      properties:
        trainingJobKey:
          type: string
          format: uuid
        datasetKey:
          type: string
          format: uuid
        status:
          $ref: '#/components/schemas/TrainingJobStatus'
        createdOn:
          description: >-
            When the run was created, as an ISO-8601 UTC instant. The listing
            carries this too; it is here so a client that opened a run directly
            does not have to go back to the list for it.
          type: string
          nullable: true
        scalingFactor:
          type: integer
          format: int32
          nullable: true
        targetPerformance:
          type: number
          format: double
        achievedPerformance:
          type: number
          format: double
          nullable: true
        trainingPerformance:
          type: number
          format: double
        testPerformance:
          type: number
          format: double
        modelKey:
          type: string
          format: uuid
          nullable: true
        winnerAlgorithm:
          type: string
          nullable: true
          description: Alias of the winning algorithm. Present only on COMPLETED jobs.
        algorithmPerformances:
          type: array
          description: >-
            Per-algorithm latest-in-time performance at job termination. Present
            on all terminal statuses.
          items:
            $ref: '#/components/schemas/TrainingJobProgressItem'
        performance:
          $ref: '#/components/schemas/TrainingPerformance'
    TrainingJobStatus:
      type: string
      description: >
        Status of training: 


        * `PENDING` - The training job has been created and is pending execution

        * `RUNNING` - The training job is currently executing and progressing

        * `COMPLETED` - The training job has completed execution successfully,
        reaching the target performance. A model has been generated. 

        * `TIMED_OUT` - The training job could not reach the target performance
        in the configured 

        * `CANCELLED` - The training job has been cancelled by the user 

        * `NOT_COMPLETED` - The training job has stalled without making progress
        in a specified timeframe

        * `FAILED` - The training job has failed due to an error
      enum:
        - PENDING
        - RUNNING
        - COMPLETED
        - TIMED_OUT
        - CANCELLED
        - FAILED
        - NOT_COMPLETED
    TrainingJobProgressItem:
      type: object
      properties:
        trainingJobKey:
          type: string
          format: uuid
        attemptNumber:
          description: >-
            Which of the job's attempts this is, counting from one. Present
            where a job runs many attempts rather than one job per algorithm —
            the attempts have no key of their own.
          type: integer
          nullable: true
        algorithm:
          type: string
        status:
          $ref: '#/components/schemas/TrainingJobStatus'
        latestPerformance:
          type: number
          format: double
        recentPerformances:
          type: array
          items:
            type: number
            format: double
    TrainingPerformance:
      description: >-
        What a finished run produced: the models it offers, which of them
        predictions run against, and where they were published. Null on a run of
        the older pipeline, which offers one model and no choice.
      type: object
      properties:
        candidates:
          description: The models this run offers, best first. Position is the ranking.
          type: array
          items:
            $ref: '#/components/schemas/ModelCandidate'
        champion:
          $ref: '#/components/schemas/ChampionSelectionOutput'
        achievedPerformance:
          description: >-
            What this run achieved: the accuracy of the model predictions
            currently run against. It follows the champion, so re-pointing the
            choice changes it. Absent while nothing has been offered, and on a
            champion whose accuracy the jars could not define.
          type: number
          format: double
          nullable: true
        modelKey:
          type: string
          format: uuid
          nullable: true
    ModelCandidate:
      description: One model a finished run offers, and how it scored on the test data.
      type: object
      properties:
        attemptNumber:
          type: integer
        algorithm:
          type: string
        version:
          type: string
        falseDecisions:
          description: >-
            How many decisions it got wrong. Fewer is better; this is what the
            ranking is on.
          type: integer
        accuracy:
          type: number
          format: double
          nullable: true
        f1Score:
          type: number
          format: double
          nullable: true
        precision:
          type: number
          format: double
          nullable: true
        recall:
          type: number
          format: double
          nullable: true
    ChampionSelectionOutput:
      description: Which candidate predictions run against, and how that came to be.
      type: object
      properties:
        attemptNumber:
          type: integer
        version:
          type: string
        selectedBy:
          type: string
          enum:
            - AUTOMATIC
            - USER
        observations:
          description: >-
            Why this candidate — the run's own reason, or the user's own words
            over it.
          type: string
          nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````