CN8 API Documentation 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.
Documentation Services Platform API Chatbot, Agent & SearchChatbot └ Collections└ Chatbot CRUD└ Chat└ ConversationsAgent └ Agent CRUD└ Sub-Agents└ Sub-Agent Config└ Agent Chat└ ConversationsSearch └ Collections└ Search & History
Voice & TTSText to Speech └ Synthesize└ VoicesVoice Clone + TTS └ Persistent Clone└ Instant Clone + TTSAI Podcast └ Voices└ Plan└ Synthesize
DubbingDubbing └ Script└ RenderVoice Clone Dubbing
LLMLLM Completions └ List & Compare Models
Media GenerationImage from Text └ List Models└ Style Presets└ Generate ImageVideo from Text └ List Models└ Create└ Status & ResultVideo from Image └ List Models└ Create└ Status & Result
Text AnalysisSentiment Analysis Named Entity Recognition Zero-Shot Classification Text Summarization Keyword Extraction Language Detection Question Answering Semantic Search Text Embeddings Text Similarity Few-Shot Classification
Studio (Video & Audio)Background Remove / Replace Video Upscale Smart Reframe Speech Clearance Audio Background Separation NSFW Detection Text Moderation Image Captioning Image Segmentation Image Inpainting Face & Privacy Blur (Image) Face & Privacy Blur (Video) Image Embedding Video Embedding
Services Text Analysis Text Similarity 69 / 84
Text Similarity text-similarity
Token-level precision, recall and F1 between aligned candidate and reference text lists.
POST {candidates: [...], references: [...]} of equal length. The response is {results: [{precision, recall, f1}, ...]} in the same order.
POST /v1/proxy/text-similarity
Compute text similarity (synchronous)
Parameters Name Type Required Description candidatesarray<string> required Candidate texts. referencesarray<string> required Reference texts (same length as candidates).
curl -X POST https://api.cn8.io/v1/proxy/text-similarity \
-H "X-API-Key: <cn8_api_key>" \
-H "Content-Type: application/json" \
-d '{"candidates":["value"],"references":["value"]}'{
"status": "success",
"data": {
"results": [
{ "precision": 0.9589, "recall": 0.9589, "f1": 0.9589 }
]
}
}
Align your lists candidates and references must be the same length. results[i] corresponds to (candidates[i], references[i]).