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.
Classify text using a few labeled examples per class. Prototype scoring on multilingual embeddings.
POST {text, examples} where examples is {label: [str, ...]}. Response is {label, confidence, all_scores}.
/v1/proxy/text-few-shotFew-shot classification (sync)
| Name | Type | Required | Description |
|---|---|---|---|
text | string | required | Text to classify |
examples | object<string,array<string>> | required | Map of label → list of example strings |
{
"status": "success",
"data": {
"label": "food",
"confidence": 0.8891,
"all_scores": { "food": 0.8891, "hospitality": 0.1109 }
}
}