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

# Create Table

> Create a new Table. A default sheet with one text column is created automatically. Requests are scoped to the workspace associated with the API key; table, sheet, column, cell, operation, and version IDs must belong to that workspace.

Create a new Table. A default sheet with one text column is created automatically.

The table is created in the workspace associated with your API key.

Tables are versioned, multi-sheet tables that can run LLM, code, and comparison columns to generate or evaluate data at scale.


## OpenAPI

````yaml POST /api/public/v2/tables
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/public/v2/tables:
    post:
      tags:
        - smart-tables
      summary: Create Table
      description: >-
        Create a new Table. A default sheet with one text column is created
        automatically. Requests are scoped to the workspace associated with the
        API key; table, sheet, column, cell, operation, and version IDs must
        belong to that workspace.
      operationId: create_table
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: >-
                    Table title. Defaults to a unique 'Untitled Table' name if
                    omitted.
                  nullable: true
                folder_id:
                  type: integer
                  description: Folder to place the table in.
                  nullable: true
      responses:
        '201':
          description: Table created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  table:
                    $ref: '#/components/schemas/TableDetail'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Folder not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    TableDetail:
      allOf:
        - $ref: '#/components/schemas/Table'
      type: object
      properties:
        sheet_row_counts:
          type: object
          description: Map of sheet_id → row count.
          additionalProperties:
            type: integer
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
          description: Indicates that the request failed.
        message:
          type: string
          description: Human-readable error message.
        error:
          type: string
          description: Machine-readable or fallback error message.
      additionalProperties: true
      description: >-
        Standard error response. Some legacy endpoints may return either message
        or error.
    Table:
      type: object
      description: >-
        A Table — a versioned, multi-sheet table that can run LLM columns to
        generate or evaluate data at scale.
      properties:
        id:
          type: string
          format: uuid
          description: Unique table identifier.
        workspace_id:
          type: integer
          description: >-
            Workspace that owns this resource; determined by the authenticated
            request scope.
        title:
          type: string
        folder_id:
          type: integer
          nullable: true
        sheet_count:
          type: integer
          description: Number of active sheets.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  responses:
    UnauthorizedError:
      description: Unauthorized - missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Validation error - request parameters or body are invalid.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/HTTPValidationError'
              - $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````