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

> ## Agent Instructions
> TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.
> For large datasets, use per-estimator subsampling, e.g. inference_config={"SUBSAMPLE_SAMPLES": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.
> Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed.

# Get prediction result

> Poll with the fitted test set ID. While the prediction is pending, wait retry_in_secs before polling again. On completion, read prediction and metadata. A failed prediction returns HTTP 200 with its error. An unknown ID returns HTTP 404.



## OpenAPI

````yaml /api-reference/openapi.json post /tabpfn/get_predict_result
openapi: 3.1.0
info:
  title: TabPFN API
  description: >-
    TabPFN REST API. For Python applications, use
    [tabpfn-client](/api-reference/overview). See the [REST
    quickstart](/api/rest-quickstart) for authentication and the upload, fit,
    and predict flow.
  version: 2.0.0
  contact:
    name: Prior Labs
    email: hello@priorlabs.ai
servers:
  - url: https://api.priorlabs.ai
    description: Production TabPFN API
security:
  - BearerAuth: []
paths:
  /tabpfn/get_predict_result:
    post:
      tags:
        - Prediction
      summary: Get prediction result
      description: >-
        Poll with the fitted test set ID. While the prediction is pending, wait
        retry_in_secs before polling again. On completion, read prediction and
        metadata. A failed prediction returns HTTP 200 with its error. An
        unknown ID returns HTTP 404.
      operationId: tabpfn_get_predict_result
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPredictResultRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPredictResultResponse'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
          description: Not Found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Default Response
components:
  schemas:
    GetPredictResultRequest:
      properties:
        fitted_test_set_id:
          format: uuid
          title: Fitted Test Set Id
          type: string
      additionalProperties: false
      type: object
      required:
        - fitted_test_set_id
      title: GetPredictResultRequest
    GetPredictResultResponse:
      properties:
        fitted_test_set_id:
          format: uuid
          title: Fitted Test Set Id
          type: string
        status:
          $ref: '#/components/schemas/PredictStatus'
        retry_in_secs:
          anyOf:
            - type: number
            - type: 'null'
          title: Retry In Secs
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        prediction:
          anyOf:
            - items: {}
              type: array
            - items:
                items: {}
                type: array
              type: array
            - additionalProperties:
                anyOf:
                  - items: {}
                    type: array
                  - items:
                      items: {}
                      type: array
                    type: array
              type: object
            - type: 'null'
          title: Prediction
        metadata:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ClassifierMetadata'
                - $ref: '#/components/schemas/RegressorMetadata'
              discriminator:
                propertyName: task
                mapping:
                  classification: '#/components/schemas/ClassifierMetadata'
                  regression: '#/components/schemas/RegressorMetadata'
            - type: 'null'
          title: Metadata
        timings:
          anyOf:
            - $ref: '#/components/schemas/PredictTimings'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - fitted_test_set_id
        - status
      title: GetPredictResultResponse
    NotFoundErrorResponse:
      additionalProperties: false
      properties:
        message:
          description: What went wrong.
          title: Message
          type: string
        error_code:
          default: NOT_FOUND
          title: Error Code
          type: string
          x-sdk-keep-default: true
        trace_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: Id to quote when reporting the error.
          title: Trace Id
      required:
        - message
      title: NotFoundErrorResponse
      type: object
    ErrorResponse:
      additionalProperties: false
      properties:
        message:
          description: What went wrong.
          title: Message
          type: string
        error_code:
          default: GENERAL_ERROR
          description: Machine-readable error category, such as `BUSY`.
          title: Error Code
          type: string
          x-sdk-keep-default: true
        trace_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: Id to quote when reporting the error.
          title: Trace Id
      required:
        - message
      title: ErrorResponse
      type: object
    PredictStatus:
      description: Status of a predict job.
      enum:
        - pending
        - completed
        - failed
      title: PredictStatus
      type: string
    ClassifierMetadata:
      additionalProperties: false
      properties:
        test_set_num_rows:
          description: Number of rows that the model predicted.
          title: Test Set Num Rows
          type: integer
        test_set_num_cols:
          description: >-
            Number of columns after encoding. This number can be different from
            the number of columns that you sent.
          title: Test Set Num Cols
          type: integer
        n_estimators:
          anyOf:
            - type: integer
            - type: 'null'
          description: Ensemble size that the request used. Null when no ensemble ran.
          title: N Estimators
        billing_model_version:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The model version for the usage count of the request. Null when not
            reported.
          title: Billing Model Version
        execution_mode:
          anyOf:
            - type: string
              enum:
                - standard
                - thinking
                - cache
            - type: 'null'
          description: How the server ran the request. Null when not reported.
          title: Execution Mode
        cache_outcome:
          anyOf:
            - type: string
              enum:
                - not_requested
                - hit
                - miss
                - fallback
            - type: 'null'
          description: >-
            hit: the serving worker already had the kept fit loaded. miss: the
            worker loaded the kept fit from storage without refitting. fallback:
            the prediction ran without the kept fit. not_requested: the fit was
            not kept. Null when not reported.
          title: Cache Outcome
        task:
          const: classification
          default: classification
          description: The type of prediction.
          title: Task
          type: string
        package_version:
          description: Version of the TabPFN package that made the prediction.
          title: Package Version
          type: string
        tabpfn_config:
          $ref: '#/components/schemas/ClassifierTabPFNConfig'
          description: The model settings that the request used.
        classes:
          anyOf:
            - items:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
              type: array
            - type: 'null'
          description: >-
            Class labels in ascending order. They name the columns of `probas`
            and the labels of `preds`. Null with `top_k`, because `top_k` has
            its own `prediction.classes`.
          title: Classes
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          description: The `top_k` value of the request.
          title: Top K
      required:
        - test_set_num_rows
        - test_set_num_cols
        - package_version
        - tabpfn_config
      title: ClassifierMetadata
      type: object
    RegressorMetadata:
      additionalProperties: false
      properties:
        test_set_num_rows:
          description: Number of rows that the model predicted.
          title: Test Set Num Rows
          type: integer
        test_set_num_cols:
          description: >-
            Number of columns after encoding. This number can be different from
            the number of columns that you sent.
          title: Test Set Num Cols
          type: integer
        n_estimators:
          anyOf:
            - type: integer
            - type: 'null'
          description: Ensemble size that the request used. Null when no ensemble ran.
          title: N Estimators
        billing_model_version:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The model version for the usage count of the request. Null when not
            reported.
          title: Billing Model Version
        execution_mode:
          anyOf:
            - type: string
              enum:
                - standard
                - thinking
                - cache
            - type: 'null'
          description: How the server ran the request. Null when not reported.
          title: Execution Mode
        cache_outcome:
          anyOf:
            - type: string
              enum:
                - not_requested
                - hit
                - miss
                - fallback
            - type: 'null'
          description: >-
            hit: the serving worker already had the kept fit loaded. miss: the
            worker loaded the kept fit from storage without refitting. fallback:
            the prediction ran without the kept fit. not_requested: the fit was
            not kept. Null when not reported.
          title: Cache Outcome
        task:
          const: regression
          default: regression
          description: The type of prediction.
          title: Task
          type: string
        package_version:
          description: Version of the TabPFN package that made the prediction.
          title: Package Version
          type: string
        tabpfn_config:
          $ref: '#/components/schemas/RegressorTabPFNConfig'
          description: The model settings that the request used.
      required:
        - test_set_num_rows
        - test_set_num_cols
        - package_version
        - tabpfn_config
      title: RegressorMetadata
      type: object
    PredictTimings:
      additionalProperties: false
      description: |-
        Where a predict's time went, per stage. Queue wait covers everything
        outside worker processing: waiting for a free worker and transport.
      properties:
        test_set_transform_queue_wait_s:
          anyOf:
            - type: number
            - type: 'null'
          description: Seconds the test set transform waited for a worker.
          title: Test Set Transform Queue Wait S
        test_set_transform_s:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            Seconds a worker spent loading, validating and preprocessing the
            test set.
          title: Test Set Transform S
        predict_queue_wait_s:
          anyOf:
            - type: number
            - type: 'null'
          description: Seconds the prediction waited for a worker.
          title: Predict Queue Wait S
        predict_s:
          anyOf:
            - type: number
            - type: 'null'
          description: Seconds a worker spent predicting.
          title: Predict S
      title: PredictTimings
      type: object
    ClassifierTabPFNConfig:
      additionalProperties: false
      properties:
        n_estimators:
          anyOf:
            - type: integer
              maximum: 8
              minimum: 1
            - type: 'null'
          description: >-
            Ensemble size. The model averages this number of forward passes, and
            each pass uses a different preprocessed view of the data. If unset,
            TabPFN selects the size. It selects 8 for most data. For wide
            tables, it selects more, so that each column gets to at least one
            ensemble member.
          title: N Estimators
        categorical_features_indices:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            0-based indices of the categorical columns. If unset, the model
            finds the categorical columns.
          title: Categorical Features Indices
        softmax_temperature:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            A lower value makes the predicted probabilities more confident. The
            value 1.0 has no effect. If unset, the model uses its default value.
          title: Softmax Temperature
        average_before_softmax:
          anyOf:
            - type: boolean
            - type: string
              const: auto
            - type: 'null'
          description: >-
            If true, the model averages the logits of the ensemble members
            before the softmax. If false, it averages their probabilities after
            the softmax. `auto` takes the setting of the checkpoint, as does
            unset. A true or false value cannot be combined with
            `AVERAGE_BEFORE_SOFTMAX` in `inference_config`.
          title: Average Before Softmax
        random_state:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Random seed. The same seed gives the same results. If unset, TabPFN
            uses its default seed.
          title: Random State
        inference_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Advanced inference settings. See
            `tabpfn.inference_config.InferenceConfig` in the TabPFN package.
          title: Inference Config
        inference_precision:
          anyOf:
            - type: string
              enum:
                - autocast
                - auto
            - type: 'null'
          description: >-
            `autocast` always uses mixed precision. `auto` selects the precision
            from the hardware.
          title: Inference Precision
        ignore_pretraining_limits:
          default: true
          description: >-
            If true, the server accepts data outside the size ranges of the
            model's pre-training, and predictions on that data may be worse. If
            false, the server rejects that data.
          title: Ignore Pretraining Limits
          type: boolean
        n_preprocessing_jobs:
          default: 4
          description: Number of worker processes for preprocessing.
          title: N Preprocessing Jobs
          type: integer
        fit_mode:
          $ref: '#/components/schemas/FitMode'
          default: fit_preprocessors
          description: >-
            How the model prepares and keeps the fit. With `fit_with_cache`, the
            server keeps the fit, and later requests can use it again. Not all
            servers support `fit_with_cache`.
        device:
          anyOf:
            - items:
                type: string
              type: array
              minItems: 1
            - type: 'null'
          description: >-
            Devices for the request, such as `cuda:0`. If unset, the server
            selects the devices.
          title: Device
        memory_saving_mode:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, the model divides parts of the computation into batches to
            use less memory. If unset, the model decides.
          title: Memory Saving Mode
        model_path:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The checkpoint, by file name or model name. If unset, the server
            uses its default checkpoint.
          title: Model Path
        balance_probabilities:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, the model adjusts the probabilities for the class
            distribution of the training data. This can help with imbalanced
            classes when the metric ignores class imbalance, such as balanced
            accuracy.
          title: Balance Probabilities
        presets:
          anyOf:
            - type: string
              enum:
                - zero_inflated
                - grouped
            - items:
                type: string
                enum:
                  - zero_inflated
                  - grouped
              type: array
            - type: 'null'
          title: Presets
          description: >-
            Names of bundles of inference settings. `zero_inflated` is for
            regression targets with many exact zeros. `grouped` pools the
            predictions of a group and needs `group_col`; predict all rows of a
            group in one request. Several presets combine. Presets that set one
            setting to different values are rejected. The keys of
            `inference_config` win over every preset. If unset, the model uses
            the settings of its checkpoint.
        group_col:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Group Col
          description: >-
            The column that says which group a row belongs to, such as a
            patient, or a list of columns whose joint value is the group. The
            model replaces them with one categorical feature. Fit and predict
            data must hold these columns. With a v4 model, when every training
            group has one label, the model also adds per-group summaries of the
            features, and the response's `inference_config` shows
            `APPEND_GROUP_AGGREGATES`. A request computes them over the rows of
            each group it holds, so predict all rows of a group in one request.
            Set `APPEND_GROUP_AGGREGATES` or `presets` to decide yourself.
            Thinking mode takes `group_col` in `thinking_config` instead.
      title: ClassifierTabPFNConfig
      type: object
    RegressorTabPFNConfig:
      additionalProperties: false
      properties:
        n_estimators:
          anyOf:
            - type: integer
              maximum: 8
              minimum: 1
            - type: 'null'
          description: >-
            Ensemble size. The model averages this number of forward passes, and
            each pass uses a different preprocessed view of the data. If unset,
            TabPFN selects the size. It selects 8 for most data. For wide
            tables, it selects more, so that each column gets to at least one
            ensemble member.
          title: N Estimators
        categorical_features_indices:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            0-based indices of the categorical columns. If unset, the model
            finds the categorical columns.
          title: Categorical Features Indices
        softmax_temperature:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            A lower value makes the predicted probabilities more confident. The
            value 1.0 has no effect. If unset, the model uses its default value.
          title: Softmax Temperature
        average_before_softmax:
          anyOf:
            - type: boolean
            - type: string
              const: auto
            - type: 'null'
          description: >-
            If true, the model averages the logits of the ensemble members
            before the softmax. If false, it averages their probabilities after
            the softmax. `auto` takes the setting of the checkpoint, as does
            unset. A true or false value cannot be combined with
            `AVERAGE_BEFORE_SOFTMAX` in `inference_config`.
          title: Average Before Softmax
        random_state:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Random seed. The same seed gives the same results. If unset, TabPFN
            uses its default seed.
          title: Random State
        inference_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Advanced inference settings. See
            `tabpfn.inference_config.InferenceConfig` in the TabPFN package.
          title: Inference Config
        inference_precision:
          anyOf:
            - type: string
              enum:
                - autocast
                - auto
            - type: 'null'
          description: >-
            `autocast` always uses mixed precision. `auto` selects the precision
            from the hardware.
          title: Inference Precision
        ignore_pretraining_limits:
          default: true
          description: >-
            If true, the server accepts data outside the size ranges of the
            model's pre-training, and predictions on that data may be worse. If
            false, the server rejects that data.
          title: Ignore Pretraining Limits
          type: boolean
        n_preprocessing_jobs:
          default: 4
          description: Number of worker processes for preprocessing.
          title: N Preprocessing Jobs
          type: integer
        fit_mode:
          $ref: '#/components/schemas/FitMode'
          default: fit_preprocessors
          description: >-
            How the model prepares and keeps the fit. With `fit_with_cache`, the
            server keeps the fit, and later requests can use it again. Not all
            servers support `fit_with_cache`.
        device:
          anyOf:
            - items:
                type: string
              type: array
              minItems: 1
            - type: 'null'
          description: >-
            Devices for the request, such as `cuda:0`. If unset, the server
            selects the devices.
          title: Device
        memory_saving_mode:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, the model divides parts of the computation into batches to
            use less memory. If unset, the model decides.
          title: Memory Saving Mode
        model_path:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The checkpoint, by file name or model name. If unset, the server
            uses its default checkpoint.
          title: Model Path
        presets:
          anyOf:
            - type: string
              enum:
                - zero_inflated
                - grouped
            - items:
                type: string
                enum:
                  - zero_inflated
                  - grouped
              type: array
            - type: 'null'
          title: Presets
          description: >-
            Names of bundles of inference settings. `zero_inflated` is for
            regression targets with many exact zeros. `grouped` pools the
            predictions of a group and needs `group_col`; predict all rows of a
            group in one request. Several presets combine. Presets that set one
            setting to different values are rejected. The keys of
            `inference_config` win over every preset. If unset, the model uses
            the settings of its checkpoint.
        group_col:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Group Col
          description: >-
            The column that says which group a row belongs to, such as a
            patient, or a list of columns whose joint value is the group. The
            model replaces them with one categorical feature. Fit and predict
            data must hold these columns. With a v4 model, when every training
            group has one label, the model also adds per-group summaries of the
            features, and the response's `inference_config` shows
            `APPEND_GROUP_AGGREGATES`. A request computes them over the rows of
            each group it holds, so predict all rows of a group in one request.
            Set `APPEND_GROUP_AGGREGATES` or `presets` to decide yourself.
            Thinking mode takes `group_col` in `thinking_config` instead.
      title: RegressorTabPFNConfig
      type: object
    FitMode:
      enum:
        - low_memory
        - fit_preprocessors
        - fit_with_cache
        - batched
      title: FitMode
      type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token for authentication, obtained after signing up and
        generating an API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.