curl --request POST \
--url https://api.priorlabs.ai/tabpfn/fit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"train_set_upload_id": "123e4567-e89b-12d3-a456-426614174000",
"task": "classification",
"tabpfn_systems": [
"preprocessing",
"text"
],
"thinking_effort": "medium"
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/fit"
payload = {
"train_set_upload_id": "123e4567-e89b-12d3-a456-426614174000",
"task": "classification",
"tabpfn_systems": ["preprocessing", "text"],
"thinking_effort": "medium"
}
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({
train_set_upload_id: '123e4567-e89b-12d3-a456-426614174000',
task: 'classification',
tabpfn_systems: ['preprocessing', 'text'],
thinking_effort: 'medium'
})
};
fetch('https://api.priorlabs.ai/tabpfn/fit', 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/fit",
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([
'train_set_upload_id' => '123e4567-e89b-12d3-a456-426614174000',
'task' => 'classification',
'tabpfn_systems' => [
'preprocessing',
'text'
],
'thinking_effort' => 'medium'
]),
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/fit"
payload := strings.NewReader("{\n \"train_set_upload_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"task\": \"classification\",\n \"tabpfn_systems\": [\n \"preprocessing\",\n \"text\"\n ],\n \"thinking_effort\": \"medium\"\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/fit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"train_set_upload_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"task\": \"classification\",\n \"tabpfn_systems\": [\n \"preprocessing\",\n \"text\"\n ],\n \"thinking_effort\": \"medium\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/fit")
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 \"train_set_upload_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"task\": \"classification\",\n \"tabpfn_systems\": [\n \"preprocessing\",\n \"text\"\n ],\n \"thinking_effort\": \"medium\"\n}"
response = http.request(request)
puts response.read_bodyFit (TabPFN JSON API)
Recommended: Use tabpfn-client (TabPFNClassifier / TabPFNRegressor). It calls these routes for you.
JSON body after you upload train files via POST /tabpfn/prepare_train_set_upload and PUT the returned signed URLs. Returns fitted_train_set_id. Long fits may stream JSON with leading keepalive whitespace; see the TabPFN-3 changelog.
Key fields: train_set_upload_id (UUID), task (classification | regression), tabpfn_systems, optional tabpfn_config, thinking_effort (medium | high or omit), thinking_timeout_s, thinking_effort_metric, force_refit.
curl --request POST \
--url https://api.priorlabs.ai/tabpfn/fit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"train_set_upload_id": "123e4567-e89b-12d3-a456-426614174000",
"task": "classification",
"tabpfn_systems": [
"preprocessing",
"text"
],
"thinking_effort": "medium"
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/fit"
payload = {
"train_set_upload_id": "123e4567-e89b-12d3-a456-426614174000",
"task": "classification",
"tabpfn_systems": ["preprocessing", "text"],
"thinking_effort": "medium"
}
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({
train_set_upload_id: '123e4567-e89b-12d3-a456-426614174000',
task: 'classification',
tabpfn_systems: ['preprocessing', 'text'],
thinking_effort: 'medium'
})
};
fetch('https://api.priorlabs.ai/tabpfn/fit', 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/fit",
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([
'train_set_upload_id' => '123e4567-e89b-12d3-a456-426614174000',
'task' => 'classification',
'tabpfn_systems' => [
'preprocessing',
'text'
],
'thinking_effort' => 'medium'
]),
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/fit"
payload := strings.NewReader("{\n \"train_set_upload_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"task\": \"classification\",\n \"tabpfn_systems\": [\n \"preprocessing\",\n \"text\"\n ],\n \"thinking_effort\": \"medium\"\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/fit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"train_set_upload_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"task\": \"classification\",\n \"tabpfn_systems\": [\n \"preprocessing\",\n \"text\"\n ],\n \"thinking_effort\": \"medium\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/fit")
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 \"train_set_upload_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"task\": \"classification\",\n \"tabpfn_systems\": [\n \"preprocessing\",\n \"text\"\n ],\n \"thinking_effort\": \"medium\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer token for authentication, obtained after signing up and generating an API key.
Body
Specifies the type of task to perform — either classification or regression.
classification, regression preprocessing, text, thinking medium, high Whether to force the fitting of the train set even if a fittedtrain set and transform states already exist.
Response
Fitted train set id (JSON; may be streamed with leading whitespace on long fits).
Was this page helpful?