curl --request POST \
--url https://api.priorlabs.ai/tabpfn/estimate_cost \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_version": "v4",
"operation": "predict",
"train_rows": 10000,
"test_rows": 1000,
"raw_columns": 20,
"n_estimators": 4
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/estimate_cost"
payload = {
"model_version": "v4",
"operation": "predict",
"train_rows": 10000,
"test_rows": 1000,
"raw_columns": 20,
"n_estimators": 4
}
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({
model_version: 'v4',
operation: 'predict',
train_rows: 10000,
test_rows: 1000,
raw_columns: 20,
n_estimators: 4
})
};
fetch('https://api.priorlabs.ai/tabpfn/estimate_cost', 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/estimate_cost",
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([
'model_version' => 'v4',
'operation' => 'predict',
'train_rows' => 10000,
'test_rows' => 1000,
'raw_columns' => 20,
'n_estimators' => 4
]),
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/estimate_cost"
payload := strings.NewReader("{\n \"model_version\": \"v4\",\n \"operation\": \"predict\",\n \"train_rows\": 10000,\n \"test_rows\": 1000,\n \"raw_columns\": 20,\n \"n_estimators\": 4\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/estimate_cost")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_version\": \"v4\",\n \"operation\": \"predict\",\n \"train_rows\": 10000,\n \"test_rows\": 1000,\n \"raw_columns\": 20,\n \"n_estimators\": 4\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/estimate_cost")
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 \"model_version\": \"v4\",\n \"operation\": \"predict\",\n \"train_rows\": 10000,\n \"test_rows\": 1000,\n \"raw_columns\": 20,\n \"n_estimators\": 4\n}"
response = http.request(request)
puts response.read_body{
"estimated_cost": 123,
"pricing_version": "<string>",
"inputs": {
"train_rows": 1073741824,
"raw_columns": 1073741824,
"test_rows": 0,
"model_version": "v3.5",
"operation": "predict",
"n_estimators": 8,
"thinking_effort": "micro"
}
}{
"message": "<string>",
"error_code": "GENERAL_ERROR",
"trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Estimate token cost
Estimate an existing operation from raw input dimensions without consuming quota or reserving capacity. Thinking prediction requires the fitted model family and actual per-base-estimator count. Cache estimates assume a hit; fallback and the actual estimator count can change the final charge. Available when quota v3 is enabled. For TabPFN-3.5-Thinking, a thinking_fit estimate is the maximum reservation for the selected effort. The final charge uses measured fit time, subject to a minimum charge and the reservation cap. An estimate does not reserve tokens or guarantee sufficient remaining quota.
curl --request POST \
--url https://api.priorlabs.ai/tabpfn/estimate_cost \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_version": "v4",
"operation": "predict",
"train_rows": 10000,
"test_rows": 1000,
"raw_columns": 20,
"n_estimators": 4
}
'import requests
url = "https://api.priorlabs.ai/tabpfn/estimate_cost"
payload = {
"model_version": "v4",
"operation": "predict",
"train_rows": 10000,
"test_rows": 1000,
"raw_columns": 20,
"n_estimators": 4
}
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({
model_version: 'v4',
operation: 'predict',
train_rows: 10000,
test_rows: 1000,
raw_columns: 20,
n_estimators: 4
})
};
fetch('https://api.priorlabs.ai/tabpfn/estimate_cost', 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/estimate_cost",
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([
'model_version' => 'v4',
'operation' => 'predict',
'train_rows' => 10000,
'test_rows' => 1000,
'raw_columns' => 20,
'n_estimators' => 4
]),
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/estimate_cost"
payload := strings.NewReader("{\n \"model_version\": \"v4\",\n \"operation\": \"predict\",\n \"train_rows\": 10000,\n \"test_rows\": 1000,\n \"raw_columns\": 20,\n \"n_estimators\": 4\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/estimate_cost")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_version\": \"v4\",\n \"operation\": \"predict\",\n \"train_rows\": 10000,\n \"test_rows\": 1000,\n \"raw_columns\": 20,\n \"n_estimators\": 4\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.priorlabs.ai/tabpfn/estimate_cost")
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 \"model_version\": \"v4\",\n \"operation\": \"predict\",\n \"train_rows\": 10000,\n \"test_rows\": 1000,\n \"raw_columns\": 20,\n \"n_estimators\": 4\n}"
response = http.request(request)
puts response.read_body{
"estimated_cost": 123,
"pricing_version": "<string>",
"inputs": {
"train_rows": 1073741824,
"raw_columns": 1073741824,
"test_rows": 0,
"model_version": "v3.5",
"operation": "predict",
"n_estimators": 8,
"thinking_effort": "micro"
}
}{
"message": "<string>",
"error_code": "GENERAL_ERROR",
"trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Body
Response
Successful response
Tokens the operation is charged. For thinking_fit, the most it can be charged: the effort level's fit time limit at the GPU-second rate, which is reserved at submit. The settled charge is the measured fit time at the same rate, up to this amount and at least the minimum charge.
Was this page helpful?