Add Collection Item
Adds an item to a vector store collection.
Path parameters
-
id string required
The ID of the vector store collection.
Body
application/jsonAdd Vector Store Item Request Payload
-
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
OK
application/json
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.
application/json · error-payload
The API key is missing, unknown or not active. Send it as Authorization: Bearer <key>.
application/json · error-payload
The embeddings service could not process the item or its chunks. The body is the error envelope.
application/json · error-payload
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"
}'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())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());{
"item": {
"id": "string",
"created": "string",
"description": "string",
"content": "string"
},
"usage": {
"prompt_tokens": 0,
"total_tokens": 0
}
}