Predict (TabPFN JSON API)
curl --request POST \
--url https://api.priorlabs.ai/tabpfn/predict \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"test_set_upload_id": "223e4567-e89b-12d3-a456-426614174000",
"fitted_train_set_id": "323e4567-e89b-12d3-a456-426614174000",
"task_config": {
"task": "classification",
"tabpfn_config": {
"model_path": "auto"
}
}
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/predict"
payload = {
"test_set_upload_id": "223e4567-e89b-12d3-a456-426614174000",
"fitted_train_set_id": "323e4567-e89b-12d3-a456-426614174000",
"task_config": {
"task": "classification",
"tabpfn_config": { "model_path": "auto" }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
test_set_upload_id: '223e4567-e89b-12d3-a456-426614174000',
fitted_train_set_id: '323e4567-e89b-12d3-a456-426614174000',
task_config: {task: 'classification', tabpfn_config: {model_path: 'auto'}}
})
};
fetch('https://api.priorlabs.ai/tabpfn/predict', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.priorlabs.ai/tabpfn/predict",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'test_set_upload_id' => '223e4567-e89b-12d3-a456-426614174000',
'fitted_train_set_id' => '323e4567-e89b-12d3-a456-426614174000',
'task_config' => [
'task' => 'classification',
'tabpfn_config' => [
'model_path' => 'auto'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.priorlabs.ai/tabpfn/predict"
payload := strings.NewReader("{\n \"test_set_upload_id\": \"223e4567-e89b-12d3-a456-426614174000\",\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"task_config\": {\n \"task\": \"classification\",\n \"tabpfn_config\": {\n \"model_path\": \"auto\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.priorlabs.ai/tabpfn/predict")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"test_set_upload_id\": \"223e4567-e89b-12d3-a456-426614174000\",\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"task_config\": {\n \"task\": \"classification\",\n \"tabpfn_config\": {\n \"model_path\": \"auto\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/predict")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"test_set_upload_id\": \"223e4567-e89b-12d3-a456-426614174000\",\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"task_config\": {\n \"task\": \"classification\",\n \"tabpfn_config\": {\n \"model_path\": \"auto\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"prediction": [
"<unknown>"
],
"metadata": {
"test_set_num_rows": 123,
"test_set_num_cols": 123,
"package_version": "<string>",
"tabpfn_config": {
"n_estimators": 4,
"categorical_features_indices": [
123
],
"softmax_temperature": 123,
"average_before_softmax": true,
"random_state": 123,
"inference_config": {},
"ignore_pretraining_limits": true,
"n_preprocessing_jobs": 4,
"inference_precision": "auto",
"fit_mode": "fit_preprocessors",
"device": [
"<string>"
],
"memory_saving_mode": true,
"model_path": "<string>",
"balance_probabilities": true
},
"task": "classification"
}
}Endpoints
Predict (TabPFN JSON API)
Recommended: Use tabpfn-client (TabPFNClassifier / TabPFNRegressor). It calls these routes for you.
JSON body after POST /tabpfn/prepare_test_set_upload and file upload. Fields: test_set_upload_id, fitted_train_set_id (from /tabpfn/fit), task_config (task + tabpfn config), optional force_refit.
POST
/
tabpfn
/
predict
Predict (TabPFN JSON API)
curl --request POST \
--url https://api.priorlabs.ai/tabpfn/predict \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"test_set_upload_id": "223e4567-e89b-12d3-a456-426614174000",
"fitted_train_set_id": "323e4567-e89b-12d3-a456-426614174000",
"task_config": {
"task": "classification",
"tabpfn_config": {
"model_path": "auto"
}
}
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/predict"
payload = {
"test_set_upload_id": "223e4567-e89b-12d3-a456-426614174000",
"fitted_train_set_id": "323e4567-e89b-12d3-a456-426614174000",
"task_config": {
"task": "classification",
"tabpfn_config": { "model_path": "auto" }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
test_set_upload_id: '223e4567-e89b-12d3-a456-426614174000',
fitted_train_set_id: '323e4567-e89b-12d3-a456-426614174000',
task_config: {task: 'classification', tabpfn_config: {model_path: 'auto'}}
})
};
fetch('https://api.priorlabs.ai/tabpfn/predict', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.priorlabs.ai/tabpfn/predict",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'test_set_upload_id' => '223e4567-e89b-12d3-a456-426614174000',
'fitted_train_set_id' => '323e4567-e89b-12d3-a456-426614174000',
'task_config' => [
'task' => 'classification',
'tabpfn_config' => [
'model_path' => 'auto'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.priorlabs.ai/tabpfn/predict"
payload := strings.NewReader("{\n \"test_set_upload_id\": \"223e4567-e89b-12d3-a456-426614174000\",\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"task_config\": {\n \"task\": \"classification\",\n \"tabpfn_config\": {\n \"model_path\": \"auto\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.priorlabs.ai/tabpfn/predict")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"test_set_upload_id\": \"223e4567-e89b-12d3-a456-426614174000\",\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"task_config\": {\n \"task\": \"classification\",\n \"tabpfn_config\": {\n \"model_path\": \"auto\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/predict")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"test_set_upload_id\": \"223e4567-e89b-12d3-a456-426614174000\",\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"task_config\": {\n \"task\": \"classification\",\n \"tabpfn_config\": {\n \"model_path\": \"auto\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"prediction": [
"<unknown>"
],
"metadata": {
"test_set_num_rows": 123,
"test_set_num_cols": 123,
"package_version": "<string>",
"tabpfn_config": {
"n_estimators": 4,
"categorical_features_indices": [
123
],
"softmax_temperature": 123,
"average_before_softmax": true,
"random_state": 123,
"inference_config": {},
"ignore_pretraining_limits": true,
"n_preprocessing_jobs": 4,
"inference_precision": "auto",
"fit_mode": "fit_preprocessors",
"device": [
"<string>"
],
"memory_saving_mode": true,
"model_path": "<string>",
"balance_probabilities": true
},
"task": "classification"
}
}Authorizations
Bearer token for authentication, obtained after signing up and generating an API key.
Body
application/json
- ClassifierConfig
- RegressorConfig
Show child attributes
Show child attributes
Whether to force the fitting of the test set even if a fittedtest set and transform states already exist.
Was this page helpful?
⌘I