Integrate real-time conversational scam detection into mobile dialers, telecom middleware, or civic dashboards with simple JSON endpoints.
The Sachet API runs as a lightweight, asynchronous FastAPI service. By default, it runs locally on:
If configured with an API key, supply it in the x-api-key request header. All active session state resides strictly in RAM and expires after 30 minutes of inactivity.
Ingests a single utterance from either the caller or the citizen. Updates the rolling conversational context, runs MuRIL scoring, checks psychological signals, and returns risk metrics.
| Field | Type | Description |
|---|---|---|
session_id |
string | Unique UUID identifying the call session. |
text |
string | The transcribed dialogue turn in Hindi, Hinglish, or English. |
speaker |
string | "caller" (suspect) or "victim" (citizen). Default: "caller". |
| Field | Type | Description |
|---|---|---|
risk_score |
integer | Calculated scam risk score from 0 to 100. |
level |
string | "low" (<40), "medium" (40–64), or "high" (≥65). |
reason |
string | Conversational explanation in natural Hindi explaining detected tactics. |
signals |
string[] | List of detected psychological signals (e.g. ["Digital arrest threat", "Urgency deadline"]). |
alert |
boolean | true when consecutive turns sustain high risk, triggering urgent citizen warning. |
history |
integer[] | Trajectory of risk scores across all turns in this session. |
Immediately erases and de-allocates the session's conversational turns and risk history from server memory. Guarantees zero residual data retention.
Streams raw audio chunks (WebM/WAV) to the lightweight Whisper STT pipeline. Returns pure text without retaining the uploaded audio file on disk.
Returns service status and count of active ephemeral sessions in memory.
A simple snippet to stream turns into the Sachet API in Python: