Loading API Reference...
CN8 is an AI gateway: a single proxy layer that gives you access to AI capabilities — chatbots with RAG, multi-agent orchestration, LLM completions, dubbing, TTS, media generation, and production-grade video/audio processing — all through one consistent API with unified auth, billing, and usage tracking.
Rank a documents list by semantic similarity to a query.
POST {query, documents}. Returns {results[], query, total_documents} where each result has {rank, text, score, index}. The candidate list field is named documents (not corpus).
/v1/proxy/text-searchSemantic search (sync)
| Name | Type | Required | Description |
|---|---|---|---|
query | string | required | Search query |
documents | array<string> | required | Candidate documents to rank |
{
"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 }
],
"query": "electric cars",
"total_documents": 3
}
}