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

# Control token costs

> What a session uses on Claude and on the TabPFN API, how to see it, and how to spend less.

A session uses two services: Claude, for the agent that writes the experiments, and the TabPFN API, which fits and scores them. Claude tells you what the budget takes at setup, before anything runs.

## Claude

The agent runs on your Claude Code login, or on `ANTHROPIC_API_KEY` when it is set. Its use works like your own Claude Code work:

* **On a Claude plan** (Pro, Max, Team, Enterprise), it counts toward the plan's usage limits. When a limit is reached, Autofit pauses the session. Nothing runs or is spent while it waits. Resume it once the limit resets, or stop to keep the best model so far. If the agent's Claude Code quits at the limit instead, the round ends with the best model so far, and `/af continue` runs the rest of the budget later.
* **On an API key**, it is billed to that key. You can set a spending cap at setup, or from a shell with `--max-cost`. A session that reaches the cap finishes with the best model so far.

> [!WARNING]
>
> The cap checks a running estimate that comes out low, because Claude Code reports most of the agent's output only when its turn ends. A session can spend more than the cap before it stops.

The sidebar shows the agent's use so far. While the session runs, it is an estimate marked with `~`. On a plan, the figure is the use at API prices, not what you pay.

The agent runs on Claude Opus 5.5 at high effort by default. Claude Fable 5.2 costs twice as much per token. A higher effort level thinks longer on each step and costs more. The report's summary is one more call, on Claude Sonnet 5.5.

## TabPFN API

Every experiment fits and scores its folds on the TabPFN API, which is [metered](https://docs.priorlabs.ai/api/metering.md). What drives the tokens:

* **Folds and repeats.** Each fold is one TabPFN fit and prediction. 8 folds use about 8 times the tokens of one fold, and each repeat adds as much again.
* **Table size.** More rows and columns use more tokens per fit.
* **Budget.** Each experiment fits and scores all its folds again.
* **The ensemble.** A prediction with the final model makes one TabPFN prediction per ensemble member.

At setup, Claude says what one experiment and the whole budget take against what your account has left. If the budget does not fit, it recommends a smaller one. When the account runs out during a session, Autofit pauses it. Resume it once the limit resets.

## Time

Time per experiment, measured on TabPFN-4 with the agent on Opus at high effort:

| Table | Per experiment |
| - | - |
| Up to about 30,000 rows, 8 folds | 15 to 45 seconds |
| 60,000 to 250,000 rows, one fold | 20 to 60 seconds |
| 250,000 to 850,000 rows, one fold | About 1 minute |
| Hundreds of columns, or long text, on about 100,000 rows | 2 to 10 minutes |

Building the final model adds a few minutes. After the first experiments, the sidebar shows the measured time per experiment and for the rest of the budget.

## Spend less

| Lever | Effect |
| - | - |
| A smaller budget | Fewer experiments. You can raise it later with `/af budget` or `/af continue`. |
| One fold | About an eighth of the TabPFN tokens of 8 folds. Scores are noisier. |
| No repeats | Repeats multiply the TabPFN tokens. |
| A lower effort level | Less Claude use per experiment. |
| Stop early | `/af stop` finishes with the best model so far. |
| The best experiment alone | `/af single on` makes predictions with one pipeline instead of the ensemble. |

The budget is not binding. You can stop at any time and keep the best model so far, change the budget while the session runs, and continue later. See [Steer a run](https://docs.priorlabs.ai/autofit/steer-a-run.md).


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