A complete reference for the API, configuration, and integration model. Everything is type-safe, public, and runnable from a single Next.js deployment.
Overview
What CascadeAnnote does
CascadeAnnote is a four-layer in-context-learning data annotation pipeline. Given a corpus of labeled examples and a new piece of text, it returns the most likely label, a calibrated confidence score, the exemplars that drove the decision, and a content-addressed receipt suitable for on-chain attestation.
The entire pipeline is implemented in TypeScript and runs inside a single Next.js deployment. There are no external service dependencies — every layer has a deterministic local implementation.
Quickstart
Annotate a single text
POST /api/annotate
Content-Type: application/json
{
"text": "Best purchase I have made all year.",
"candidates": ["positive","neutral","negative"]
}
Returns an annotation result with the label, confidence, vote breakdown, retrieved exemplars, trace, and storage receipt.
API reference
Endpoints
POST/api/annotate
core
Annotate a single text. Body: { text, candidates? }.
POST/api/annotate/batch
core
Annotate up to 50 texts in one call.
GET/api/pipeline/status
control
Returns corpus size, label set, and configured thresholds.
GET/api/pipeline/stats
telemetry
Aggregated metrics: average confidence, latency, fallback rate.