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

# Self-hosted HTTP

> Use the Self-hosted HTTP deployment adapters.

> [!NOTE]
>
> Looking for usage documentation? Check out [Classification](https://docs.priorlabs.ai/capabilities/classification.md), [Regression](https://docs.priorlabs.ai/capabilities/regression.md) and [KV cache](https://docs.priorlabs.ai/capabilities/kv-cache.md).

## `hosted.TabPFNClassifier`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/hosted/estimator.py#L330)

TabPFN classifier backed by a self-hosted inference endpoint.

```python theme={null}
hosted.TabPFNClassifier(
    endpoint_url: str,
    api_key: Optional[str] = None,
    extra_headers: Optional[Dict[str, str]] = None,
    model_id: Optional[str] = None,
    model_path: Optional[str] = None,
    model_version: Optional[str] = None,
    fit_mode: Optional[Literal["fit_preprocessors", "low_memory", "fit_with_cache", "batched"]] = None,
    n_estimators: int | None = None,
    softmax_temperature: float | None = None,
    balance_probabilities: bool = False,
    average_before_softmax: bool | None = None,
    inference_precision: Literal["autocast", "auto"] | None = None,
    random_state: int | None = 0,
    inference_config: Dict[str, Any] | None = None,
    n_preprocessing_jobs: int = 4,
    memory_saving_mode: bool | Literal["auto"] | None = None,
    categorical_features_indices: List[int] | None = None,
    timeout_s: float = 300.0,
    payload_format: Literal["json", "parquet"] = "json",
    use_kv_cache: bool = False,
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `endpoint_url` | `str` | Required | — |
| `api_key` | `Optional[str]` | `None` | — |
| `extra_headers` | `Optional[Dict[str, str]]` | `None` | — |
| `model_id` | `Optional[str]` | `None` | — |
| `model_path` | `Optional[str]` | `None` | — |
| `model_version` | `Optional[str]` | `None` | — |
| `fit_mode` | `Optional[Literal["fit_preprocessors", "low_memory", "fit_with_cache", "batched"]]` | `None` | — |
| `n_estimators` | `int \| None` | `None` | — |
| `softmax_temperature` | `float \| None` | `None` | — |
| `balance_probabilities` | `bool` | `False` | — |
| `average_before_softmax` | `bool \| None` | `None` | — |
| `inference_precision` | `Literal["autocast", "auto"] \| None` | `None` | — |
| `random_state` | `int \| None` | `0` | — |
| `inference_config` | `Dict[str, Any] \| None` [`InferenceConfig` options](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-config#inferenceconfig) | `None` | — |
| `n_preprocessing_jobs` | `int` | `4` | — |
| `memory_saving_mode` | `bool \| Literal["auto"] \| None` | `None` | — |
| `categorical_features_indices` | `List[int] \| None` | `None` | — |
| `timeout_s` | `float` | `300.0` | — |
| `payload_format` | `Literal["json", "parquet"]` | `"json"` | — |
| `use_kv_cache` | `bool` | `False` | — |

**Example**

```python theme={null}
from tabpfn_client.hosted import TabPFNClassifier
clf = TabPFNClassifier(
    endpoint_url="https://<your-endpoint>/predict",
    api_key="<optional-bearer-token>",
)
clf.fit(X_train, y_train)
clf.predict(X_test)
clf.predict_proba(X_test)
```

***

## `hosted.TabPFNClassifier.fit`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/hosted/estimator.py#L196)

Store the training data; the endpoint fits on the next `predict*` call.

Clears any `model_id_` captured from an earlier fit.

```python theme={null}
hosted.TabPFNClassifier.fit(
    X: Any,
    y: Any,
) -> "_HostedBase"
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | Training features. |
| `y` | `Any` | Required | Training targets. |

**Returns**

| Type | Description |
| - | - |
| `_HostedBase` | The estimator itself. |

**Raises**

`ValueError`

If `X` and `y` have different numbers of samples.

***

## `hosted.TabPFNClassifier.predict`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/hosted/estimator.py#L346)

Predict class labels for `X`.

```python theme={null}
hosted.TabPFNClassifier.predict(
    X: Any,
) -> np.ndarray
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | — |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | — |

***

## `hosted.TabPFNClassifier.predict_proba`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/hosted/estimator.py#L351)

Predict class probabilities for `X`.

```python theme={null}
hosted.TabPFNClassifier.predict_proba(
    X: Any,
) -> np.ndarray
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | — |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | — |

***

## `hosted.TabPFNRegressor`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/hosted/estimator.py#L357)

TabPFN regressor backed by a self-hosted inference endpoint.

```python theme={null}
hosted.TabPFNRegressor(
    endpoint_url: str,
    api_key: Optional[str] = None,
    extra_headers: Optional[Dict[str, str]] = None,
    model_id: Optional[str] = None,
    model_path: Optional[str] = None,
    model_version: Optional[str] = None,
    fit_mode: Optional[Literal["fit_preprocessors", "low_memory", "fit_with_cache", "batched"]] = None,
    n_estimators: int | None = None,
    softmax_temperature: float | None = None,
    balance_probabilities: bool = False,
    average_before_softmax: bool | None = None,
    inference_precision: Literal["autocast", "auto"] | None = None,
    random_state: int | None = 0,
    inference_config: Dict[str, Any] | None = None,
    n_preprocessing_jobs: int = 4,
    memory_saving_mode: bool | Literal["auto"] | None = None,
    categorical_features_indices: List[int] | None = None,
    timeout_s: float = 300.0,
    payload_format: Literal["json", "parquet"] = "json",
    use_kv_cache: bool = False,
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `endpoint_url` | `str` | Required | — |
| `api_key` | `Optional[str]` | `None` | — |
| `extra_headers` | `Optional[Dict[str, str]]` | `None` | — |
| `model_id` | `Optional[str]` | `None` | — |
| `model_path` | `Optional[str]` | `None` | — |
| `model_version` | `Optional[str]` | `None` | — |
| `fit_mode` | `Optional[Literal["fit_preprocessors", "low_memory", "fit_with_cache", "batched"]]` | `None` | — |
| `n_estimators` | `int \| None` | `None` | — |
| `softmax_temperature` | `float \| None` | `None` | — |
| `balance_probabilities` | `bool` | `False` | — |
| `average_before_softmax` | `bool \| None` | `None` | — |
| `inference_precision` | `Literal["autocast", "auto"] \| None` | `None` | — |
| `random_state` | `int \| None` | `0` | — |
| `inference_config` | `Dict[str, Any] \| None` [`InferenceConfig` options](https://docs.priorlabs.ai/api-reference/python/tabpfn/inference-config#inferenceconfig) | `None` | — |
| `n_preprocessing_jobs` | `int` | `4` | — |
| `memory_saving_mode` | `bool \| Literal["auto"] \| None` | `None` | — |
| `categorical_features_indices` | `List[int] \| None` | `None` | — |
| `timeout_s` | `float` | `300.0` | — |
| `payload_format` | `Literal["json", "parquet"]` | `"json"` | — |
| `use_kv_cache` | `bool` | `False` | — |

**Example**

```python theme={null}
from tabpfn_client.hosted import TabPFNRegressor
reg = TabPFNRegressor(
    endpoint_url="https://<your-endpoint>/predict",
    api_key="<optional-bearer-token>",
)
reg.fit(X_train, y_train)
reg.predict(X_test)
reg.predict(X_test, output_type="quantiles", quantiles=[0.1, 0.5, 0.9])
```

***

## `hosted.TabPFNRegressor.fit`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/hosted/estimator.py#L196)

Store the training data; the endpoint fits on the next `predict*` call.

Clears any `model_id_` captured from an earlier fit.

```python theme={null}
hosted.TabPFNRegressor.fit(
    X: Any,
    y: Any,
) -> "_HostedBase"
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | Training features. |
| `y` | `Any` | Required | Training targets. |

**Returns**

| Type | Description |
| - | - |
| `_HostedBase` | The estimator itself. |

**Raises**

`ValueError`

If `X` and `y` have different numbers of samples.

***

## `hosted.TabPFNRegressor.predict`

[ View source ](https://github.com/PriorLabs/tabpfn-client/blob/ce678cec44dc715f4d835a44990a8f5f115b7acc/src/tabpfn_client/hosted/estimator.py#L373)

Predict regression targets for `X`.

```python theme={null}
hosted.TabPFNRegressor.predict(
    X: Any,
    output_type: str = "mean",
    quantiles: Optional[list] = None,
) -> np.ndarray
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `Any` | Required | Test features. |
| `output_type` | `str` | `"mean"` | Which prediction to return, e.g. "mean", "median" or "quantiles". |
| `quantiles` | `Optional[list]` | `None` | Quantile levels to compute when `output_type` is "quantiles". |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | The endpoint's prediction as an array. |

## Scikit-learn configuration and scoring

The adapters inherit [`get_params`](https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html#sklearn.base.BaseEstimator.get_params), [`set_params`](https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html#sklearn.base.BaseEstimator.set_params), and the corresponding estimator mixin's `score` method. They do not inherit the main hosted client's `save_model`, `load_model`, or model-version selection methods.


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