- List assessments GET
- Assess an event POST
- Retrieve an assessment GET
- Report an assessment's outcome POST
- List allow and block list entries GET
- Add an allow or block list entry POST
- Retrieve a list entry GET
- Remove a list entry DELETE
- Forget a user DELETE
- Retrieve the risk settings GET
- Update the risk settings PATCH
- Retrieve the calibration GET
- List rules GET
- Create a rule POST
- Retrieve a rule GET
- Update a rule PATCH
- Delete a rule DELETE
- Check an email address POST
- Check an IP address POST
- Check a phone number POST
- Classify content POST
- Check a rate limit POST
- List rate limit buckets GET
- Create a rate limit bucket POST
- Retrieve a rate limit bucket GET
- Update a rate limit bucket PATCH
- Delete a rate limit bucket DELETE
Classify content
Scores text people post on your platform (a profile bio, a comment, a listing) for spam, phishing, malware and fraud with an AI model, with zero data retention. Returns scores only: you decide what they mean. Neither the text nor the scores are stored, and request logs keep no body for this endpoint. Takes up to 3 seconds; a failure is a 503 you can retry or treat as unknown. Each live classification the model answered is billed (risk.content_checks; plans include some every month, and Free stops at its allowance). Limited per organization as well as per key. Sandbox keys use markers instead of a model: [coss-test:phishing] scores 0.99, [coss-test:spam:0.4] exactly 0.4, everything else 0.01.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"application/json- body
- body
- …
text*stringThe text to classify (a profile bio, a comment, a listing). The model reads the first 8,000 characters.
1 <= length <= 50000The scores.
application/json- response
- response
- …
Scores only: coss.com never decides what they mean for you. Neither the text nor the scores are stored.
object*"risk_content_classification""risk_content_classification"scores*Per category, the model's probability (0-1) that the content belongs to it. Scores are not calibrated: pick thresholds by looking at your own traffic.
truncated*booleanThe text was longer than the model reads: only its beginning was classified.
import { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.risk.classify({ text: "Earn $5,000 a week from home! DM me on Telegram: t.me/fast-cash",});{ "object": "risk_content_classification", "scores": { "spam": 0.91, "phishing": 0.04, "malware": 0.01, "fraud": 0.86 }, "truncated": false}