support ticket triage api

Support ticket triage API with calibrated queue probabilities

Classify inbound tickets into closed engineering, billing, security, and account queues—plus an on-call paging gate—in one forward pass on Clef-Flash without parsing brittle LLM chat text.

Interactive support ticket triage & queue router
Input state evaluated

Since 09:12 UTC our production webhook consumer is getting 502 timeouts from eu-west. 400 paid orders are stuck in pending.

Primary choice confidence
engineering (96%)
Est. model spend / 1k calls
$0.0037 (~193 tok)
AUTO-ESCALATE · engineering + page_oncall P(page_oncall) = 0.94
queue → engineering 96%
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.85,
  "state": "Since 09:12 UTC our production webhook consumer is getting 502 timeouts from eu-west. 400 paid orders are stuck in pending.",
  "questions": {
    "queue": {
      "type": "choice",
      "instructions": "Which support queue should own this inbound ticket?",
      "criteria": {
        "billing": "invoices, card charges, refunds, VAT or seat upgrades",
        "engineering": "API 5xx errors, webhook timeouts, SDK bugs or data sync issues",
        "security": "leaked credentials, suspicious logins, SOC 2 or abuse reports",
        "account_ops": "password access, SSO setup, workspace ownership or team invites"
      }
    },
    "page_oncall": {
      "type": "noul",
      "instructions": "Does this ticket describe an active production outage requiring immediate on-call paging?",
      "criteria": {
        "true": "production traffic, live checkout or paid API calls are actively failing",
        "false": "single-user question, feature request or non-urgent billing ticket"
      }
    }
  }
}
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 helpdesk routing fails with prompt-engineered chatbots

Teams wiring general-purpose chatbots into Zendesk, Intercom, or Linear hit the same three production bugs: invented queue labels outside the schema, slow 600 ms to 2 s generation tails, and zero reliable probability signal to separate obvious billing questions from ambiguous security-plus-billing edge cases.

Clef-Flash replaces free-form generation with a closed schema of typed questions. You pass the ticket body and metadata in state, define your exact queues under criteria, and receive a calibrated probability for every queue plus a boolean noul gate for on-call paging in a single forward pass.

  • Closed option set: the API cannot hallucinate a queue name your webhook router lacks.
  • Multi-question batching: predict owner queue, severity score, and on-call page flag in one HTTP call.
  • Built-in confidence gate: pass threshold (e.g. 0.85) so borderline tickets set needsReview: true automatically.

Support triage schema and latency benchmark

Every queue label and plain-English criteria description travels per request, so multi-brand support teams can swap queues without retraining or redeploying model weights.

Workflow metricFrontier chat LLMClef-Flash 9B Decision API
Median model latency450 ms – 1,400 ms~39 ms median (122 ms p95 published)
Invalid queue label riskNeeds JSON repair & retries0% — closed-set typed choices only
Confidence calibrationSelf-reported text scoreNative token-calibrated probability per queue
Input pricing basis$2.50+/1M in + output tokens$0.019/1M input tokens (no prose output)
Served state ceilingVaries by provider24,576 tokens (100,000 chars) on /api/v1/decisions

Connecting Clef-Flash to Zendesk, Intercom, Freshdesk, or Linear

Insert POST /api/v1/decisions inside your ticket-created webhook handler. Pass the customer subject, body, plan tier, and recent error snippet inside state (string or JSON object). When answers.page_oncall.noul crosses your threshold, trigger PagerDuty; when answers.queue.probabilities falls below threshold, route the ticket to your Tier-2 human triage view instead of guessing.

Start testing immediately with 25 free daily decisions in the browser playground, or ship production helpdesk automation with a $19 Pro API key (2,000 decisions/day, 8 concurrent in-flight requests, no auto-renewal).

Handling multi-language and screenshot-attached tickets

Because Clef-Flash is post-trained from Qwen3.5-9B with a native vision encoder, paid API keys can attach up to four error screenshots (up to 4 MiB each) alongside English, Spanish, German, Japanese, or French ticket text inside the same triage call.

Each API key reports live daily usage, credit balance, and active concurrency via GET /api/v1/usage so ops engineers can alert cleanly before hitting plan limits.

Frequently asked questions

Can one triage call return both the support queue and an urgent paging flag?

Yes. Send up to 8 typed questions (choice, noul, and ordered score) in one POST /api/v1/decisions call and receive calibrated probabilities for all of them in a single forward pass.

How do I prevent misrouted tickets when a message spans billing and engineering?

Include threshold (for example 0.85) in your request. Whenever the winning queue probability sits below 0.85, the response flags needsReview: true so your helpdesk sends it to human triage.

Can I attach customer error screenshots in ticket triage?

Yes. Paid API keys on /api/v1/decisions accept up to 4 images (up to 4 MiB each, 8 MiB total body) alongside structured JSON or plain-text ticket context.

What does a Pro API key cost for production support routing?

Pro is $19 for 30 days with 2,000 decisions/day, 8 concurrent in-flight requests, and no auto-renewal. Scale ($79) raises limits to 20,000 decisions/day and 32 concurrent calls.

Keep reading

Model notes

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