# Add Collection Item

`POST https://api.vultrinference.com/v1/vector_store/{id}/items`

Adds an item to a vector store collection.

## Path parameters

- `id` (string, required): The ID of the vector store collection.

## Body (application/json)

- `content` (string, required): The text to be converted into embeddings and stored in the vector store collection.
- `description` (string): A description of the contents in this collection item record. If omitted, this value will default to a shortened version of the text stored in the collection.
- `auto_chunk` (boolean): Indicates whether the system will automatically chunk the content if it exceeds the embeddings model's maximum sequence length. If set to true, the content will be split into 300 token chunks with 20 tokens of overlap before and after each piece.

## Responses

- `201`: OK
- `400`: Bad Request, including a request that failed validation (the message names the rejected field) and a collection, item or file that does not exist. The body is the error envelope. (error-payload)
- `401`: The API key is missing, unknown or not active. Send it as Authorization: Bearer <key>. (error-payload)
- `502`: The embeddings service could not process the item or its chunks. The body is the error envelope. (error-payload)

## Example

```bash
curl https://api.vultrinference.com/v1/vector_store/{id}/items \
  -H "Authorization: Bearer $VULTR_INFERENCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "string"
  }'
```

```python
import os
import requests

response = requests.post(
    "https://api.vultrinference.com/v1/vector_store/{id}/items",
    headers={"Authorization": f"Bearer {os.environ['VULTR_INFERENCE_API_KEY']}"},
    json={
        "content": "string",
    },
)
print(response.json())
```

```javascript
const response = await fetch("https://api.vultrinference.com/v1/vector_store/{id}/items", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VULTR_INFERENCE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "content": "string"
  }),
});
console.log(await response.json());
```
