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

> Get model detail



## OpenAPI

````yaml api-reference/openapi.yaml GET /api/v1/models/{modelKey}
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/models/{modelKey}:
    get:
      tags:
        - Models
      summary: Get model detail
      description: Get model detail
      operationId: getModelDetail
      parameters:
        - name: modelKey
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Model detail successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelOutput'
              examples:
                Successful model detail response:
                  summary: Successful model response
                  value:
                    modelKey: 3a1a9a83-d549-4f25-b7ed-8174e0c955de
                    version: 1
                    datasetKey: 2b0a9a83-d549-4f25-b7ed-8174e0c955cd
                    trainingJobKey: 2b0a9a83-d549-4f25-b7ed-8174e0c955cd
                    achievedPerformance: '0.85'
                    createdOn: '2024-08-07T06:38:20.000Z'
        '400':
          description: Invalid model detail request
        '500':
          description: Internal server error
components:
  schemas:
    ModelOutput:
      required:
        - achievedPerformance
        - createdOn
        - datasetKey
        - modelKey
        - version
      type: object
      properties:
        modelKey:
          type: string
          format: uuid
        datasetKey:
          type: string
          format: uuid
        version:
          type: integer
          format: int32
        achievedPerformance:
          type: number
          format: double
        trainingPerformance:
          type: number
          format: double
        testPerformance:
          type: number
          format: double
        versions:
          description: >-
            The models this run offers, best first, with the one predictions
            currently run against marked. A run keeps its top three, so this is
            normally three entries; fewer where attempts scored identically and
            collapsed, or one on a run of the older pipeline. Empty on a model
            that predates versioned models.
          type: array
          items:
            $ref: '#/components/schemas/ModelVersionOutput'
        createdOn:
          type: string
    ModelVersionOutput:
      description: >-
        One of the models a training run produced, and how it scored on the 20%
        test data. Versions are ordered best first, so the version number is
        also the ranking.
      type: object
      properties:
        version:
          description: >-
            Which version of this model it is. v1 is the best-placed attempt the
            run kept.
          type: string
        champion:
          description: >-
            Whether predictions currently run against this one. Exactly one
            version is the champion; it starts as the best placed and moves when
            the user chooses differently.
          type: boolean
        attemptNumber:
          description: The attempt behind this version, as reported on the run's progress.
          type: integer
          nullable: true
        algorithm:
          description: Alias of the algorithm family that produced it, e.g. BSEV02.
          type: string
          nullable: true
        falseDecisions:
          description: >-
            How many decisions it got wrong. Fewer is better; this is what the
            ranking is on.
          type: integer
          nullable: true
        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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````