Authenticate, upload your first dataset, and make predictions using the Prior Labs API.
The Prior Labs API provides secure, cloud-hosted access to TabPFN without managing GPUs or infrastructure.This guide walks you through how to authenticate, upload your data, and make your first API call.The API uses by default the TabPFN-2.5 model. There are options to specify a model checkpoint from the list of available checkpoints on HuggingFace and set it using the model_path parameter. Please refer to the Predict endpoint documentation for detailed instructions.
You can authenticate and define dataset paths once, and reuse them across both /v1/fit and /v1/predict calls.
Copy
Ask AI
import os, json, requests# Define your file pathstrain_path = "train.csv" # path to your training datasettest_path = "test.csv" # path to your test dataset# Get your API key from the environmentapi_key = os.getenv("PRIORLABS_API_KEY")headers = {"Authorization": f"Bearer {api_key}"}
We recommend storing your access token in an environment variable rather than directly in code: