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

# Accessing Model Weights

TabPFN-2.5, TabPFN-2.6, and TabPFN-3 are released under a [non-commercial license](/models#tabpfn-model-license), which you need to accept before the model files can be downloaded.

## Automatic Setup (recommended)

On first use, TabPFN will automatically open a browser window where you can log in via [PriorLabs](https://ux.priorlabs.ai) and accept the license terms. Your authentication token is cached locally, so you only need to do this once.

```python theme={null}
from tabpfn import TabPFNClassifier

# This will open a browser for login and
# license acceptance on first use
model = TabPFNClassifier()
model.fit(X_train, y_train)
```

### Notebooks

If you run TabPFN via a Notebook, the browser-based setup will not be available. Instead, you can follow these steps:

* Visit [https://ux.priorlabs.ai](https://ux.priorlabs.ai) and log in
* Go to the **Licenses** tab and accept the license
* Go to the **API Keys** tab and copy your API key
* In your notebook:

```python theme={null}
import os
os.environ["TABPFN_TOKEN"] = "<your API key here>"

from tabpfn import TabPFNClassifier

# On first use, this will automatically download
# the model weights using the TABPFN_TOKEN set above
model = TabPFNClassifier()
model.fit(X_train, y_train)
```

### Google Colab

In Colab, it's recommended that you set the `TABPFN_TOKEN` secret so that you don't have to go through the license flow each time:

* Visit [https://ux.priorlabs.ai](https://ux.priorlabs.ai) and log in
* Go to the **Licenses** tab and accept the license
* Go to the **API Keys** tab and copy your API key
* In Colab, select "Secrets" from the left-hand menu
* Create a new secret with name `TABPFN_TOKEN` and value set to your API key
* Ensure that "Notebook access" is enabled

## Manual Setup

For environments where neither a browser nor outbound internet connectivity for downloading the model weights is available:

* Visit [https://ux.priorlabs.ai](https://ux.priorlabs.ai) and log in
* Go to the **Licenses** tab and accept the license
* Click "Model Weights" to download the weights. Place them into a folder `/path/to/tabpfn-weights`
* Set the environment variable `export TABPFN_MODEL_CACHE_DIR=/path/to/tabpfn-weights`
* Run your script:

```python theme={null}
from tabpfn import TabPFNClassifier

# This will respect the TABPFN_MODEL_CACHE_DIR environment variable
# and not make any outbound network calls for downloading the weights.
model = TabPFNClassifier()
model.fit(X_train, y_train)
```

You can also set `TABPFN_NO_BROWSER` to disable the automatic browser login if needed (e.g. in environments where opening a browser is undesirable).
If access via any of these options is not an option for you, please contact us at [sales@priorlabs.ai](mailto:sales@priorlabs.ai).
