---
title: "Create Index"
method: POST
path: "/api/v1/indexes"
tags: ["Indexes"]
---

# Create Index

`POST /api/v1/indexes`

Create a searchable index over a source directory.

## Query parameters

- `project_id` string, uuid, nullable
- `organization_id` string, uuid, nullable

## Cookies

- `session` string, nullable

## Request body

- IndexCreateRequest — Create a searchable index over a source directory. Sets up the full pipeline — parsing, chunking, embedding, and vector store indexing — in a single call. An initial sync is triggered automatically. Omit ``products`` to use a default parse configuration (cost-effective tier). Pass it explicitly to control parsing or to include extraction.
  - `source_directory_id` string, required — ID of the source directory containing your documents.
  - `name` string, nullable — Optional display name for the index. If omitted, the index is named after the source directory.
  - `products` IndexProductEntry[], nullable — Product configurations for syncing. Omit to use a default parse configuration. Include an explicit entry per product type (e.g. parse, extract) to override the default.
    - `product_type` string, required — Product type. One of: parse, extract.
    - `product_config_id` string, required — ID of the product configuration.
  - `description` string, nullable — Optional description of the index.
  - `sync_frequency` string — How often to re-run the sync. One of: manual, daily, on_source_change. Defaults to manual.
  - `store_attachments` string[], nullable — Attachment kinds to store alongside parsed output. Each entry must be one of: screenshots, items. For example, ['screenshots'] renders and stores per-page screenshots; ['items'] stores structured items with bounding boxes. Omit or pass an empty list to skip attachments.
  - `vector_target` 'DEFAULT' | 'DISABLED' — Vector export destination for the index. 'DEFAULT' exports to the managed vector DB destination resolved from configuration. 'DISABLED' skips vector export — the export destination falls back to 'Download'.

## Response `201`

Successful Response

- IndexResponse — A searchable index over a directory of documents.
  - `id` union, required — Unique identifier
    - string
    - string, uuid
  - `created_at` string, date-time, nullable — Creation datetime
  - `updated_at` string, date-time, nullable — Update datetime
  - `name` string, required — Index name.
  - `description` string, nullable — Index description.
  - `project_id` string, required — Project this index belongs to.
  - `source_directory_id` string, required — ID of the source directory.
  - `sync_config_id` string, required — ID of the sync configuration.
  - `export_config_id` string, required — ID of the export configuration.
  - `last_synced_at` string, date-time, nullable — Last sync time.
  - `last_exported_at` string, date-time, nullable — Last export time.
  - `metadata` IndexMetadata — Build state and diagnostic info about an index. Schema is open; only `status` of `ready` or `failed` is stable.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.net/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/run-llama/llama-platform/revisions/b17341164de9/schema)
