Serverless AI Context Database Search
AI powered semantic search service that finds the most relevant chunks from a vector collection based on a query.
Endpoint
Search through vector embeddings in a collection using AI-powered semantic search
GEThttps://api.xtartapp.com/data/memory
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
collection | string | Yes | - | The name of the collection to search in. |
query | string | Yes | 1000 | The search query to find relevant chunks in the collection. |
limit | number | No | 25 | The maximum number of results to return. Default is 10, maximum is 25. |
scoreThreshold | number | No | 1 | The minimum score threshold for results to be returned. Default is 0.5, minimum is 0, maximum is 1. |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the search operation |
data.results | array | Array of content chunks matching the search query, ordered by relevance |
data.collection | string | The name of the collection that was searched |
metadata | object | Metadata about the search process |
metadata.cost | number | The cost of the search request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | MEMORY_ERROR | Ex: could not search collection | collection not found |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |