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

# Create a table

> Create a table with an Arrow schema and optional full-text and vector indexes.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/create_table/{database}
openapi: 3.1.0
info:
  title: Infino API
  description: >-
    The Infino hosted data-plane API: per-database table operations — create,
    ingest, search, and SQL.
  version: 0.1.0
servers:
  - url: https://api.platform.infino.ws
    description: Infino Cloud
security:
  - api_key: []
tags:
  - name: Databases
    description: Create, list, and delete the databases in your account.
  - name: Tables
    description: Create, drop, and list tables, and describe a table's schema.
  - name: Rows
    description: Append, update, and delete rows.
  - name: Search
    description: BM25, vector, and hybrid search, token and exact match, count, and SQL.
paths:
  /v1/create_table/{database}:
    post:
      tags:
        - Tables
      summary: Create a table
      description: >-
        Create a table with an Arrow schema and optional full-text and vector
        indexes.
      operationId: create_table
      parameters:
        - name: database
          in: path
          description: Target database.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTableRequest'
        required: true
      responses:
        '200':
          description: Table created.
        '400':
          description: >-
            Invalid request body, or a malformed table name — use non-empty
            [A-Za-z0-9_-], at most 128 characters, not starting with '_'.
        '401':
          description: Missing or invalid API key.
        '409':
          description: >-
            Either the table name already exists — terminal, pick another name —
            or another catalog change was in flight, so this one was not
            applied. Every table in a database is created through one catalog.
            The second case carries a `Retry-After`; reissue the identical
            request after it.
        '503':
          description: >-
            The database's workers are still activating, or no capacity is free
            to place them. Transient — retry after the `Retry-After` interval.
      security:
        - api_key: []
components:
  schemas:
    CreateTableRequest:
      type: object
      description: '`POST /v1/create_table/{database}`.'
      required:
        - table_name
      properties:
        indexes:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Indexes'
        schema:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/SchemaField'
          description: |-
            JSON column descriptors. Exactly one of `schema` or `schema_ipc` is
            required. Cannot express nested types; use `schema_ipc` for those.
        schema_ipc:
          type:
            - string
            - 'null'
          description: >-
            The table's Arrow schema as a base64-encoded Arrow IPC stream
            carrying

            only the schema message. Exactly one of `schema` or `schema_ipc` is

            required. Carries any Arrow type the engine accepts, nested
            included.
        table_name:
          type: string
      additionalProperties: false
    Indexes:
      type: object
      description: Index declarations for `create_table`.
      properties:
        fts:
          type:
            - array
            - 'null'
          items:
            type: string
          description: FTS-indexed column names.
        vector:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/VectorIndex'
          description: Vector index declarations.
      additionalProperties: false
    SchemaField:
      type: object
      description: >-
        One column in a `create_table` schema. A scalar column is `{name, type}`
        where `type` is a scalar spelling (`"i32"`, `"large_utf8"`, …); a vector
        column is `{name, type: "vector", dim}`; a list column is `{name, type:
        "list", item}`. `dim` is required for `"vector"` and `item` for
        `"list"`.
      required:
        - name
        - type
      properties:
        dim:
          type:
            - integer
            - 'null'
          description: 'Fixed length, required for `type: "vector"`. Must be in [1, 4096].'
          maximum: 4096
          minimum: 1
        item:
          type:
            - string
            - 'null'
          description: 'Element scalar type, required for `type: "list"`.'
        name:
          type: string
          description: Column name.
        nullable:
          type:
            - boolean
            - 'null'
          description: Defaults to `true` when omitted.
        type:
          type: string
          description: Scalar spelling, or `"vector"` / `"list"`.
      additionalProperties: false
    VectorIndex:
      type: object
      description: One vector index declaration under `indexes.vector`.
      required:
        - column
        - metric
      properties:
        column:
          type: string
        dim:
          type:
            - integer
            - 'null'
          description: >-
            Redundant with the schema column's declared width; the server
            resolves

            the dimension from the schema, so this is optional and, if given,
            must

            agree.
          minimum: 0
        metric:
          $ref: '#/components/schemas/Metric'
      additionalProperties: false
    Metric:
      type: string
      description: |-
        Vector distance metric. Accepted case-insensitively, with the aliases
        `l2` → `l2sq` and `dot` → `negdot`; serialized canonically.
      enum:
        - cosine
        - l2sq
        - negdot
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````