spam and fraud detection api

Spam, phishing, and payment fraud detection API

Detect off-platform wire solicitation, credential phishing, and obfuscated promo spam in one low-latency pass—with calibrated probabilities that separate safe auto-blocks from human analyst queues.

Interactive payment fraud & phishing risk calibrator
Input state evaluated

Avoid the 5% marketplace fee — wire $1,200 directly to our offshore IBAN and I will release the domain transfer auth code.

Primary choice confidence
payment_fraud (95%)
Est. model spend / 1k calls
$0.0037 (~193 tok)
AUTO-ESCALATE · payment_fraud + auto_block P(auto_block) = 0.93
threat_type → payment_fraud 95%
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.88,
  "state": "Avoid the 5% marketplace fee — wire $1,200 directly to our offshore IBAN and I will release the domain transfer auth code.",
  "questions": {
    "threat_type": {
      "type": "choice",
      "instructions": "Which trust-and-safety risk category matches this event?",
      "criteria": {
        "payment_fraud": "stolen card indicators, off-platform wire solicitation or chargeback abuse",
        "phishing": "credential harvesting, spoofed login links or fake support impersonation",
        "promo_spam": "bulk referral codes, unsolicited crypto or SEO link drops",
        "legitimate": "normal customer message or genuine marketplace inquiry"
      }
    },
    "auto_block": {
      "type": "noul",
      "instructions": "Should this submission be blocked before reaching recipients?",
      "criteria": {
        "true": "clear phishing, payment diversion or automated spam payload",
        "false": "benign inquiry or borderline message needing analyst review"
      }
    }
  }
}
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.

Three-lane trust and safety instead of brittle keyword blocklists

Static regex filters break the moment spammers replace dots with "dot biz" or move payment diversion into polite prose. Meanwhile, sending every marketplace message to a frontier chat model drains inference budgets and adds unacceptable send-path latency.

Clef-Flash gives trust-and-safety engineers a calibrated probability per threat class plus a binary auto_block gate. High-confidence phishing (P >= 0.90) blocks synchronously before delivery, clean inquiries pass immediately, and grey-zone cases route to your analyst queue.

  • Detects obfuscated off-platform wire requests, Telegram redirects, and spoofed login alerts.
  • Adapts instantly to new scam patterns by editing plain-English criteria—zero model retraining.
  • Keeps legitimate procurement and high-value customer messages flowing without false bans.

Fraud and spam decision schema reference

Combine a multi-class threat_type choice question with a strict boolean auto_block noul gate so downstream systems log exact reason codes for every blocked message.

Risk BandCalibrated P(auto_block)Recommended ActionAudit Signal
Safe delivery< 0.25Deliver message immediatelyStore threat_type = legitimate
Analyst review0.25 – 0.87Hold or shadow-flag for T&S queueneedsReview: true triggered
Auto-block>= 0.88Block synchronously & alert userExact class (phishing / payment_fraud / promo_spam)
Model latencyClef-Flash 9B~39 ms median inline gateFits synchronous POST /messages path

Evaluating structured account metadata alongside message text

Fraud signals rarely live in prose alone. Because state accepts structured JSON objects up to 100,000 characters on /api/v1/decisions, you can pass account age, prior dispute count, sender IP region, and the message body together so Clef-Flash weighs behavioral context alongside text.

Start with the interactive threshold studio above, copy the verified curl or TypeScript call, and deploy inline protection with a $19 Pro API key or $79 Scale key.

Predictable concurrency and zero surprise billing

Attack waves cause sudden request spikes. Clef-Flash enforces explicit in-flight concurrency ceilings per plan (Pro 8, Scale 32, Studio 64, Agency 128) and fails cleanly with 429 concurrency_exceeded rather than running up unbounded overage invoices.

All paid plans last 30 days with zero auto-renewal, and optional permanent credit packs never expire if you want burst headroom during seasonal promotions.

Frequently asked questions

Can I send account age and transaction metadata together with the message body?

Yes. Pass a JSON object in state containing both user metadata (account_age_days, prior_flags, currency) and the message text—Clef-Flash evaluates the full combined state.

How fast can I update fraud rules when a new scam script appears?

Immediately. Threat criteria are sent as plain text inside each request, so adding a new scam pattern takes one config change with zero model retraining.

Does Clef-Flash block legitimate angry customers by mistake?

Writing explicit negative criteria—such as clarifying that harsh product feedback without payment diversion is legitimate—keeps false positives low, and your threshold protects borderline traffic.

Can I scan screenshots of fake invoices or QR phishing images too?

Yes. Paid API keys on /api/v1/decisions support up to 4 attached images per request using Clef-Flash native vision.

Keep reading

Model notes

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