Skip to content
Laya AI

Decision template · phishing detection API

Unofficial community documentation

Scam and phishing message detector

Label inbound messages as legitimate, suspicious, phishing, or scam with a risk score. Laya System One template for trust & safety.

POST https://api.layaaimodel.com/v1/scam/spot

When to use it

Email, SMS, or chat that may be phishing — especially urgent account-closure links and shortened URLs.

Phishing copy is short, urgent, and full of shortened links. Signature-based filters lag; asking a chat model “is this a scam?” every time adds latency and ambiguous prose. A phishing detection API that returns a label plus risk score slots into mail gateways, SMS webhooks, and agent tools that might open URLs.

Score the message before link unfurling or auto-click. High-risk phishing/scam labels should quarantine the message and strip actionable links. Suspicious mid scores can warn the user. Legitimate lows pass through. Channel metadata (email vs sms vs chat) helps the template interpret urgency tropes.

Built for trust-and-safety and mailbox teams hunting scam spotter or phishing detector APIs. Laya vs Jev benchmark pages cover broader accuracy claims; this page stays on the scam-spotting job.

How the request works

POST message + channel. Returns a choice label and ordinal scam risk. Wire it in front of user-facing inboxes or agent tools that open links.

bash
curl https://api.layaaimodel.com/v1/scam/spot \
  -H "Authorization: Bearer laya_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"Urgent: your account will close in 1 hour. Verify at http://bit.ly/…","channel":"email"}'

Questions you get back

Each id is a typed decision (choice / score / noul) — the System One shape, not a chat completion.

text
label (choice): Label? [legitimate | suspicious | phishing | scam]
risk (score): Scam risk? [none → low → medium → high]

Example result shape

“Urgent: verify at http://bit.ly/…” should score as phishing/scam with high risk. A banal shipping update should stay legitimate/low.

sample answers
label: phishing · 86%
risk: 2.8 · high

Live calibrated bars and a free anonymous try: open the homepage playground or the interactive tools runner.

Pricing & keys

Create a laya_ key on Account, buy prepaid packs on Pricing, or read the full decide reference under API docs. Output tokens are free; input is metered.