Get prediction result
curl --request POST \
--url https://api.priorlabs.ai/tabpfn/get_predict_result \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fitted_test_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/get_predict_result"
payload = { "fitted_test_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({fitted_test_set_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.priorlabs.ai/tabpfn/get_predict_result', 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/get_predict_result",
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([
'fitted_test_set_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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/get_predict_result"
payload := strings.NewReader("{\n \"fitted_test_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/get_predict_result")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fitted_test_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/get_predict_result")
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 \"fitted_test_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"fitted_test_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"retry_in_secs": 123,
"error": "<string>",
"error_code": "<string>",
"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": {},
"inference_precision": "autocast",
"ignore_pretraining_limits": true,
"n_preprocessing_jobs": 4,
"fit_mode": "fit_preprocessors",
"device": [
"<string>"
],
"memory_saving_mode": true,
"model_path": "<string>",
"balance_probabilities": true,
"presets": "zero_inflated",
"group_col": "<string>"
},
"n_estimators": 123,
"billing_model_version": "<string>",
"execution_mode": "standard",
"cache_outcome": "not_requested",
"task": "classification",
"classes": [
"<string>"
],
"top_k": 123
},
"timings": {
"test_set_transform_queue_wait_s": 123,
"test_set_transform_s": 123,
"predict_queue_wait_s": 123,
"predict_s": 123
}
}{
"message": "<string>",
"error_code": "NOT_FOUND",
"trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"message": "<string>",
"error_code": "GENERAL_ERROR",
"trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}REST API
Get prediction result
Poll with the fitted test set ID. While the prediction is pending, wait retry_in_secs before polling again. On completion, read prediction and metadata. A failed prediction returns HTTP 200 with its error. An unknown ID returns HTTP 404.
POST
/
tabpfn
/
get_predict_result
Get prediction result
curl --request POST \
--url https://api.priorlabs.ai/tabpfn/get_predict_result \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fitted_test_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/get_predict_result"
payload = { "fitted_test_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({fitted_test_set_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.priorlabs.ai/tabpfn/get_predict_result', 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/get_predict_result",
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([
'fitted_test_set_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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/get_predict_result"
payload := strings.NewReader("{\n \"fitted_test_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/get_predict_result")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fitted_test_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/get_predict_result")
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 \"fitted_test_set_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"fitted_test_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"retry_in_secs": 123,
"error": "<string>",
"error_code": "<string>",
"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": {},
"inference_precision": "autocast",
"ignore_pretraining_limits": true,
"n_preprocessing_jobs": 4,
"fit_mode": "fit_preprocessors",
"device": [
"<string>"
],
"memory_saving_mode": true,
"model_path": "<string>",
"balance_probabilities": true,
"presets": "zero_inflated",
"group_col": "<string>"
},
"n_estimators": 123,
"billing_model_version": "<string>",
"execution_mode": "standard",
"cache_outcome": "not_requested",
"task": "classification",
"classes": [
"<string>"
],
"top_k": 123
},
"timings": {
"test_set_transform_queue_wait_s": 123,
"test_set_transform_s": 123,
"predict_queue_wait_s": 123,
"predict_s": 123
}
}{
"message": "<string>",
"error_code": "NOT_FOUND",
"trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"message": "<string>",
"error_code": "GENERAL_ERROR",
"trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Response
Successful Response
Was this page helpful?