- Check an email address POST
- Check an IP address POST
- Check a rate limit POST
- Classify content POST
- Assess an event POST
- Report an assessment's outcome POST
- Create a rate limit bucket POST
- Add an allow or block list entry POST
- Create a rule POST
- Delete a rate limit bucket DELETE
- Remove a list entry DELETE
- Delete a rule DELETE
- Forget a user DELETE
- Retrieve an assessment GET
- Retrieve the calibration GET
- Retrieve a rate limit bucket GET
- Retrieve a list entry GET
- Retrieve a rule GET
- Retrieve the risk settings GET
- List assessments GET
- List rate limit buckets GET
- List allow and block list entries GET
- List rules GET
- Update a rate limit bucket PATCH
- Update a rule PATCH
- Update the risk settings PATCH
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. 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 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}