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

> Register a new database for your account.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/databases
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/databases:
    post:
      tags:
        - Databases
      summary: Create a database
      description: Register a new database for your account.
      operationId: create_database
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDatabaseRequest'
        required: true
      responses:
        '201':
          description: Database registered.
        '401':
          description: No valid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '402':
          description: The account has not completed onboarding.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: >-
            The API key may not address this database, or the account is not
            entitled to storage bindings (BYOB is an enterprise feature).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '409':
          description: Database already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - api_key: []
components:
  schemas:
    CreateDatabaseRequest:
      type: object
      description: Create-database request.
      required:
        - name
      properties:
        name:
          type: string
          description: The database name, unique within the account.
        storage:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CreateDatabaseStorage'
              description: >-
                Bring-your-own-bucket: where this database's data should live.
                Omitted

                means platform-hosted storage, exactly as before this field
                existed.
    ErrorBody:
      type: object
      description: A JSON error body.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
    CreateDatabaseStorage:
      oneOf:
        - type: object
          description: Amazon S3 (or an S3-compatible store via `endpoint`).
          required:
            - bucket
            - region
            - role_arn
            - provider
          properties:
            bucket:
              type: string
              description: The customer's bucket.
            endpoint:
              type:
                - string
                - 'null'
              description: Custom endpoint for an S3-compatible store (https only).
            prefix:
              type:
                - string
                - 'null'
              description: >-
                Root inside the bucket under which everything the platform
                writes

                lives. Omitted roots at the bucket.
            provider:
              type: string
              enum:
                - s3
            region:
              type: string
              description: The bucket's region.
            requester_pays:
              type: boolean
              description: Whether the bucket has Requester Pays enabled.
            role_arn:
              type: string
              description: |-
                The customer-owned IAM role the platform will assume
                (`arn:aws:iam::<account>:role/<name>`).
        - type: object
          description: |-
            Google Cloud Storage: the customer grants the platform's service
            account an object role on the bucket.
          required:
            - bucket
            - region
            - provider
          properties:
            bucket:
              type: string
              description: The customer's bucket.
            prefix:
              type:
                - string
                - 'null'
              description: Root inside the bucket. Omitted roots at the bucket.
            provider:
              type: string
              enum:
                - gcs
            region:
              type: string
              description: The bucket's region.
        - type: object
          description: |-
            Azure Blob Storage: the customer admin-consents the platform's Entra
            application and grants it a data role on the storage account.
          required:
            - container
            - region
            - tenant_id
            - provider
          properties:
            container:
              type: string
              description: The customer's container.
            prefix:
              type:
                - string
                - 'null'
              description: Root inside the container. Omitted roots at the container.
            provider:
              type: string
              enum:
                - azure
            region:
              type: string
              description: The storage account's region.
            tenant_id:
              type: string
              description: The customer's Entra tenant id.
      description: >-
        A requested storage binding, tagged by provider. Deliberately NOT the

        stored [`StorageBinding`] shape: the AWS external id is generated by the

        platform during the create call and returned to the caller — accepting
        one

        from the request would let a caller reuse another binding's id and
        reopen

        the confused-deputy hole the id exists to close.
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````