> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Prepare test set upload

> **Recommended:** Use [tabpfn-client](https://github.com/PriorLabs/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.



## OpenAPI

````yaml /api-reference/openapi.json post /tabpfn/prepare_test_set_upload
openapi: 3.1.0
info:
  title: TabPFN API
  description: >-
    Prior Labs TabPFN API. **Prefer
    [tabpfn-client](https://github.com/PriorLabs/tabpfn-client)**. Current
    integration surface: **`/tabpfn/*` JSON routes** (prepare uploads, fit,
    predict, limits). **`/v1/*` multipart routes are deprecated.** See the
    [Changelog](/changelog).
  version: 2.0.0
  contact:
    name: Prior Labs
    email: hello@priorlabs.ai
servers:
  - url: https://api.priorlabs.ai
    description: Production TabPFN API (`/tabpfn/*` current; `/v1/*` deprecated)
security:
  - BearerAuth: []
paths:
  /tabpfn/prepare_test_set_upload:
    post:
      tags:
        - Prediction
      summary: Prepare test set upload
      description: >-
        **Recommended:** Use
        [tabpfn-client](https://github.com/PriorLabs/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.
      operationId: tabpfn_prepare_test_set_upload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareTestSetUploadRequest'
            example:
              fitted_train_set_id: 323e4567-e89b-12d3-a456-426614174000
              x_test_info:
                filename: X_test.csv
                size_bytes: 512
                content_hash: ghi
      responses:
        '200':
          description: Test upload id and signed URLs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepareTestSetUploadResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    PrepareTestSetUploadRequest:
      properties:
        fitted_train_set_id:
          type: string
          format: uuid
          title: Fitted Train Set Id
        x_test_info:
          $ref: '#/components/schemas/FileInfo'
        force_reupload:
          type: boolean
          title: Force Reupload
          description: >-
            Whether to force the upload of the file even if a file with the same
            hash already exists.
          default: false
      additionalProperties: false
      type: object
      required:
        - fitted_train_set_id
        - x_test_info
      title: PrepareTestSetUploadRequest
    PrepareTestSetUploadResponse:
      properties:
        test_set_upload_id:
          type: string
          format: uuid
          title: Test Set Upload Id
        x_test_info:
          $ref: '#/components/schemas/FileUploadInfo'
      additionalProperties: false
      type: object
      required:
        - test_set_upload_id
        - x_test_info
      title: PrepareTestSetUploadResponse
    FileInfo:
      properties:
        format:
          type: string
          enum:
            - csv
            - parquet
          title: Format
        hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Hash
          description: The crc32c hash of the file, used to deduplicate the file.
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: >-
            The size of the file in bytes, used to compute the optimal number of
            chunks when chunking is enabled.
        use_chunks:
          type: boolean
          title: Use Chunks
          description: >-
            Whether to split the the file into chunks and upload them in
            parallel.
          default: false
      additionalProperties: false
      type: object
      required:
        - format
      title: FileInfo
    FileUploadInfo:
      properties:
        signed_urls:
          items:
            type: string
          type: array
          minItems: 1
          title: Signed Urls
        expires_at:
          type: number
          title: Expires At
        required_headers:
          additionalProperties:
            type: string
          type: object
          title: Required Headers
      additionalProperties: false
      type: object
      required:
        - signed_urls
        - expires_at
        - required_headers
      title: FileUploadInfo
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token for authentication, obtained after signing up and
        generating an API key.

````