> ## 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.

# Get model limits

> **Recommended:** Use [tabpfn-client](https://github.com/PriorLabs/tabpfn-client) (`TabPFNClassifier` / `TabPFNRegressor`). It calls these routes for you.

Returns `default_model_version`, per-version `model_limits` (rows, cells, classes, cols), and `dataset_max_size_bytes`. The client calls this to size-check before upload.



## OpenAPI

````yaml /api-reference/openapi.json get /tabpfn/get_model_limits
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/get_model_limits:
    get:
      tags:
        - Training
      summary: Get model limits
      description: >-
        **Recommended:** Use
        [tabpfn-client](https://github.com/PriorLabs/tabpfn-client)
        (`TabPFNClassifier` / `TabPFNRegressor`). It calls these routes for you.


        Returns `default_model_version`, per-version `model_limits` (rows,
        cells, classes, cols), and `dataset_max_size_bytes`. The client calls
        this to size-check before upload.
      operationId: tabpfn_get_model_limits
      responses:
        '200':
          description: Limits envelope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetModelLimitsResponse'
        '401':
          description: >-
            Unauthorized — authentication required or credentials invalid.


            **Possible causes:**

            - Missing or malformed `Authorization` header

            - Invalid or expired JWT token

            - User not found (token references a deleted account)

            - JWT decode errors (JWEDecodeError, JWTDecodeError, JWTClaimsError)


            **Examples:**

            - Missing token: `{"detail": "Not authenticated"}`

            - Invalid credentials: `{"detail": "Could not validate
            credentials"}`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missing_token:
                  value:
                    code: auth.unauthorized
                    detail: Not authenticated
                    retryable: false
                    support: https://discord.com/invite/VJRuU3bSxt
                invalid_credentials:
                  value:
                    code: auth.unauthorized
                    detail: Could not validate credentials
                    retryable: false
                    support: https://discord.com/invite/VJRuU3bSxt
                expired_token:
                  value:
                    code: auth.unauthorized
                    detail: Invalid or expired JWT token
                    retryable: false
                    support: https://discord.com/invite/VJRuU3bSxt
      security:
        - BearerAuth: []
components:
  schemas:
    GetModelLimitsResponse:
      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'
          type: object
          title: Model Limits
        dataset_max_size_bytes:
          type: integer
          title: Dataset Max Size Bytes
      additionalProperties: false
      type: object
      required:
        - default_model_version
        - max_model_limit
        - model_limits
        - dataset_max_size_bytes
      title: GetModelLimitsResponse
    ErrorResponse:
      type: object
      required:
        - code
        - detail
        - retryable
        - support
      properties:
        code:
          type: string
          description: Error category code (e.g., auth.unauthorized, rate.limit.exceeded)
          example: auth.unauthorized
        detail:
          type: string
          description: Human-readable error message describing what went wrong.
          example: Invalid authentication credentials
        retryable:
          type: boolean
          description: Indicates whether the request can be retried.
          example: false
        support:
          type: string
          description: URL to get support for this error.
          example: https://discord.com/invite/VJRuU3bSxt
      example:
        code: auth.unauthorized
        detail: Invalid authentication credentials
        retryable: false
        support: https://discord.com/invite/VJRuU3bSxt
    ModelVersion:
      type: string
      enum:
        - v2
        - v2.5
        - v2.6
        - v3
      title: ModelVersion
    ModelLimit:
      properties:
        train_set_max_rows:
          type: integer
          title: Train Set Max Rows
        train_set_max_cells:
          type: integer
          title: Train Set Max Cells
        test_set_max_rows:
          type: integer
          title: Test Set Max Rows
        max_classes:
          type: integer
          title: Max Classes
        max_cols:
          type: integer
          title: Max Cols
          default: 2000
        test_set_max_rows_w_full_regression_output:
          type: integer
          title: Test Set Max Rows W Full Regression Output
          default: 400
        test_set_max_cells:
          type: integer
          title: Test Set Max Cells
          readOnly: true
      type: object
      required:
        - train_set_max_rows
        - train_set_max_cells
        - test_set_max_rows
        - max_classes
        - test_set_max_cells
      title: ModelLimit
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token for authentication, obtained after signing up and
        generating an API key.

````