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

# API metering

> How TabPFN API usage is metered — token pools, thinking fit quotas, and dataset limits.

Every API prediction consumes **tokens** from your account's daily and monthly pools. Thinking fits have a separate monthly quota. This page covers how costs are calculated, what the limits are, and what happens when you hit them.

***

## Token cost

Each prediction request is charged based on the number of rows, columns, and estimators used.

**TabPFN v3** uses a sublinear cost function — doubling your data does not double the cost. Because TabPFN-3 is fundamentally more efficient at handling larger datasets, large-scale workloads are significantly cheaper than on v2.x.

**TabPFN v2.x** uses a linear cost function:

```
tokens = max(5,000, (train_rows + test_rows) × columns × n_estimators)
```

`n_estimators` defaults to **8** when not specified. The floor of 5,000 tokens applies to every request regardless of size.

You can check your current usage with the `get_api_usage()` function in `tabpfn-client`, or monitor it in your account dashboard at [ux.priorlabs.ai](https://ux.priorlabs.ai).

***

## Usage pools

| Pool                      | Default limit | Reset schedule                  |
| ------------------------- | ------------- | ------------------------------- |
| Daily prediction tokens   | 50,000,000    | Midnight UTC                    |
| Monthly prediction tokens | 200,000,000   | 1st of each month, midnight UTC |
| Thinking fits (monthly)   | 20            | 1st of each month, midnight UTC |

When a pool is exhausted, the API returns **HTTP 429** with a message indicating which limit was hit and when it resets.

A warning email is sent when either daily or monthly usage crosses 70% of the limit.

***

## Thinking fit quota

[Thinking mode](/capabilities/thinking-mode) fits are metered separately from prediction tokens. Each call to `POST /tabpfn/fit` with thinking enabled counts against the monthly thinking fit quota, regardless of dataset size or fit duration.

When the thinking fit limit is reached, `/tabpfn/fit` returns **HTTP 429**. Prediction requests are unaffected — you can still predict using previously fitted models.

***

## Dataset limits

Limits vary by model version. Use `GET /tabpfn/get_model_limits` to retrieve the current values for your account.

| Constraint                       | v3          | v2.6       | v2.5       |
| -------------------------------- | ----------- | ---------- | ---------- |
| Max train rows                   | 1,000,000   | 100,000    | 50,000     |
| Max train cells (rows × columns) | 100,000,000 | 20,000,000 | 20,000,000 |
| Max test rows                    | 200,000     | 100,000    | 50,000     |
| Max classes                      | 160         | 10         | 10         |
| Max columns                      | 2,000       | 2,000      | 2,000      |
| Max upload size                  | 5 GB        | 5 GB       | 5 GB       |

**Regression full output:** `output_type="full"` is limited to **400 test rows**. Use `"mean"`, `"median"`, or `"quantiles"` for larger test sets.

***

## HTTP error codes

| Status    | Condition                                                                                                                     |
| --------- | ----------------------------------------------------------------------------------------------------------------------------- |
| 429       | Daily, monthly, or thinking fit limit exceeded. The response body includes the specific limit, current usage, and reset time. |
| 401 / 403 | Authentication failure — missing, invalid, or expired token.                                                                  |
| 422       | Validation error — dataset exceeds model limits, invalid parameters, or upload issues.                                        |

***

## Higher limits

If you need higher token budgets or more thinking fits, contact [hello@priorlabs.ai](mailto:hello@priorlabs.ai) with your projected daily token volume and peak thinking usage.

***

<CardGroup cols={2}>
  <Card title="Thinking mode" icon="brain" href="/capabilities/thinking-mode">
    Configure fit-time optimization and understand thinking parameters.
  </Card>

  <Card title="REST quickstart" icon="rocket" href="/api-reference/getting-started">
    Full upload → fit → predict walkthrough.
  </Card>

  <Card title="TabPFN-3 changelog" icon="star" href="/changelog/tabpfn-3">
    What's new in v3 — scale, capabilities, and migration.
  </Card>

  <Card title="Security" icon="shield" href="/api-reference/security">
    Encryption, data isolation, and access controls.
  </Card>
</CardGroup>
