> ## 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.

# Feature refinement progress



## OpenAPI

````yaml api-reference/openapi.yaml GET /api/v1/feature-refinery/{featureRefinementKey}/progress
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/feature-refinery/{featureRefinementKey}/progress:
    get:
      tags:
        - Feature Refinery
      summary: Feature refinement progress
      operationId: getFeatureRefinementProgress
      parameters:
        - name: featureRefinementKey
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureRefineryProgressOutput'
        '404':
          description: Unknown feature refinement key
        '500':
          description: Internal server error
components:
  schemas:
    FeatureRefineryProgressOutput:
      description: >-
        Progress of a feature refinement — the current state, elapsed time, a
        recent activity trail, and the baseline vs current top performances,
        which together show how refinement is improving the model.
      type: object
      properties:
        featureRefinementKey:
          type: string
          format: uuid
        state:
          type: string
          description: >-
            The run's lifecycle state. It advances PENDING → SETUP_* →
            MEASURE_INITIAL_THRESHOLD* → BASELINE_RUN_* → REFINING_LOOP_* →
            CREATING_RESULT → REFINEMENT_COMPLETED. The terminal states are
            REFINEMENT_COMPLETED (success), ERROR and TIMEOUT (failures), and
            CANCELLED; once terminal, the state no longer changes and
            elapsedSeconds is frozen. Poll until the state is terminal.
        createdOn:
          type: string
          description: >-
            When the refinement was created, ISO-8601 UTC. Present from
            creation, so a run's age is available while it is still pending.
        elapsedSeconds:
          type: integer
          format: int64
          description: >-
            Seconds the run has been processing — counted from when it started,
            not from creation. 0 while pending.
        progressCompleted:
          type: integer
          nullable: true
          description: >-
            Units of processing work completed so far, out of progressTotal. It
            increases by one as each unit finishes and never decreases; it is
            null (or 0) until the work has begun, and equals progressTotal once
            the run completes. Pair it with progressTotal for a determinate
            progress ratio. The unit is an internal measure with no standalone
            meaning and may change, so rely only on the ratio of the two and
            never on the raw numbers.
        progressTotal:
          type: integer
          nullable: true
          description: >-
            Total units of processing work for the run — the denominator for
            progressCompleted. Fixed for the life of the run once it is known;
            null while it is not yet known, in which case treat progress as
            indeterminate.
        cancelRequested:
          type: boolean
          nullable: true
          description: >-
            True once a cancel has been requested for this run, and it stays set
            — it is NOT cleared when the run reaches its terminal CANCELLED
            state, so a cancelled run keeps cancelRequested=true. It is
            therefore safe to rely on after a restart, rather than remembering
            the request locally. Treat it as meaningful only while the state is
            non-terminal; once terminal, state is authoritative. Omitted (null)
            when no cancel was ever requested.
        errorReason:
          type: string
          nullable: true
          description: >-
            Why the run stopped — present only when state is ERROR or TIMEOUT,
            null otherwise. Taken from the failure entry on the activity trail.
        recentActivities:
          type: array
          items:
            $ref: '#/components/schemas/ProgressActivity'
        baselineTopPerformances:
          description: >-
            Top model performances before refining, using all columns. Empty
            until the baseline is computed.
          type: array
          items:
            $ref: '#/components/schemas/PerformanceRow'
        currentTopPerformances:
          description: >-
            Top model performances on the feature set as it currently stands.
            Equals the baseline at the start and improves as the run progresses.
          type: array
          items:
            $ref: '#/components/schemas/PerformanceRow'
    ProgressActivity:
      description: >-
        One lifecycle entry on the public progress trail — the state and when it
        was reached. No free-text detail: the failure summary is on the progress
        errorReason field, and the full per-entry detail is kept on the
        ops-token view.
      type: object
      properties:
        timestamp:
          type: string
          description: ISO-8601 UTC instant (e.g. 2026-07-28T00:33:38.028Z).
        state:
          type: string
    PerformanceRow:
      description: >-
        One model's performance on the blind test set. Top-performance results
        are the best distinct results, ranked by fewest false decisions.
      type: object
      properties:
        falseDecisions:
          type: integer
          description: Number of wrong predictions on the test set (fewer is better).
        accuracy:
          type: number
          format: double
          nullable: true
          description: Null when the metric is undefined for this model (see recall).
        f1Score:
          type: number
          format: double
          nullable: true
          description: Null when the metric is undefined for this model (see recall).
        precision:
          type: number
          format: double
          nullable: true
          description: Null when the metric is undefined for this model (see recall).
        recall:
          type: number
          format: double
          nullable: true
          description: >-
            Null when the metric is undefined rather than zero — e.g. a test set
            slice with no positive cases leaves recall undefined, which is not
            the same as a model that recalled none of them. Treat an undefined
            metric as absent, never as 0.
        best:
          type: boolean
          description: >-
            True for the single best row in its table (the one with the fewest
            false decisions).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````