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

# Create Opensearch Collection

`POST /vector/store/create`

## Endpoint to Create a Vector Store
This endpoint creates a vector store and returns the store ID that can be used to create an index.

***
## Request Body

| Field               | Type   | Description                      |
|---------------------|--------|----------------------------------|
| store_type          | str    | The type of the vector store.    |
| description         | str    | The description of the vector store. |
| tags                | Optional[Dict[str, str]] | Tags to associate with the vector store. |

***

## Example Request Body

    ```json

    {
        "store_type": "opensearchserverless",
        "description": "A vector store for semantic search.",
        "tags": {
            "environment": "production",
            "team": "data"
        }
    }

    ```

***
## Response Body

| Field               | Type   | Description                      |
|---------------------|--------|----------------------------------|
| store_name          | str    | The name of the created store.   |
| store_type          | str    | The type of the created store.   |
| store_id            | str    | The ID of the created 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

- CreateVectorStoreRequest
  - `store_name` string, required
  - `store_type` string, required
  - `description` string
  - `tags` object[]

## Response `200`

Successful Response

- CreateVectorStoreResponse
  - `store_name` string, required
  - `store_type` string, required
  - `store_id` 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)
