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

# Predict (TabPFN JSON API)

> Predict using uploaded test features and a fitted training set. Select classification or regression in `task_config`; its `predict_params` controls the output. The response contains predictions, model metadata, and optional stage timings. Long-running requests may include keepalive whitespace before the final JSON payload.



## OpenAPI

````yaml /api-reference/openapi.json post /tabpfn/predict
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/predict:
    post:
      tags:
        - Prediction
      summary: Predict (TabPFN JSON API)
      description: >-
        Predict using uploaded test features and a fitted training set. Select
        classification or regression in `task_config`; its `predict_params`
        controls the output. The response contains predictions, model metadata,
        and optional stage timings. Long-running requests may include keepalive
        whitespace before the final JSON payload.
      operationId: tabpfn_predict
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictRequest'
            example:
              test_set_upload_id: 33333333-3333-4333-8333-333333333333
              fitted_train_set_id: 22222222-2222-4222-8222-222222222222
              task_config:
                task: classification
                predict_params:
                  output_type: probas
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PredictRequest:
      additionalProperties: false
      properties:
        test_set_upload_id:
          format: uuid
          title: Test Set Upload Id
          type: string
        fitted_train_set_id:
          format: uuid
          title: Fitted Train Set Id
          type: string
        task_config:
          discriminator:
            mapping:
              classification: '#/components/schemas/ClassifierConfig'
              regression: '#/components/schemas/RegressorConfig'
            propertyName: task
          oneOf:
            - $ref: '#/components/schemas/ClassifierConfig'
            - $ref: '#/components/schemas/RegressorConfig'
          title: Task Config
      required:
        - test_set_upload_id
        - fitted_train_set_id
        - task_config
      title: PredictRequest
      type: object
    PredictResponse:
      additionalProperties: false
      properties:
        prediction:
          anyOf:
            - items: {}
              type: array
            - items:
                items: {}
                type: array
              type: array
            - additionalProperties:
                anyOf:
                  - items: {}
                    type: array
                  - items:
                      items: {}
                      type: array
                    type: array
              type: object
          title: Prediction
        metadata:
          discriminator:
            mapping:
              classification: '#/components/schemas/ClassifierMetadata'
              regression: '#/components/schemas/RegressorMetadata'
            propertyName: task
          oneOf:
            - $ref: '#/components/schemas/ClassifierMetadata'
            - $ref: '#/components/schemas/RegressorMetadata'
          title: Metadata
        timings:
          anyOf:
            - $ref: '#/components/schemas/PredictTimings'
            - type: 'null'
          default: null
      required:
        - prediction
        - metadata
      title: PredictResponse
      type: object
    ErrorResponse:
      additionalProperties: false
      properties:
        message:
          title: Message
          type: string
        error_code:
          default: GENERAL_ERROR
          title: Error Code
          type: string
          x-sdk-keep-default: true
        trace_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          default: null
          title: Trace Id
      required:
        - message
      title: ErrorResponse
      type: object
    ClassifierConfig:
      additionalProperties: false
      properties:
        task:
          const: classification
          default: classification
          title: Task
          type: string
        tabpfn_config:
          $ref: '#/components/schemas/ClassifierTabPFNConfig'
        predict_params:
          $ref: '#/components/schemas/ClassifierPredictParams'
      title: ClassifierConfig
      type: object
    RegressorConfig:
      additionalProperties: false
      properties:
        task:
          const: regression
          default: regression
          title: Task
          type: string
        tabpfn_config:
          $ref: '#/components/schemas/RegressorTabPFNConfig'
        predict_params:
          $ref: '#/components/schemas/RegressorPredictParams'
      title: RegressorConfig
      type: object
    ClassifierMetadata:
      additionalProperties: false
      properties:
        test_set_num_rows:
          title: Test Set Num Rows
          type: integer
        test_set_num_cols:
          title: Test Set Num Cols
          type: integer
        n_estimators:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: N Estimators
        billing_model_version:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Billing Model Version
        execution_mode:
          anyOf:
            - enum:
                - standard
                - thinking
                - cache
              type: string
            - type: 'null'
          default: null
          title: Execution Mode
        cache_outcome:
          anyOf:
            - enum:
                - not_requested
                - hit
                - miss
                - fallback
              type: string
            - type: 'null'
          default: null
          title: Cache Outcome
        task:
          const: classification
          default: classification
          title: Task
          type: string
        package_version:
          title: Package Version
          type: string
        tabpfn_config:
          $ref: '#/components/schemas/ClassifierTabPFNConfig'
        classes:
          anyOf:
            - items:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
              type: array
            - type: 'null'
          default: null
          title: Classes
        top_k:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          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:
          title: Test Set Num Rows
          type: integer
        test_set_num_cols:
          title: Test Set Num Cols
          type: integer
        n_estimators:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: N Estimators
        billing_model_version:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Billing Model Version
        execution_mode:
          anyOf:
            - enum:
                - standard
                - thinking
                - cache
              type: string
            - type: 'null'
          default: null
          title: Execution Mode
        cache_outcome:
          anyOf:
            - enum:
                - not_requested
                - hit
                - miss
                - fallback
              type: string
            - type: 'null'
          default: null
          title: Cache Outcome
        task:
          const: regression
          default: regression
          title: Task
          type: string
        package_version:
          title: Package Version
          type: string
        tabpfn_config:
          $ref: '#/components/schemas/RegressorTabPFNConfig'
      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. A
        refit

        the server triggers counts towards the stage it happened in.
      properties:
        test_set_transform_queue_wait_s:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: >-
            Seconds the test set transform waited for a worker. Null when an
            earlier request already transformed this test set.
          title: Test Set Transform Queue Wait S
        test_set_transform_s:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: >-
            Seconds a worker spent loading, validating and preprocessing the
            test set. Null when an earlier request already transformed this test
            set.
          title: Test Set Transform S
        predict_queue_wait_s:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: Seconds the prediction waited for a worker.
          title: Predict Queue Wait S
        predict_s:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: Seconds a worker spent predicting.
          title: Predict S
      title: PredictTimings
      type: object
    ClassifierTabPFNConfig:
      additionalProperties: false
      properties:
        n_estimators:
          anyOf:
            - maximum: 8
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          title: N Estimators
        categorical_features_indices:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Categorical Features Indices
        softmax_temperature:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Softmax Temperature
        average_before_softmax:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Average Before Softmax
        random_state:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Random State
        inference_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: Refer to tabpfn.inference_config.InferenceConfig for more details.
          title: Inference Config
        inference_precision:
          anyOf:
            - enum:
                - autocast
                - auto
              type: string
            - type: 'null'
          default: null
          title: Inference Precision
        ignore_pretraining_limits:
          default: true
          title: Ignore Pretraining Limits
          type: boolean
        n_preprocessing_jobs:
          default: 4
          title: N Preprocessing Jobs
          type: integer
        fit_mode:
          $ref: '#/components/schemas/FitMode'
          default: fit_preprocessors
        device:
          anyOf:
            - items:
                type: string
              minItems: 1
              type: array
            - type: 'null'
          default: null
          description: Stringified `torch.device`s
          title: Device
        memory_saving_mode:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Memory Saving Mode
        model_path:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Model Path
        balance_probabilities:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Balance Probabilities
      title: ClassifierTabPFNConfig
      type: object
    ClassifierPredictParams:
      additionalProperties: false
      properties:
        output_type:
          $ref: '#/components/schemas/ClassifierOutputType'
          default: probas
        top_k:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          default: null
          title: Top K
      title: ClassifierPredictParams
      type: object
    RegressorTabPFNConfig:
      additionalProperties: false
      properties:
        n_estimators:
          anyOf:
            - maximum: 8
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          title: N Estimators
        categorical_features_indices:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          default: null
          title: Categorical Features Indices
        softmax_temperature:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Softmax Temperature
        average_before_softmax:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Average Before Softmax
        random_state:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Random State
        inference_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: Refer to tabpfn.inference_config.InferenceConfig for more details.
          title: Inference Config
        inference_precision:
          anyOf:
            - enum:
                - autocast
                - auto
              type: string
            - type: 'null'
          default: null
          title: Inference Precision
        ignore_pretraining_limits:
          default: true
          title: Ignore Pretraining Limits
          type: boolean
        n_preprocessing_jobs:
          default: 4
          title: N Preprocessing Jobs
          type: integer
        fit_mode:
          $ref: '#/components/schemas/FitMode'
          default: fit_preprocessors
        device:
          anyOf:
            - items:
                type: string
              minItems: 1
              type: array
            - type: 'null'
          default: null
          description: Stringified `torch.device`s
          title: Device
        memory_saving_mode:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Memory Saving Mode
        model_path:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Model Path
      title: RegressorTabPFNConfig
      type: object
    RegressorPredictParams:
      additionalProperties: false
      properties:
        output_type:
          $ref: '#/components/schemas/RegressorOutputType'
          default: mean
        quantiles:
          anyOf:
            - items:
                maximum: 1
                minimum: 0
                type: number
              type: array
            - type: 'null'
          default: null
          title: Quantiles
      title: RegressorPredictParams
      type: object
    FitMode:
      enum:
        - low_memory
        - fit_preprocessors
        - fit_with_cache
        - batched
      title: FitMode
      type: string
    ClassifierOutputType:
      enum:
        - probas
        - preds
        - top_k
      title: ClassifierOutputType
      type: string
    RegressorOutputType:
      enum:
        - mean
        - median
        - mode
        - quantiles
        - full
        - main
      title: RegressorOutputType
      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.