Search Collection
Searches items in a vector store collection for the closest embeddings matches.
Path parameters
-
id string required
The ID of the vector store collection.
Body
application/jsonSearch Vector Store Request Payload
-
input string required
The text query to search against the embeddings items in the vector store collection.
Responses
OK
application/json · search-vector-store-response-payload
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 failed to embed the input
application/json · error-payload
The embeddings service is unavailable; retry shortly
application/json · error-payload
curl https://api.vultrinference.com/v1/vector_store/{id}/search \
-H "Authorization: Bearer $VULTR_INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "string"
}'import os
import requests
response = requests.post(
"https://api.vultrinference.com/v1/vector_store/{id}/search",
headers={"Authorization": f"Bearer {os.environ['VULTR_INFERENCE_API_KEY']}"},
json={
"input": "string",
},
)
print(response.json())const response = await fetch("https://api.vultrinference.com/v1/vector_store/{id}/search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VULTR_INFERENCE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": "string"
}),
});
console.log(await response.json());{
"results": [
{
"id": "string",
"created": "string",
"content": "string"
}
],
"usage": {
"prompt_tokens": 0,
"total_tokens": 0
}
}