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

# Create Index

> Create an empty index (synchronous).

Allocates the DB record, writes an empty serialized engine to blob
storage with the provided config, and marks the index ``ready``. Files
are added later via ``POST /indexes/{index_id}/files`` (which kicks off
a batch-mutation workflow).



## OpenAPI

````yaml https://dex.sgp.scale.com/openapi.json post /v1/projects/{project_id}/indexes
openapi: 3.1.0
info:
  title: Document Understanding API
  description: API for uploading and processing documents
  version: 0.4.5
servers: []
security:
  - ApiKey: []
    AccountId: []
tags:
  - name: Projects
    description: Operations related to project creation and management
  - name: Files
    description: Operations related to file upload and access
  - name: Parse
    description: Operations related to starting parse jobs and accessing their results
  - name: Vector Stores
    description: Operations related to vector store creation and management
  - name: Extract
    description: Operations related to starting extract jobs and accessing their results
  - name: Research
    description: Dex Research agent kickoff and results.
  - name: Jobs
    description: Operations related to monitoring jobs and their status
paths:
  /v1/projects/{project_id}/indexes:
    post:
      tags:
        - Indexes
      summary: Create Index
      description: |-
        Create an empty index (synchronous).

        Allocates the DB record, writes an empty serialized engine to blob
        storage with the provided config, and marks the index ``ready``. Files
        are added later via ``POST /indexes/{index_id}/files`` (which kicks off
        a batch-mutation workflow).
      operationId: create_index_v1_projects__project_id__indexes_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileSystemIndexCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexEntity'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FileSystemIndexCreateRequest:
      properties:
        name:
          type: string
          title: Name
          description: Display name of the index
        engine_type:
          type: string
          const: file_system
          title: Engine Type
          default: file_system
        model:
          type: string
          title: Model
          description: Model to use for summarization
          default: openai/gpt-4o-mini
        file_summarization_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: File Summarization Prompt
          description: Custom instructions for file summarization
        folder_summarization_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Folder Summarization Prompt
          description: Custom instructions for folder summarization
      type: object
      required:
        - name
      title: FileSystemIndexCreateRequest
      description: Create request for the file-system index engine.
    IndexEntity:
      properties:
        id:
          type: string
          title: Id
          description: ID of the entity
        project_id:
          type: string
          title: Project Id
          description: ID of the project
        name:
          type: string
          title: Name
          description: Display name of the index
        engine_type:
          $ref: '#/components/schemas/IndexEngineType'
          description: Type of index engine
        status:
          $ref: '#/components/schemas/IndexStatus'
          description: Index status
          default: pending
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Last update timestamp
        config:
          additionalProperties: true
          type: object
          title: Config
          description: Engine-specific config
        nodes:
          items:
            $ref: '#/components/schemas/Node'
          type: array
          title: Nodes
          description: Index tree nodes
      type: object
      required:
        - id
        - project_id
        - name
        - engine_type
        - created_at
        - updated_at
      title: IndexEntity
      description: Full index entity with nodes and config (returned by get by ID).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IndexEngineType:
      type: string
      enum:
        - file_system
      title: IndexEngineType
    IndexStatus:
      type: string
      enum:
        - pending
        - ready
        - updating
        - failed
      title: IndexStatus
    Node:
      properties:
        id:
          type: string
          title: Id
        text:
          type: string
          title: Text
        level:
          type: integer
          title: Level
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        children_ids:
          items:
            type: string
          type: array
          title: Children Ids
      type: object
      required:
        - id
        - text
        - level
      title: Node
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication
    AccountId:
      type: apiKey
      in: header
      name: x-selected-account-id
      description: Selected Account ID

````