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

# Exceptions

> Handle missing fitted models, interactive login failures, and Foundry errors.

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

## `FittedModelNotFoundError`

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

The server has no fitted model for the id the estimator refers to.

Raised by `predict` when `model_id_` -- set by `fit()`, restored by
`load_model()` or assigned directly -- is unknown to the server: the fitted
model was deleted (for instance through [`UserDataClient`](https://docs.priorlabs.ai/api-reference/python/tabpfn-client/user-data#user-data-client)), or it belongs to
a different account. Call `fit()` again to create a new one.

***

## `InteractiveLoginError`

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

Raised when an interactive login cannot be completed.

***

## `foundry.FoundryEndpointError`

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

A non-2xx answer from the Foundry endpoint, with its error payload.

Subclasses [`httpx.HTTPStatusError`](https://www.python-httpx.org/exceptions/#httpx.HTTPStatusError), so callers that already catch that
keep working. The endpoint reports failures as a JSON body carrying
`error_code` and `trace_id`; both are surfaced on the exception (and in
its message) because the `trace_id` is what the endpoint provider needs
in order to look the failure up server-side.

```python theme={null}
foundry.FoundryEndpointError(
    message: str,
    *,
    request: Any,
    response: Any,
    error_code: Optional[str] = None,
    trace_id: Optional[str] = None,
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `message` | `str` | Required | — |
| `request` | `Any` | Required | — |
| `response` | `Any` | Required | — |
| `error_code` | `Optional[str]` | `None` | — |
| `trace_id` | `Optional[str]` | `None` | — |

***

## `FitFailedError`

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

The server reports that a fit it accepted has failed.

Raised by `fit()` and `wait_for_fit()` when they poll the server for the
outcome of a fit, as `fit()` does in ASYNC mode. The message holds the
server's reason.

***

## `PredictFailedError`

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

The server reports that a prediction it created has failed.

Raised by `predict()`, `submit_predict()` and `wait_for_predict()`,
whether the server reports the failure in answer to the prediction request
itself or to a poll for the prediction. The message holds the server's
reason and its error code, and `fitted_test_set_id` the id of the
prediction.

Initialize the error.

```python theme={null}
PredictFailedError(
    message: str,
    *,
    fitted_test_set_id: UUID | None = None,
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `message` | `str` | Required | The error message. |
| `fitted_test_set_id` | `UUID \| None` | `None` | The id of the prediction that failed, or `None` if it is not known. |

***

## `RefitRequiredError`

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

The fitted model can no longer predict: call `fit()` again.

Raised by `predict()`, `submit_predict()` and `wait_for_predict()`
when the server cannot predict with the fit `model_id_` refers to: an
earlier version of the service created it, or its cached state is no longer
valid. The server's error code says which: `NEEDS_REFITTING` or
`KV_CACHE_INVALID`. The message holds the server's reason.

Initialize the error.

```python theme={null}
RefitRequiredError(
    message: str,
    *,
    fitted_test_set_id: UUID | None = None,
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `message` | `str` | Required | The error message. |
| `fitted_test_set_id` | `UUID \| None` | `None` | The id of the prediction that failed, or `None` if it is not known. |


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