Semantic ranking
Ranks by meaning, not just keyword overlap. A query about 'resetting credentials' matches 'change your password' even without shared words.
Rank a list of documents by semantic similarity to a query
You send a `query` and a `documents` array. The service embeds both, ranks documents by cosine similarity to the query, and returns the ranked results with rank, original index, text and score, plus an echoed query and total_documents. Synchronous. Note: the field name for the candidate list is `documents`, NOT `corpus`. Earlier docs were wrong.
Ranks by meaning, not just keyword overlap. A query about 'resetting credentials' matches 'change your password' even without shared words.
Each result includes its 1-based rank, original index in the documents array, the text, and the similarity score.
The response repeats the query and total_documents — useful for logging.
Query and documents can be in different languages — the embedding model maps them to the same space.
Retrieve the most relevant chunks from a document set for a user query.
Match a user question to the closest FAQ entry by meaning.
Find similar articles, products, or entries from a query or item description.
Input
query: string + documents: array of strings
Output
results[] (rank, text, score, index), query, total_documents
Prerequisites
POST a query and a documents array. The response ranks all documents by similarity.
{
"query": "electric cars",
"documents": [
"Tesla makes electric vehicles",
"Bananas are yellow fruits",
"Lithium batteries power EVs"
]
}Response
{
"status": "success",
"data": {
"results": [
{ "rank": 1, "text": "Tesla makes electric vehicles", "score": 0.7204, "index": 0 },
{ "rank": 2, "text": "Lithium batteries power EVs", "score": 0.4809, "index": 2 },
{ "rank": 3, "text": "Bananas are yellow fruits", "score": 0.1051, "index": 1 }
],
"query": "electric cars",
"total_documents": 3
}
}Field name is `documents`, not `corpus`. The response also echoes the query and the total document count.
Rank a list of documents by semantic similarity to a query. Embedding-based cosine ranking.
/v1/proxy/text-search
Billed per request.
| Service | Unit | Price |
|---|---|---|
| Semantic Search | item | $0.004/request |
A: Limited by gateway/upstream payload size. Designed for short to medium lists per request (a few hundred items).
A: Not from the request — the upstream returns all of them ranked. Slice the results array client-side.
A: Yes — the multilingual embedding model maps all languages into the same space.
1.2 (2026-04-29)
1.1 (2026-02-23)
1.0 (2026-01-26)