API Reference
Search a vector store
Searches passages in the knowledge base. query is a string or a list of strings.
POST
/
v1
/
vector_stores
/
{vector_store_id}
/
search
Search a vector store
curl --request POST \
--url https://api.synapsai.cloud/v1/vector_stores/{vector_store_id}/search \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"filters": {},
"max_num_results": 10,
"ranking_options": {},
"rewrite_query": true
}
'import requests
url = "https://api.synapsai.cloud/v1/vector_stores/{vector_store_id}/search"
payload = {
"query": "<string>",
"filters": {},
"max_num_results": 10,
"ranking_options": {},
"rewrite_query": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "vector_store.search_results.page",
"search_query": [
"<string>"
],
"data": [
{
"file_id": "<string>",
"filename": "<string>",
"score": 123,
"attributes": {},
"content": [
{
"type": "text",
"text": "<string>"
}
]
}
],
"has_more": true,
"next_page": null
}Body
application/json
⌘I
Search a vector store
curl --request POST \
--url https://api.synapsai.cloud/v1/vector_stores/{vector_store_id}/search \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"filters": {},
"max_num_results": 10,
"ranking_options": {},
"rewrite_query": true
}
'import requests
url = "https://api.synapsai.cloud/v1/vector_stores/{vector_store_id}/search"
payload = {
"query": "<string>",
"filters": {},
"max_num_results": 10,
"ranking_options": {},
"rewrite_query": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "vector_store.search_results.page",
"search_query": [
"<string>"
],
"data": [
{
"file_id": "<string>",
"filename": "<string>",
"score": 123,
"attributes": {},
"content": [
{
"type": "text",
"text": "<string>"
}
]
}
],
"has_more": true,
"next_page": null
}