Prepare test set upload
curl --request POST \
--url https://api.priorlabs.ai/tabpfn/prepare_test_set_upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fitted_train_set_id": "323e4567-e89b-12d3-a456-426614174000",
"x_test_info": {
"filename": "X_test.csv",
"size_bytes": 512,
"content_hash": "ghi"
}
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/prepare_test_set_upload"
payload = {
"fitted_train_set_id": "323e4567-e89b-12d3-a456-426614174000",
"x_test_info": {
"filename": "X_test.csv",
"size_bytes": 512,
"content_hash": "ghi"
}
}
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_train_set_id: '323e4567-e89b-12d3-a456-426614174000',
x_test_info: {filename: 'X_test.csv', size_bytes: 512, content_hash: 'ghi'}
})
};
fetch('https://api.priorlabs.ai/tabpfn/prepare_test_set_upload', 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/prepare_test_set_upload",
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_train_set_id' => '323e4567-e89b-12d3-a456-426614174000',
'x_test_info' => [
'filename' => 'X_test.csv',
'size_bytes' => 512,
'content_hash' => 'ghi'
]
]),
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/prepare_test_set_upload"
payload := strings.NewReader("{\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"x_test_info\": {\n \"filename\": \"X_test.csv\",\n \"size_bytes\": 512,\n \"content_hash\": \"ghi\"\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/prepare_test_set_upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"x_test_info\": {\n \"filename\": \"X_test.csv\",\n \"size_bytes\": 512,\n \"content_hash\": \"ghi\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/prepare_test_set_upload")
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_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"x_test_info\": {\n \"filename\": \"X_test.csv\",\n \"size_bytes\": 512,\n \"content_hash\": \"ghi\"\n }\n}"
response = http.request(request)
puts response.read_body{
"test_set_upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x_test_info": {
"signed_urls": [
"<string>"
],
"expires_at": 123,
"required_headers": {}
}
}Endpoints
Prepare test set upload
Recommended: Use tabpfn-client (TabPFNClassifier / TabPFNRegressor). It calls these routes for you.
After fit: pass fitted_train_set_id and x_test_info; receive test_set_upload_id and signed URLs for test features.
POST
/
tabpfn
/
prepare_test_set_upload
Prepare test set upload
curl --request POST \
--url https://api.priorlabs.ai/tabpfn/prepare_test_set_upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fitted_train_set_id": "323e4567-e89b-12d3-a456-426614174000",
"x_test_info": {
"filename": "X_test.csv",
"size_bytes": 512,
"content_hash": "ghi"
}
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/prepare_test_set_upload"
payload = {
"fitted_train_set_id": "323e4567-e89b-12d3-a456-426614174000",
"x_test_info": {
"filename": "X_test.csv",
"size_bytes": 512,
"content_hash": "ghi"
}
}
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_train_set_id: '323e4567-e89b-12d3-a456-426614174000',
x_test_info: {filename: 'X_test.csv', size_bytes: 512, content_hash: 'ghi'}
})
};
fetch('https://api.priorlabs.ai/tabpfn/prepare_test_set_upload', 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/prepare_test_set_upload",
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_train_set_id' => '323e4567-e89b-12d3-a456-426614174000',
'x_test_info' => [
'filename' => 'X_test.csv',
'size_bytes' => 512,
'content_hash' => 'ghi'
]
]),
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/prepare_test_set_upload"
payload := strings.NewReader("{\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"x_test_info\": {\n \"filename\": \"X_test.csv\",\n \"size_bytes\": 512,\n \"content_hash\": \"ghi\"\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/prepare_test_set_upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fitted_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"x_test_info\": {\n \"filename\": \"X_test.csv\",\n \"size_bytes\": 512,\n \"content_hash\": \"ghi\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/prepare_test_set_upload")
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_train_set_id\": \"323e4567-e89b-12d3-a456-426614174000\",\n \"x_test_info\": {\n \"filename\": \"X_test.csv\",\n \"size_bytes\": 512,\n \"content_hash\": \"ghi\"\n }\n}"
response = http.request(request)
puts response.read_body{
"test_set_upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x_test_info": {
"signed_urls": [
"<string>"
],
"expires_at": 123,
"required_headers": {}
}
}Authorizations
Bearer token for authentication, obtained after signing up and generating an API key.
Body
application/json
Was this page helpful?
⌘I