---
title: "Create Opensearch Index"
method: POST
path: "/vector/store/index/create"
tags: ["Vectorization"]
---

# Create Opensearch Index

`POST /vector/store/index/create`

## Endpoint to Create an Index
This endpoint creates an index in the specified vector store.

***
## Request Body

| Field               | Type   | Description                      |
|---------------------|--------|----------------------------------|
| store_id            | str    | The ID of the vector store.      |
| index_name          | str    | The name of the index to create. |

***
## Example Request Body

    ```json

    {
        "store_id": "b1c2b4c5-6d7e-8f9g-0h1i-2j3k4l5m6n7",
        "index_name": "my_index"
    }

    ```

***
## Response Body

| Field               | Type   | Description                      |
|---------------------|--------|----------------------------------|
| index_name          | str    | The name of the created index.   |
| index_id            | str    | The ID of the created index.     |
| store_id            | str    | The ID of the vector store.      |
| store_type          | str    | The type of the vector store.    |
| message             | str    | A message indicating the status of the operation. |

***
#### Errors

- **400 Bad Request**: If the store type is not supported.
- **500 Internal Server Error**: If there is an unexpected error during the creation of the vector store.

## Request body

- CreateIndexRequest
  - `store_id` string, required
  - `index_name` string, required

## Response `200`

Successful Response

- CreateIndexResponse
  - `index_name` string, required
  - `index_id` string, required
  - `store_id` string, required
  - `store_type` string, required
  - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/aws-samples/apis/generative-ai-foundational-platform-api.md) · [All operations](https://skmtc.dev/aws-samples/apis/generative-ai-foundational-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aws-samples/generative-ai-foundational-platform-api/revisions/8831d08902e9/schema)
