Body
Required
-
The search query string
-
The semantic search model to use
Default value is
all-MiniLM-L6-v2
. -
The keyspace to search within
Default value is
redwing_keyspace
. -
The table to search within
Default value is
vector
. -
The metric to use for search (e.g., cosine similarity)
Default value is
cosine
. -
The initial number of top results to retrieve
Default value is
1000000
. -
The number of most relevant results to return after refining
Default value is
5
. -
The list of matches after search
POST
/v1/search/
curl \
-X POST https://api.infura.ai/v1/search/ \
-H "x-api-key: $API_KEY" \
-d '{"query":"string","model_name":"all-MiniLM-L6-v2","keyspace":"redwing_keyspace","table":"vector","metric":"cosine","initial_top_k":1000000,"final_top_k":5,"matches":[{"key":"string","score":42.0,"metadata":{}}]}'
Request example
{
"query": "string",
"model_name": "all-MiniLM-L6-v2",
"keyspace": "redwing_keyspace",
"table": "vector",
"metric": "cosine",
"initial_top_k": 1000000,
"final_top_k": 5,
"matches": [
{
"key": "string",
"score": 42.0,
"metadata": {}
}
]
}
Response examples (200)
{
"query": "string",
"model_name": "all-MiniLM-L6-v2",
"keyspace": "redwing_keyspace",
"table": "vector",
"metric": "cosine",
"initial_top_k": 1000000,
"final_top_k": 5,
"matches": [
{
"key": "string",
"score": 42.0,
"metadata": {}
}
]
}