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

> Get prediction



## OpenAPI

````yaml api-reference/openapi.yaml GET /api/v1/predictions/{predictionKey}
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/predictions/{predictionKey}:
    get:
      tags:
        - Predictions
      summary: Get prediction detail
      description: Get prediction
      operationId: getPredictionDetail
      parameters:
        - name: predictionKey
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Prediction detail successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionDetail'
              examples:
                Successful prediction detail response:
                  summary: Successful prediction detail response
                  value:
                    predictionKey: 3a1a9a83-d549-4f25-b7ed-8174e0c955de
                    modelKey: 4a1a9a83-d549-4f25-b7ed-8174e0c955da
                    datasetKey: 2b0a9a83-d549-4f25-b7ed-8174e0c955cd
                    targetPerformance: 0.87
                    achievedPerformance: 0.89
                    status: COMPLETED
                    predictionResultUrl: https://server/prediction-result.csv
        '400':
          description: Invalid prediction detail request
        '500':
          description: Internal server error
components:
  schemas:
    PredictionDetail:
      required:
        - predictionKey
        - modelKey
        - datasetKey
        - status
      type: object
      properties:
        predictionKey:
          pattern: >-
            ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
          type: string
          format: uuid
          example: 3a1a9a83-d549-4f25-b7ed-8174e0c955de
        modelKey:
          pattern: >-
            ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
          type: string
          format: uuid
          example: 4a1a9a83-d549-4f25-b7ed-8174e0c955da
        datasetKey:
          pattern: >-
            ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
          type: string
          format: uuid
          example: c3a9a83-d549-4f25-b7ed-8174e0c955da
        status:
          $ref: '#/components/schemas/PredictionStatus'
        modelVersion:
          description: >-
            The version of the model this prediction actually ran against,
            recorded when it ran. A run always goes against whichever version
            was the champion at the time, so this is the only thing that says
            which one that was — re-pointing the champion afterwards does not
            change what an earlier prediction meant.
          type: string
          nullable: true
        predictionResultDownloadUrl:
          type: string
        createdOn:
          type: string
        metadata:
          $ref: '#/components/schemas/PredictionMetadata'
        errors:
          $ref: '#/components/schemas/PredictionErrors'
        warnings:
          $ref: '#/components/schemas/PredictionWarnings'
    PredictionStatus:
      title: PredictionStatus
      x-displayName: PredictionStatus
      type: string
      description: >+
        Status of prediction processing: 


        * `PENDING` - The prediction has been successfully created and is
        pending execution

        * `RUNNING` - The prediction is currently being processed. When this
        status is returned, an url for progress check is returned too

        * `COMPLETED` - The prediction has been successfully completed. An url
        to download the result as CSV is provided in the response

        * `FAILED` - The prediction execution has failed

        * `TIMEOUT` - The prediction execution has timed out

      enum:
        - PENDING
        - RUNNING
        - COMPLETED
        - FAILED
        - TIMEOUT
      x-enumDescriptions:
        - Waiting to start
        - Actively processing
        - Finished successfully
        - Finished with error
        - Exceeded time limit
    PredictionMetadata:
      type: object
      properties:
        numberOfColumns:
          type: integer
        numberOfRows:
          type: integer
        titlesOfDataColumns:
          type: string
        columnTypes:
          type: string
    PredictionErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
    PredictionWarnings:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````