sentiment and urgency api

Calibrated sentiment, escalation, and SLA urgency API

Go beyond simplistic positive/negative sentiment—distinguish polite outage reports from executive SLA breach threats and mild UX friction with calibrated probabilities in one fast API call.

Interactive calibrated sentiment & SLA urgency scorer
Input state evaluated

Our checkout pipeline has been stalled for 40 minutes and our COO is asking for a post-mortem and SLA credit if this is not resolved in 15 minutes.

Primary choice confidence
critical_escalation (97%)
Est. model spend / 1k calls
$0.0037 (~197 tok)
AUTO-ESCALATE · critical_escalation + breaches_sla P(breaches_sla) = 0.96
sentiment_driver → critical_escalation 97%
curl --fail-with-body https://clef-flash.com/api/v1/decisions \
  -H "authorization: Bearer $CLEF_API_KEY" \
  -H "content-type: application/json" \
  --data-binary @- <<'CLEF_DECISION'
{
  "model": "cloudflare/clef-flash",
  "threshold": 0.83,
  "state": "Our checkout pipeline has been stalled for 40 minutes and our COO is asking for a post-mortem and SLA credit if this is not resolved in 15 minutes.",
  "questions": {
    "sentiment_driver": {
      "type": "choice",
      "instructions": "Classify the customer tone and primary operational signal.",
      "criteria": {
        "critical_escalation": "angry executive, SLA breach threat, legal mention or public outage risk",
        "frustrated_friction": "blocked workflow or annoyed tone without formal escalation threat",
        "neutral_request": "matter-of-fact technical question or administrative update",
        "advocate_praise": "positive review, expansion signal or case-study candidate"
      }
    },
    "breaches_sla": {
      "type": "noul",
      "instructions": "Should this thread jump to the top of the P1 SLA queue immediately?",
      "criteria": {
        "true": "active business-impacting failure, executive escalation or SLA breach",
        "false": "standard queue ordering within normal response SLA"
      }
    }
  }
}
CLEF_DECISION
Pro API key · $19 / 30 days · no auto-renewal

Ship this in production with a $19 Pro key

2,000 decisions/day, 8 concurrent requests in flight, text + JSON + image states, and an API key emailed in about a minute.

Why positive/neutral/negative sentiment fails operational teams

Generic sentiment APIs label a polite message saying "Our checkout webhook has returned 500 for twenty minutes" as Neutral while labeling a minor CSS complaint with exclamation marks as Highly Negative. Operations teams do not need adjective polarity—they need business impact and escalation risk.

Clef-Flash lets you define operational sentiment buckets—critical_escalation, frustrated_friction, neutral_request, advocate_praise—alongside a dedicated breaches_sla boolean gate calibrated directly to your SLA policy.

  • Separates true P1 SLA breaches from everyday feature complaints and product feedback.
  • Flags enthusiastic customer quotes (advocate_praise) automatically for marketing and G2 outreach.
  • Supports ordered score questions (1–4 urgency tiers) with full per-level probability distributions.

Operational sentiment vs. generic polarity APIs

Define criteria in the exact vocabulary your support and customer-success teams already use.

DimensionLegacy Sentiment APIClef-Flash Decision API
Label schemaFixed Positive / Neutral / NegativeCustom operational classes + SLA noul gate
Polite outage handlingMisclassified as NeutralFlagged breaches_sla = true via criteria
Confidence outputSingle opaque scoreCalibrated probability per class & gate
Multilingual supportOften English-only or extra feeMultilingual Qwen3.5-9B backbone included

Scoring NPS comments, app store reviews, and live chat in real time

Run Clef-Flash on every incoming Intercom reply, Zendesk ticket, G2 review, or NPS survey verbatim. At $0.019 per million input tokens and ~39 ms median latency, teams can score 100% of customer feedback continuously rather than sampling once a quarter.

Explore the three realistic feedback samples above, adjust your SLA escalation threshold, and copy the exact curl or TypeScript snippet into your pipeline.

Deterministic review queues for ambiguous tone

Sarcasm and dry technical criticism sit right on the boundary between neutral and frustrated. Passing threshold: 0.83 ensures high-certainty escalations page leads immediately while ambiguous threads surface cleanly in a daily QA queue.

Frequently asked questions

Can Clef-Flash return an ordered 1-to-4 urgency score alongside sentiment?

Yes. Add a typed score question with ordered criteria (such as low, normal, high, critical) in the same POST /api/v1/decisions call to receive both the expected score and per-level probabilities.

How does Clef-Flash handle polite messages about severe outages?

Because you describe business impact inside criteria (for example, active checkout or API outage), Clef-Flash triggers breaches_sla even when the customer uses calm, professional wording.

Can I classify Spanish, French, or German customer reviews without translating first?

Yes. Clef-Flash reads multilingual feedback directly and returns your standardized English label keys.

What is the easiest way to start scoring our feedback stream?

Test 25 decisions/day free in the playground, then grab a $19 Pro API key (2,000 decisions/day, no auto-renewal) to wire into your webhook.

Keep reading

Model notes

One short email when a new decision model lands or a benchmark changes. No spam, unsubscribe in one click.