{
    "openapi": "3.1.0",
    "info": {
        "title": "TabPFN API",
        "description": "TabPFN REST API. For Python applications, use [tabpfn-client](/api-reference/overview). See the [REST quickstart](/api/rest-quickstart) for authentication and the upload, fit, and predict flow.",
        "version": "2.0.0",
        "contact": {
            "name": "Prior Labs",
            "email": "hello@priorlabs.ai"
        }
    },
    "servers": [
        {
            "url": "https://api.priorlabs.ai",
            "description": "Production TabPFN API"
        }
    ],
    "security": [
        {
            "BearerAuth": []
        }
    ],
    "paths": {
        "/tabpfn/prepare_train_set_upload": {
            "post": {
                "summary": "Prepare train set upload",
                "description": "Request signed URLs for training features and targets. Specify each file’s `format` (`csv` or `parquet`); optionally supply a CRC32C `hash` for deduplication and `size_bytes`. Upload the bytes to each signed URL using its `required_headers`.",
                "operationId": "tabpfn_prepare_train_set_upload",
                "tags": [
                    "Training"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PrepareTrainSetUploadResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Training set already uploaded; reuse train_set_upload_id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DuplicateTrainSetErrorResponse"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PrepareTrainSetUploadRequest"
                            },
                            "example": {
                                "x_train_info": {
                                    "format": "csv"
                                },
                                "y_train_info": {
                                    "format": "csv"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tabpfn/get_model_limits": {
            "get": {
                "summary": "Get model limits",
                "description": "Returns the default model version, per-model limits, maximum limits, upload size limit, and asynchronous-processing settings. This compatibility route is deprecated on the server.",
                "operationId": "tabpfn_get_model_limits",
                "tags": [
                    "Training"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GetSettingsResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "deprecated": true
            }
        },
        "/tabpfn/fit": {
            "post": {
                "summary": "Fit (TabPFN JSON API)",
                "description": "Fit an uploaded training set. Set `task_config.task` and `task_config.tabpfn_config`. For Thinking, include `thinking` in `tabpfn_systems` and set `thinking_config`. Long fits stream keepalive whitespace before the JSON response. Legacy flat `task`, `tabpfn_config`, and thinking fields are still translated by the server for older clients; new integrations should use the structured request below. `fit_mode` must be `fit_preprocessors` or `fit_with_cache`; cache mode cannot be combined with Thinking and is subject to server availability.",
                "operationId": "tabpfn_fit",
                "tags": [
                    "Training"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/FitResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/FitRequest"
                            },
                            "example": {
                                "train_set_upload_id": "11111111-1111-4111-8111-111111111111",
                                "task_config": {
                                    "task": "classification",
                                    "tabpfn_config": {
                                        "model_path": "v3.5_default"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tabpfn/prepare_test_set_upload": {
            "post": {
                "summary": "Prepare test set upload",
                "description": "Request signed upload URLs for test features associated with a fitted training set. PUT the file bytes to the returned signed URLs using `required_headers`.",
                "operationId": "tabpfn_prepare_test_set_upload",
                "tags": [
                    "Prediction"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PrepareTestSetUploadResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Test set already uploaded; reuse test_set_upload_id.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DuplicateTestSetErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Fitted training set not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFoundErrorResponse"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PrepareTestSetUploadRequest"
                            },
                            "example": {
                                "fitted_train_set_id": "22222222-2222-4222-8222-222222222222",
                                "x_test_info": {
                                    "format": "csv"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tabpfn/predict": {
            "post": {
                "summary": "Predict (TabPFN JSON API)",
                "description": "Predict using uploaded test features and a fitted training set. Select classification or regression in `task_config`; its `predict_params` controls the output. The response contains predictions, model metadata, and optional stage timings. Long-running requests may include keepalive whitespace before the final JSON payload.",
                "operationId": "tabpfn_predict",
                "tags": [
                    "Prediction"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PredictResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PredictRequest"
                            },
                            "example": {
                                "test_set_upload_id": "33333333-3333-4333-8333-333333333333",
                                "fitted_train_set_id": "22222222-2222-4222-8222-222222222222",
                                "task_config": {
                                    "task": "classification",
                                    "predict_params": {
                                        "output_type": "probas"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tabpfn/estimate_cost": {
            "post": {
                "summary": "Estimate token cost",
                "description": "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.",
                "operationId": "tabpfn_estimate_cost",
                "tags": [
                    "Metering"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EstimateCostResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EstimateCostRequest"
                            },
                            "example": {
                                "model_version": "v3.5",
                                "operation": "predict",
                                "train_rows": 10000,
                                "test_rows": 1000,
                                "raw_columns": 20,
                                "n_estimators": 8
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT",
                "description": "Bearer token for authentication, obtained after signing up and generating an API key."
            }
        },
        "schemas": {
            "AsyncSettings": {
                "additionalProperties": false,
                "properties": {
                    "use_above_trainset_size_bytes": {
                        "title": "Use Above Trainset Size Bytes",
                        "type": "integer"
                    },
                    "poll_timeout_secs": {
                        "title": "Poll Timeout Secs",
                        "type": "number"
                    }
                },
                "required": [
                    "use_above_trainset_size_bytes",
                    "poll_timeout_secs"
                ],
                "title": "AsyncSettings",
                "type": "object"
            },
            "ClassifierConfig": {
                "additionalProperties": false,
                "properties": {
                    "task": {
                        "const": "classification",
                        "default": "classification",
                        "title": "Task",
                        "type": "string"
                    },
                    "tabpfn_config": {
                        "$ref": "#/components/schemas/ClassifierTabPFNConfig"
                    },
                    "predict_params": {
                        "$ref": "#/components/schemas/ClassifierPredictParams"
                    }
                },
                "title": "ClassifierConfig",
                "type": "object"
            },
            "ClassifierFitTaskConfig": {
                "additionalProperties": false,
                "properties": {
                    "task": {
                        "const": "classification",
                        "default": "classification",
                        "title": "Task",
                        "type": "string"
                    },
                    "tabpfn_config": {
                        "$ref": "#/components/schemas/ClassifierTabPFNConfig"
                    }
                },
                "title": "ClassifierFitTaskConfig",
                "type": "object"
            },
            "ClassifierMetadata": {
                "additionalProperties": false,
                "properties": {
                    "test_set_num_rows": {
                        "title": "Test Set Num Rows",
                        "type": "integer"
                    },
                    "test_set_num_cols": {
                        "title": "Test Set Num Cols",
                        "type": "integer"
                    },
                    "n_estimators": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "N Estimators"
                    },
                    "billing_model_version": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Billing Model Version"
                    },
                    "execution_mode": {
                        "anyOf": [
                            {
                                "enum": [
                                    "standard",
                                    "thinking",
                                    "cache"
                                ],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Execution Mode"
                    },
                    "cache_outcome": {
                        "anyOf": [
                            {
                                "enum": [
                                    "not_requested",
                                    "hit",
                                    "miss",
                                    "fallback"
                                ],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Cache Outcome"
                    },
                    "task": {
                        "const": "classification",
                        "default": "classification",
                        "title": "Task",
                        "type": "string"
                    },
                    "package_version": {
                        "title": "Package Version",
                        "type": "string"
                    },
                    "tabpfn_config": {
                        "$ref": "#/components/schemas/ClassifierTabPFNConfig"
                    },
                    "classes": {
                        "anyOf": [
                            {
                                "items": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "boolean"
                                        }
                                    ]
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Classes"
                    },
                    "top_k": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Top K"
                    }
                },
                "required": [
                    "test_set_num_rows",
                    "test_set_num_cols",
                    "package_version",
                    "tabpfn_config"
                ],
                "title": "ClassifierMetadata",
                "type": "object"
            },
            "ClassifierOutputType": {
                "enum": [
                    "probas",
                    "preds",
                    "top_k"
                ],
                "title": "ClassifierOutputType",
                "type": "string"
            },
            "ClassifierPredictParams": {
                "additionalProperties": false,
                "properties": {
                    "output_type": {
                        "$ref": "#/components/schemas/ClassifierOutputType",
                        "default": "probas"
                    },
                    "top_k": {
                        "anyOf": [
                            {
                                "minimum": 1,
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Top K"
                    }
                },
                "title": "ClassifierPredictParams",
                "type": "object"
            },
            "ClassifierTabPFNConfig": {
                "additionalProperties": false,
                "properties": {
                    "n_estimators": {
                        "anyOf": [
                            {
                                "maximum": 8,
                                "minimum": 1,
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "N Estimators"
                    },
                    "categorical_features_indices": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "integer"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Categorical Features Indices"
                    },
                    "softmax_temperature": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Softmax Temperature"
                    },
                    "average_before_softmax": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Average Before Softmax"
                    },
                    "random_state": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Random State"
                    },
                    "inference_config": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Refer to tabpfn.inference_config.InferenceConfig for more details.",
                        "title": "Inference Config"
                    },
                    "inference_precision": {
                        "anyOf": [
                            {
                                "enum": [
                                    "autocast",
                                    "auto"
                                ],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Inference Precision"
                    },
                    "ignore_pretraining_limits": {
                        "default": true,
                        "title": "Ignore Pretraining Limits",
                        "type": "boolean"
                    },
                    "n_preprocessing_jobs": {
                        "default": 4,
                        "title": "N Preprocessing Jobs",
                        "type": "integer"
                    },
                    "fit_mode": {
                        "$ref": "#/components/schemas/FitMode",
                        "default": "fit_preprocessors"
                    },
                    "device": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 1,
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Stringified `torch.device`s",
                        "title": "Device"
                    },
                    "memory_saving_mode": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Memory Saving Mode"
                    },
                    "model_path": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Model Path"
                    },
                    "balance_probabilities": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Balance Probabilities"
                    }
                },
                "title": "ClassifierTabPFNConfig",
                "type": "object"
            },
            "DuplicateTestSetErrorResponse": {
                "additionalProperties": false,
                "properties": {
                    "message": {
                        "title": "Message",
                        "type": "string"
                    },
                    "error_code": {
                        "default": "DUPLICATE_TEST_SET_UPLOAD",
                        "title": "Error Code",
                        "type": "string",
                        "x-sdk-keep-default": true
                    },
                    "trace_id": {
                        "anyOf": [
                            {
                                "format": "uuid",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Trace Id"
                    },
                    "test_set_upload_id": {
                        "format": "uuid",
                        "title": "Test Set Upload Id",
                        "type": "string"
                    }
                },
                "required": [
                    "message",
                    "test_set_upload_id"
                ],
                "title": "DuplicateTestSetErrorResponse",
                "type": "object"
            },
            "DuplicateTrainSetErrorResponse": {
                "additionalProperties": false,
                "properties": {
                    "message": {
                        "title": "Message",
                        "type": "string"
                    },
                    "error_code": {
                        "default": "DUPLICATE_TRAIN_SET_UPLOAD",
                        "title": "Error Code",
                        "type": "string",
                        "x-sdk-keep-default": true
                    },
                    "trace_id": {
                        "anyOf": [
                            {
                                "format": "uuid",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Trace Id"
                    },
                    "train_set_upload_id": {
                        "format": "uuid",
                        "title": "Train Set Upload Id",
                        "type": "string"
                    }
                },
                "required": [
                    "message",
                    "train_set_upload_id"
                ],
                "title": "DuplicateTrainSetErrorResponse",
                "type": "object"
            },
            "ErrorResponse": {
                "additionalProperties": false,
                "properties": {
                    "message": {
                        "title": "Message",
                        "type": "string"
                    },
                    "error_code": {
                        "default": "GENERAL_ERROR",
                        "title": "Error Code",
                        "type": "string",
                        "x-sdk-keep-default": true
                    },
                    "trace_id": {
                        "anyOf": [
                            {
                                "format": "uuid",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Trace Id"
                    }
                },
                "required": [
                    "message"
                ],
                "title": "ErrorResponse",
                "type": "object"
            },
            "EstimateCostRequest": {
                "additionalProperties": false,
                "properties": {
                    "train_rows": {
                        "maximum": 2147483647,
                        "minimum": 1,
                        "title": "Train Rows",
                        "type": "integer"
                    },
                    "raw_columns": {
                        "maximum": 2147483647,
                        "minimum": 1,
                        "title": "Raw Columns",
                        "type": "integer"
                    },
                    "test_rows": {
                        "default": 0,
                        "maximum": 2147483647,
                        "minimum": 0,
                        "title": "Test Rows",
                        "type": "integer"
                    },
                    "model_version": {
                        "$ref": "#/components/schemas/ModelVersion",
                        "default": "v3.5"
                    },
                    "operation": {
                        "$ref": "#/components/schemas/QuotaOperation",
                        "default": "predict"
                    },
                    "n_estimators": {
                        "default": 8,
                        "maximum": 2147483647,
                        "minimum": 1,
                        "title": "N Estimators",
                        "type": "integer"
                    },
                    "thinking_effort": {
                        "anyOf": [
                            {
                                "enum": [
                                    "medium",
                                    "high"
                                ],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Thinking Effort"
                    }
                },
                "required": [
                    "train_rows",
                    "raw_columns"
                ],
                "title": "EstimateCostRequest",
                "type": "object"
            },
            "EstimateCostResponse": {
                "additionalProperties": false,
                "properties": {
                    "estimated_cost": {
                        "title": "Estimated Cost",
                        "type": "integer"
                    },
                    "pricing_version": {
                        "title": "Pricing Version",
                        "type": "string"
                    },
                    "inputs": {
                        "$ref": "#/components/schemas/EstimateCostRequest"
                    }
                },
                "required": [
                    "estimated_cost",
                    "pricing_version",
                    "inputs"
                ],
                "title": "EstimateCostResponse",
                "type": "object"
            },
            "FileInfo": {
                "additionalProperties": false,
                "properties": {
                    "format": {
                        "enum": [
                            "csv",
                            "parquet"
                        ],
                        "title": "Format",
                        "type": "string"
                    },
                    "hash": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The crc32c hash of the file, used to deduplicate the file.",
                        "title": "Hash"
                    },
                    "size_bytes": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "The size of the file in bytes, used to compute the optimal number of chunks when chunking is enabled.",
                        "title": "Size Bytes"
                    },
                    "use_chunks": {
                        "default": false,
                        "description": "Whether to split the the file into chunks and upload them in parallel.",
                        "title": "Use Chunks",
                        "type": "boolean"
                    }
                },
                "required": [
                    "format"
                ],
                "title": "FileInfo",
                "type": "object"
            },
            "FileUploadInfo": {
                "additionalProperties": false,
                "properties": {
                    "signed_urls": {
                        "items": {
                            "type": "string"
                        },
                        "minItems": 1,
                        "title": "Signed Urls",
                        "type": "array"
                    },
                    "expires_at": {
                        "title": "Expires At",
                        "type": "number"
                    },
                    "required_headers": {
                        "additionalProperties": {
                            "type": "string"
                        },
                        "title": "Required Headers",
                        "type": "object"
                    }
                },
                "required": [
                    "signed_urls",
                    "expires_at",
                    "required_headers"
                ],
                "title": "FileUploadInfo",
                "type": "object"
            },
            "FitMode": {
                "enum": [
                    "low_memory",
                    "fit_preprocessors",
                    "fit_with_cache",
                    "batched"
                ],
                "title": "FitMode",
                "type": "string"
            },
            "FitRequest": {
                "additionalProperties": false,
                "properties": {
                    "task_config": {
                        "discriminator": {
                            "mapping": {
                                "classification": "#/components/schemas/ClassifierFitTaskConfig",
                                "regression": "#/components/schemas/RegressorFitTaskConfig"
                            },
                            "propertyName": "task"
                        },
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/ClassifierFitTaskConfig"
                            },
                            {
                                "$ref": "#/components/schemas/RegressorFitTaskConfig"
                            }
                        ],
                        "title": "Task Config"
                    },
                    "tabpfn_systems": {
                        "default": [
                            "preprocessing",
                            "text"
                        ],
                        "items": {
                            "enum": [
                                "preprocessing",
                                "text",
                                "thinking"
                            ],
                            "type": "string"
                        },
                        "title": "Tabpfn Systems",
                        "type": "array"
                    },
                    "text_handling": {
                        "default": "advanced",
                        "enum": [
                            "advanced",
                            "simple"
                        ],
                        "title": "Text Handling",
                        "type": "string"
                    },
                    "thinking_config": {
                        "$ref": "#/components/schemas/ThinkingConfig"
                    },
                    "train_set_upload_id": {
                        "format": "uuid",
                        "title": "Train Set Upload Id",
                        "type": "string"
                    }
                },
                "required": [
                    "task_config",
                    "train_set_upload_id"
                ],
                "title": "FitRequest",
                "type": "object"
            },
            "FitResponse": {
                "additionalProperties": false,
                "properties": {
                    "fitted_train_set_id": {
                        "format": "uuid",
                        "title": "Fitted Train Set Id",
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/FitStatus"
                    },
                    "timings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/FitTimings"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null
                    }
                },
                "required": [
                    "fitted_train_set_id",
                    "status"
                ],
                "title": "FitResponse",
                "type": "object"
            },
            "FitStatus": {
                "enum": [
                    "pending",
                    "completed",
                    "failed"
                ],
                "title": "FitStatus",
                "type": "string"
            },
            "FitTimings": {
                "additionalProperties": false,
                "description": "Where a fit's time went. Queue wait covers everything outside worker\nprocessing: waiting for a free worker and transport.",
                "properties": {
                    "elapsed_s": {
                        "description": "Seconds from submission until the fit completed, or until now while it is pending.",
                        "title": "Elapsed S",
                        "type": "number"
                    },
                    "queue_wait_s": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Seconds the fit waited for a worker. Set once the fit completed.",
                        "title": "Queue Wait S"
                    },
                    "train_set_transform_s": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Seconds a worker spent loading, validating and preprocessing the train set. Set once the fit completed.",
                        "title": "Train Set Transform S"
                    },
                    "fit_s": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Seconds a worker spent fitting the model; 0 when the model is fitted at predict time. Set once the fit completed.",
                        "title": "Fit S"
                    }
                },
                "required": [
                    "elapsed_s"
                ],
                "title": "FitTimings",
                "type": "object"
            },
            "GetSettingsResponse": {
                "additionalProperties": false,
                "properties": {
                    "default_model_version": {
                        "$ref": "#/components/schemas/ModelVersion"
                    },
                    "max_model_limit": {
                        "$ref": "#/components/schemas/ModelLimit"
                    },
                    "model_limits": {
                        "additionalProperties": {
                            "$ref": "#/components/schemas/ModelLimit"
                        },
                        "propertyNames": {
                            "$ref": "#/components/schemas/ModelVersion"
                        },
                        "title": "Model Limits",
                        "type": "object"
                    },
                    "dataset_max_size_bytes": {
                        "title": "Dataset Max Size Bytes",
                        "type": "integer"
                    },
                    "async_settings": {
                        "$ref": "#/components/schemas/AsyncSettings"
                    }
                },
                "required": [
                    "default_model_version",
                    "max_model_limit",
                    "model_limits",
                    "dataset_max_size_bytes",
                    "async_settings"
                ],
                "title": "GetSettingsResponse",
                "type": "object"
            },
            "ModelLimit": {
                "additionalProperties": false,
                "properties": {
                    "train_set_max_rows": {
                        "title": "Train Set Max Rows",
                        "type": "integer"
                    },
                    "train_set_max_cells": {
                        "description": "Maximum training cells per estimator: selected rows times uploaded columns. Row subsampling can keep each context below this limit even when the full upload exceeds it.",
                        "title": "Train Set Max Cells",
                        "type": "integer"
                    },
                    "train_set_max_upload_cells": {
                        "description": "Maximum cells in the full training upload before row subsampling. This bounds the table processed before estimator contexts are selected.",
                        "title": "Train Set Max Upload Cells",
                        "type": "integer"
                    },
                    "test_set_max_rows": {
                        "title": "Test Set Max Rows",
                        "type": "integer"
                    },
                    "max_classes": {
                        "title": "Max Classes",
                        "type": "integer"
                    },
                    "max_cols": {
                        "title": "Max Cols",
                        "type": "integer"
                    },
                    "test_set_max_rows_w_full_regression_output": {
                        "title": "Test Set Max Rows W Full Regression Output",
                        "type": "integer"
                    },
                    "predict_row_pairs_budget": {
                        "title": "Predict Row Pairs Budget",
                        "type": "integer"
                    },
                    "test_set_max_cells": {
                        "readOnly": true,
                        "title": "Test Set Max Cells",
                        "type": "integer"
                    }
                },
                "required": [
                    "train_set_max_rows",
                    "train_set_max_cells",
                    "train_set_max_upload_cells",
                    "test_set_max_rows",
                    "max_classes",
                    "max_cols",
                    "test_set_max_rows_w_full_regression_output",
                    "predict_row_pairs_budget",
                    "test_set_max_cells"
                ],
                "title": "ModelLimit",
                "type": "object"
            },
            "ModelVersion": {
                "enum": [
                    "v2",
                    "v2.5",
                    "v2.6",
                    "v3",
                    "v3.5",
                    "v3.5-fast"
                ],
                "title": "ModelVersion",
                "type": "string"
            },
            "NotFoundErrorResponse": {
                "additionalProperties": false,
                "properties": {
                    "message": {
                        "title": "Message",
                        "type": "string"
                    },
                    "error_code": {
                        "default": "NOT_FOUND",
                        "title": "Error Code",
                        "type": "string",
                        "x-sdk-keep-default": true
                    },
                    "trace_id": {
                        "anyOf": [
                            {
                                "format": "uuid",
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Trace Id"
                    }
                },
                "required": [
                    "message"
                ],
                "title": "NotFoundErrorResponse",
                "type": "object"
            },
            "PredictRequest": {
                "additionalProperties": false,
                "properties": {
                    "test_set_upload_id": {
                        "format": "uuid",
                        "title": "Test Set Upload Id",
                        "type": "string"
                    },
                    "fitted_train_set_id": {
                        "format": "uuid",
                        "title": "Fitted Train Set Id",
                        "type": "string"
                    },
                    "task_config": {
                        "discriminator": {
                            "mapping": {
                                "classification": "#/components/schemas/ClassifierConfig",
                                "regression": "#/components/schemas/RegressorConfig"
                            },
                            "propertyName": "task"
                        },
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/ClassifierConfig"
                            },
                            {
                                "$ref": "#/components/schemas/RegressorConfig"
                            }
                        ],
                        "title": "Task Config"
                    }
                },
                "required": [
                    "test_set_upload_id",
                    "fitted_train_set_id",
                    "task_config"
                ],
                "title": "PredictRequest",
                "type": "object"
            },
            "PredictResponse": {
                "additionalProperties": false,
                "properties": {
                    "prediction": {
                        "anyOf": [
                            {
                                "items": {},
                                "type": "array"
                            },
                            {
                                "items": {
                                    "items": {},
                                    "type": "array"
                                },
                                "type": "array"
                            },
                            {
                                "additionalProperties": {
                                    "anyOf": [
                                        {
                                            "items": {},
                                            "type": "array"
                                        },
                                        {
                                            "items": {
                                                "items": {},
                                                "type": "array"
                                            },
                                            "type": "array"
                                        }
                                    ]
                                },
                                "type": "object"
                            }
                        ],
                        "title": "Prediction"
                    },
                    "metadata": {
                        "discriminator": {
                            "mapping": {
                                "classification": "#/components/schemas/ClassifierMetadata",
                                "regression": "#/components/schemas/RegressorMetadata"
                            },
                            "propertyName": "task"
                        },
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/ClassifierMetadata"
                            },
                            {
                                "$ref": "#/components/schemas/RegressorMetadata"
                            }
                        ],
                        "title": "Metadata"
                    },
                    "timings": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/PredictTimings"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null
                    }
                },
                "required": [
                    "prediction",
                    "metadata"
                ],
                "title": "PredictResponse",
                "type": "object"
            },
            "PredictTimings": {
                "additionalProperties": false,
                "description": "Where a predict's time went, per stage. Queue wait covers everything\noutside worker processing: waiting for a free worker and transport. A refit\nthe server triggers counts towards the stage it happened in.",
                "properties": {
                    "test_set_transform_queue_wait_s": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Seconds the test set transform waited for a worker. Null when an earlier request already transformed this test set.",
                        "title": "Test Set Transform Queue Wait S"
                    },
                    "test_set_transform_s": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Seconds a worker spent loading, validating and preprocessing the test set. Null when an earlier request already transformed this test set.",
                        "title": "Test Set Transform S"
                    },
                    "predict_queue_wait_s": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Seconds the prediction waited for a worker.",
                        "title": "Predict Queue Wait S"
                    },
                    "predict_s": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Seconds a worker spent predicting.",
                        "title": "Predict S"
                    }
                },
                "title": "PredictTimings",
                "type": "object"
            },
            "PrepareTestSetUploadRequest": {
                "additionalProperties": false,
                "properties": {
                    "fitted_train_set_id": {
                        "format": "uuid",
                        "title": "Fitted Train Set Id",
                        "type": "string"
                    },
                    "x_test_info": {
                        "$ref": "#/components/schemas/FileInfo"
                    },
                    "force_reupload": {
                        "default": false,
                        "description": "Whether to force the upload of the file even if a file with the same hash already exists.",
                        "title": "Force Reupload",
                        "type": "boolean"
                    }
                },
                "required": [
                    "fitted_train_set_id",
                    "x_test_info"
                ],
                "title": "PrepareTestSetUploadRequest",
                "type": "object"
            },
            "PrepareTestSetUploadResponse": {
                "additionalProperties": false,
                "properties": {
                    "test_set_upload_id": {
                        "format": "uuid",
                        "title": "Test Set Upload Id",
                        "type": "string"
                    },
                    "x_test_info": {
                        "$ref": "#/components/schemas/FileUploadInfo"
                    }
                },
                "required": [
                    "test_set_upload_id",
                    "x_test_info"
                ],
                "title": "PrepareTestSetUploadResponse",
                "type": "object"
            },
            "PrepareTrainSetUploadRequest": {
                "additionalProperties": false,
                "properties": {
                    "x_train_info": {
                        "$ref": "#/components/schemas/FileInfo"
                    },
                    "y_train_info": {
                        "$ref": "#/components/schemas/FileInfo"
                    },
                    "description": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Description"
                    },
                    "force_reupload": {
                        "default": false,
                        "description": "Whether to force the upload of the file even if a file with the same hash already exists.",
                        "title": "Force Reupload",
                        "type": "boolean"
                    }
                },
                "required": [
                    "x_train_info",
                    "y_train_info"
                ],
                "title": "PrepareTrainSetUploadRequest",
                "type": "object"
            },
            "PrepareTrainSetUploadResponse": {
                "additionalProperties": false,
                "properties": {
                    "train_set_upload_id": {
                        "format": "uuid",
                        "title": "Train Set Upload Id",
                        "type": "string"
                    },
                    "x_train_info": {
                        "$ref": "#/components/schemas/FileUploadInfo"
                    },
                    "y_train_info": {
                        "$ref": "#/components/schemas/FileUploadInfo"
                    }
                },
                "required": [
                    "train_set_upload_id",
                    "x_train_info",
                    "y_train_info"
                ],
                "title": "PrepareTrainSetUploadResponse",
                "type": "object"
            },
            "QuotaOperation": {
                "enum": [
                    "predict",
                    "thinking_predict",
                    "thinking_fit",
                    "cache_predict"
                ],
                "title": "QuotaOperation",
                "type": "string"
            },
            "RegressorConfig": {
                "additionalProperties": false,
                "properties": {
                    "task": {
                        "const": "regression",
                        "default": "regression",
                        "title": "Task",
                        "type": "string"
                    },
                    "tabpfn_config": {
                        "$ref": "#/components/schemas/RegressorTabPFNConfig"
                    },
                    "predict_params": {
                        "$ref": "#/components/schemas/RegressorPredictParams"
                    }
                },
                "title": "RegressorConfig",
                "type": "object"
            },
            "RegressorFitTaskConfig": {
                "additionalProperties": false,
                "properties": {
                    "task": {
                        "const": "regression",
                        "default": "regression",
                        "title": "Task",
                        "type": "string"
                    },
                    "tabpfn_config": {
                        "$ref": "#/components/schemas/RegressorTabPFNConfig"
                    }
                },
                "title": "RegressorFitTaskConfig",
                "type": "object"
            },
            "RegressorMetadata": {
                "additionalProperties": false,
                "properties": {
                    "test_set_num_rows": {
                        "title": "Test Set Num Rows",
                        "type": "integer"
                    },
                    "test_set_num_cols": {
                        "title": "Test Set Num Cols",
                        "type": "integer"
                    },
                    "n_estimators": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "N Estimators"
                    },
                    "billing_model_version": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Billing Model Version"
                    },
                    "execution_mode": {
                        "anyOf": [
                            {
                                "enum": [
                                    "standard",
                                    "thinking",
                                    "cache"
                                ],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Execution Mode"
                    },
                    "cache_outcome": {
                        "anyOf": [
                            {
                                "enum": [
                                    "not_requested",
                                    "hit",
                                    "miss",
                                    "fallback"
                                ],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Cache Outcome"
                    },
                    "task": {
                        "const": "regression",
                        "default": "regression",
                        "title": "Task",
                        "type": "string"
                    },
                    "package_version": {
                        "title": "Package Version",
                        "type": "string"
                    },
                    "tabpfn_config": {
                        "$ref": "#/components/schemas/RegressorTabPFNConfig"
                    }
                },
                "required": [
                    "test_set_num_rows",
                    "test_set_num_cols",
                    "package_version",
                    "tabpfn_config"
                ],
                "title": "RegressorMetadata",
                "type": "object"
            },
            "RegressorOutputType": {
                "enum": [
                    "mean",
                    "median",
                    "mode",
                    "quantiles",
                    "full",
                    "main"
                ],
                "title": "RegressorOutputType",
                "type": "string"
            },
            "RegressorPredictParams": {
                "additionalProperties": false,
                "properties": {
                    "output_type": {
                        "$ref": "#/components/schemas/RegressorOutputType",
                        "default": "mean"
                    },
                    "quantiles": {
                        "anyOf": [
                            {
                                "items": {
                                    "maximum": 1.0,
                                    "minimum": 0.0,
                                    "type": "number"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Quantiles"
                    }
                },
                "title": "RegressorPredictParams",
                "type": "object"
            },
            "RegressorTabPFNConfig": {
                "additionalProperties": false,
                "properties": {
                    "n_estimators": {
                        "anyOf": [
                            {
                                "maximum": 8,
                                "minimum": 1,
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "N Estimators"
                    },
                    "categorical_features_indices": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "integer"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Categorical Features Indices"
                    },
                    "softmax_temperature": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Softmax Temperature"
                    },
                    "average_before_softmax": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Average Before Softmax"
                    },
                    "random_state": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Random State"
                    },
                    "inference_config": {
                        "anyOf": [
                            {
                                "additionalProperties": true,
                                "type": "object"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Refer to tabpfn.inference_config.InferenceConfig for more details.",
                        "title": "Inference Config"
                    },
                    "inference_precision": {
                        "anyOf": [
                            {
                                "enum": [
                                    "autocast",
                                    "auto"
                                ],
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Inference Precision"
                    },
                    "ignore_pretraining_limits": {
                        "default": true,
                        "title": "Ignore Pretraining Limits",
                        "type": "boolean"
                    },
                    "n_preprocessing_jobs": {
                        "default": 4,
                        "title": "N Preprocessing Jobs",
                        "type": "integer"
                    },
                    "fit_mode": {
                        "$ref": "#/components/schemas/FitMode",
                        "default": "fit_preprocessors"
                    },
                    "device": {
                        "anyOf": [
                            {
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 1,
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "description": "Stringified `torch.device`s",
                        "title": "Device"
                    },
                    "memory_saving_mode": {
                        "anyOf": [
                            {
                                "type": "boolean"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Memory Saving Mode"
                    },
                    "model_path": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Model Path"
                    }
                },
                "title": "RegressorTabPFNConfig",
                "type": "object"
            },
            "ThinkingConfig": {
                "additionalProperties": false,
                "properties": {
                    "effort": {
                        "default": "medium",
                        "enum": [
                            "medium",
                            "high"
                        ],
                        "title": "Effort",
                        "type": "string"
                    },
                    "timeout_secs": {
                        "anyOf": [
                            {
                                "maximum": 2400.0,
                                "type": "number"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Timeout Secs"
                    },
                    "metric": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Metric"
                    },
                    "group_col": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Group Col"
                    },
                    "time_col": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Time Col"
                    },
                    "group_time_col": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "default": null,
                        "title": "Group Time Col"
                    }
                },
                "title": "ThinkingConfig",
                "type": "object"
            }
        }
    },
    "x-source-revision": {
        "repository": "PriorLabs/tabpfn-server",
        "commit": "e47168476cfa239d76eb025c863e1e703bf56cf9",
        "reviewed": "2026-09-29"
    }
}
