priorlabs
Use when building tabular machine learning models, making predictions on structured data, or integrating ML into applications. Reach for TabPFN when you need fast, accurate predictions without extensive preprocessing or hyperparameter tuning, especially for classification, regression, forecasting, or anomaly detection tasks.
How do I install this agent skill?
npx skills add https://docs.priorlabs.ai --skill priorlabsIs this agent skill safe to install?
No partner audit is available yet. Read the source before installing.
What does this agent skill do?
TabPFN Skill
Product summary
TabPFN is a pre-trained transformer foundation model for tabular data that delivers high-quality predictions in seconds without dataset-specific training. It learns from billions of synthetic datasets and applies in-context learning to your data via a single forward pass. Use it via the Python client (tabpfn-client for API, tabpfn for local), REST API, or Model Context Protocol (MCP) for AI assistants.
Key entry points:
- Python API client:
tabpfn-client(managed compute, no GPU needed) ortabpfn(local inference, GPU recommended) - REST API:
/tabpfn/*JSON endpoints athttps://api.priorlabs.ai - MCP server:
https://api.priorlabs.ai/mcp/serverfor Claude, ChatGPT, Cursor, n8n - Primary docs: https://docs.priorlabs.ai
Current model families: TabPFN-3.5 (base, Plus, Thinking, Fast), TabPFN-3 (base, Plus, Thinking), TabPFN-2.6, TabPFN-2.5, TabPFNv2.
When to use
Reach for TabPFN when:
- Building classification or regression models on tabular data without extensive preprocessing or tuning
- Making predictions quickly on structured data (CSV, Parquet) with mixed numerical, categorical, and text features
- Handling messy data with missing values, outliers, or high-cardinality features natively
- Integrating ML into workflows via Python, REST API, or AI assistants (Claude, ChatGPT, n8n)
- Optimizing for accuracy on grouped or temporal data using Thinking mode
- Avoiding repeated training loops by reusing fitted models for zero-shot inference
- Estimating token costs before running predictions on the API
Do not use TabPFN for:
- Image or audio data (use domain-specific models)
- Datasets requiring custom loss functions or complex constraints
- Scenarios where model interpretability is the primary goal (though SHAP integration is available)
Quick reference
Installation and authentication
| Task | Command |
|---|---|
| Install API client | pip install --upgrade tabpfn-client |
| Install local package | pip install --upgrade tabpfn |
| Set API key (client) | export TABPFN_TOKEN="<your-key>" or set_access_token(api_key) |
| Get API key | Visit platform.priorlabs.ai/account/api-keys |
Python client quickstart
from tabpfn_client import TabPFNClassifier
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
X, y = load_breast_cancer(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
model = TabPFNClassifier()
model.fit(X_train, y_train)
predictions = model.predict(X_test)
probabilities = model.predict_proba(X_test)
Model selection
| Model | Best for | Max rows | Max columns | Availability |
|---|---|---|---|---|
| TabPFN-3.5 | General tabular tasks, text-rich data | 1M | 20K | Local, API, client |
| TabPFN-3.5-Plus | Text-heavy datasets, enhanced text processing | 1M | 20K | API, client, MCP |
| TabPFN-3.5-Thinking | Maximum accuracy on grouped/temporal data | 200K | 2K | API, client |
| TabPFN-3.5-Fast | Speed-critical inference (6× faster) | 1M | 20K | Local, API, client |
| TabPFN-3 | Numerical and categorical data | 1M | 2K | Local, API, client |
API metering and limits
| Metric | Default | Notes |
|---|---|---|
| Daily token budget | 5,000,000 | Resets midnight UTC |
| Monthly token budget | 20,000,000 | Resets 1st of month UTC |
| Predict requests/min | 60 | Per-user limit |
| Predict requests/hour | 1,500 | Per-user limit |
| Thinking fit requests/min | 10 | Stricter than standard fits |
| Minimum token charge | 10,000 (v3.x) | Per prediction or Thinking fit |
Estimate token cost before running:
from tabpfn_client import estimate_cost
estimate = estimate_cost(X_train, X_test, model_version="v3.5", n_estimators=8)
print(estimate.estimated_cost)
Common parameters
| Parameter | Type | Default | Use case |
|---|---|---|---|
thinking_mode | bool | False | Enable fit-time optimization for better accuracy |
thinking_effort | "medium" | "high" | None | Balance fit time vs. accuracy |
thinking_metric | str | None | Metric to optimize (e.g., "accuracy", "log_loss", "rmse") |
n_estimators | int | "auto" | Number of ensemble members (1–32); "auto" adapts to data |
categorical_features_indices | list[int] | None | Indices of categorical columns (improves performance) |
output_type | str | "probas" (clf), "mean" (reg) | "preds", "probas", "full", "quantiles" |
group_col | str | list[str] | None | Column(s) identifying groups (Thinking mode only) |
time_col | str | None | Temporal column (Thinking mode only) |
Decision guidance
When to use API client vs. local package
| Scenario | Use tabpfn-client | Use tabpfn |
|---|---|---|
| No GPU available | ✓ | ✗ |
| Datasets > 1,000 rows | ✓ (recommended) | ✓ (with GPU) |
| Thinking mode needed | ✓ | ✗ |
| Text-rich data | ✓ (Plus variant) | ✓ (3.5 base) |
| Offline inference required | ✗ | ✓ |
| Cost-sensitive (small datasets) | ✗ | ✓ |
When to use Thinking mode
| Condition | Use Thinking | Use standard |
|---|---|---|
| Grouped or temporal data | ✓ | ✗ |
| Finance or healthcare (high accuracy needed) | ✓ | ✗ |
| Speed critical | ✗ | ✓ |
| Budget constrained | ✗ | ✓ |
| Repeated predictions on same training set | ✓ (fit once) | ✓ (fit once) |
When to tune model parameters
| Issue | Solution | Parameter |
|---|---|---|
| Predictions too slow | Reduce estimators or use Fast variant | n_estimators or model_path="v3.5-fast_default" |
| Poor accuracy on wide tables | Increase estimators | n_estimators (auto-scales up to 32) |
| Imbalanced classes | Enable probability balancing | balance_probabilities=True |
| Optimize for specific metric | Set thinking metric | thinking_metric="f1" or "roc_auc" |
| Categorical columns misidentified | Declare them explicitly | categorical_features_indices=[0, 2, 5] |
Workflow
Standard prediction workflow (Python client)
-
Install and authenticate
- Run
pip install --upgrade tabpfn-client - Set
TABPFN_TOKENenvironment variable or callset_access_token(api_key)
- Run
-
Prepare data
- Load training and test data as pandas DataFrames or numpy arrays
- Keep data raw: do not scale, one-hot encode, or impute missing values
- Declare categorical columns via
categorical_features_indicesor pandascategorydtype
-
Choose model and parameters
- Select model version (default: TabPFN-3.5-Plus via API)
- Decide on Thinking mode if accuracy > speed
- Set
thinking_metricto match your evaluation metric
-
Fit and predict
from tabpfn_client import TabPFNClassifier model = TabPFNClassifier(thinking_mode=True, thinking_effort="high") model.fit(X_train, y_train) predictions = model.predict(X_test) -
Check usage and costs
- Monitor token usage at
platform.priorlabs.ai/account/usage - Estimate future costs with
estimate_cost()before large runs
- Monitor token usage at
-
Reuse fitted models
- Save with
model.save_model("model.json")(Thinking mode only) - Load with
TabPFNClassifier.load_model("model.json") - Reuse for repeated predictions to avoid refitting
- Save with
REST API workflow
-
Get API key from
platform.priorlabs.ai/account/api-keys -
Check model limits with
GET /tabpfn/get_model_limits -
Upload training set
- Call
POST /tabpfn/prepare_train_set_uploadto get signed URLs - PUT CSV or Parquet files to the signed URLs
- Call
-
Fit model with
POST /tabpfn/fit, specifyingtask,model_path, and optional Thinking parameters -
Upload test set with
POST /tabpfn/prepare_test_set_upload -
Predict with
POST /tabpfn/predict, referencing the fitted model ID -
Handle errors — all responses follow a consistent error envelope with
code,detail, andtrace_id
MCP integration (Claude, ChatGPT, n8n)
-
Install MCP server
- Claude Desktop: Download
.mcpbbundle or edit config file with server URL - ChatGPT: Create custom connector with OAuth
- n8n: Add TabPFN node to workflow
- Claude Desktop: Download
-
Authenticate with Prior Labs API key
-
Use in agent workflows
- Claude: Ask agent to upload CSV and run predictions
- n8n: Chain CSV parsing → TabPFN prediction → downstream actions
Common gotchas
-
Do not preprocess data. TabPFN handles missing values, outliers, categorical features, and text natively. Scaling, imputation, one-hot encoding, or manual text vectorization often hurts performance.
-
Declare categorical columns explicitly. Integer-coded categorical features are often misidentified as numerical. Use
categorical_features_indicesor pandascategorydtype. -
Thinking mode has stricter limits. Max 200K rows and 2K columns; 10 requests/min (vs. 60 for standard fits). Higher effort increases token usage.
-
Token budgets are shared. Predictions and Thinking fits draw from the same daily (5M) and monthly (20M) token pools. Estimate costs before large runs.
-
Rate limits are separate from token budgets. HTTP 429 can mean either rate limit exceeded (per-minute/hour) or insufficient tokens (daily/monthly). Check the response message.
-
Reuse fitted models. Refitting on the same training data wastes tokens. Save and load models or reuse
fitted_train_set_idacross predictions. -
KV cache is not compatible with Thinking mode. Choose one: fit-time optimization (Thinking) or fast repeated predictions (KV cache).
-
Grouped/temporal data requires Thinking mode. Standard models treat rows as independent. Use
group_colortime_colonly with Thinking mode. -
Text preprocessing limits on Plus. TabPFN-3.5-Plus has a 50M token limit per dataset and 2,500 characters per text value.
-
Minimum token charge applies. Even small predictions cost at least 10,000 tokens (v3.x) or 5,000 (v2.x).
-
Deprecated
/v1/fitand/v1/predictendpoints. Use/tabpfn/*JSON routes instead.
Verification checklist
Before submitting work with TabPFN:
- Data is raw. No scaling, imputation, one-hot encoding, or manual text vectorization applied.
- Categorical columns declared. Use
categorical_features_indicesor pandascategorydtype for integer-coded features. - Model version selected. Confirm
model_pathorModelVersionmatches your use case (e.g., "v3.5_default" for Plus, "v3.5-fast_default" for Fast). - Thinking parameters correct. If using Thinking mode,
thinking_metricmatches your evaluation metric. - Token cost estimated. Run
estimate_cost()before large predictions; confirm remaining budget is sufficient. - Rate limits respected. Batch requests to stay below per-minute and per-hour limits; implement exponential backoff for 429 errors.
- Fitted models reused. For repeated predictions, save/load models or reuse
fitted_train_set_idinstead of refitting. - Error handling in place. Catch HTTP 429 (rate limit or budget), 422 (validation), 401 (auth), and 404 (model not found).
- API key secured. Never commit
TABPFN_TOKENto source control; use environment variables or secret managers. - Usage monitored. Check
platform.priorlabs.ai/account/usageor callget_api_usage()periodically.
Resources
Comprehensive navigation: https://docs.priorlabs.ai/llms.txt
Critical documentation pages:
- REST API quickstart — Full upload → fit → predict walkthrough
- Thinking mode — Fit-time optimization for grouped and temporal data
- API metering — Token charges, budgets, and usage tracking
- Model Context Protocol (MCP) — Connect Claude, ChatGPT, Cursor, n8n to TabPFN
- Improving Performance — Feature engineering, preprocessing, and tuning strategies
For additional documentation and navigation, see: https://docs.priorlabs.ai/llms.txt
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/docs.priorlabs.ai/priorlabs">View priorlabs on skillZs</a>