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

# Create an index

> Create an index with given specifications.



## OpenAPI

````yaml /api-reference/specs/indexes.yaml put /api/v1/indexes/{indexName}/create
openapi: 3.0.3
info:
  title: EigenDB REST API
  description: REST API for EigenDB.
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/v1/indexes/{indexName}/create:
    put:
      summary: Create an index
      description: Create an index with given specifications.
      operationId: createIndex
      parameters:
        - name: indexName
          in: path
          description: Name of the index
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - dimensions
                - metric
              properties:
                dimensions:
                  type: number
                  format: integer
                  description: Dimensions of the index
                metric:
                  type: string
                  description: The similarity metric for the index
      responses:
        '200':
          description: Index created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseSchema'
              example:
                status: 200
                message: Index '<indexName>' created successfully.
        '500':
          description: Invalid similarity metric (currently supporting cosine, l2, ip)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseSchema'
              example:
                status: 500
                message: An error occured while creating the index.
                error:
                  code: INVALID_SIMILARITY_METRIC
                  description: detailed description of the error...
components:
  schemas:
    responseSchema:
      type: object
      properties:
        status:
          type: integer
          description: Status code of the response
        message:
          type: string
          description: Message giving basic information on the response
        data:
          type: object
          description: Important data to be given to the caller
        error:
          type: object
          description: An error that has occured
          properties:
            code:
              type: string
              description: An error code unique to this type of error
            description:
              type: string
              description: A detailed description of the error
      required:
        - status
        - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Eigen-API-Key

````