ForHosting KIT · Text & AI

Detect spam

Every open form on the internet eventually becomes a spam magnet. This spam detection API scores incoming text — comments, contact-form submissions, reviews, forum posts — so you can hold, flag or drop the junk before it ever reaches a moderator's queue.

● StablePer request + per item$0.003
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

Who actually needs this

Anyone running a comment section, a signup form, a marketplace review box or a support ticket intake eventually hits the same wall: bots and low-effort spam outnumber real submissions. Small teams don't have a moderation staff, and large ones don't want one reading pitches for counterfeit shoes all day. The text.spam endpoint exists for that exact gap — a scoring layer you drop in front of anything users can type into.

What you send and what comes back

You POST an array of text items to /text/spam and immediately get a task_id — the scoring itself runs asynchronously so you're never holding a connection open while a batch of ten thousand comments gets classified. Each item in the result carries a spam likelihood and a short reason code, which is enough signal to auto-approve, auto-reject or route to human review, depending on how conservative your workflow needs to be.

Why spam detection is a moving target

Spam filtering has always been an arms race: the earliest heuristics were keyword blocklists, then Bayesian filters learned from labeled corpora, and now language-aware models read intent and phrasing rather than matching fixed patterns. That shift matters because modern spam rarely repeats itself word-for-word — it's paraphrased, translated, or generated on the fly, so a filter that only knows yesterday's spam misses today's.

Fitting it into a pipeline

Because results land on a signed webhook, the typical setup is a queue worker that submits new comments as they arrive and updates a status column when the webhook fires — no polling loop needed. Teams that prefer not to run a receiving endpoint can instead fetch the result from the signed link, valid for 24 hours, which is enough time for a nightly moderation batch.

What it costs and when

Pricing is a flat $0.003 per request plus $0.0135 per item scored, and you're only billed for items that were actually processed — a failed task is retried three times automatically and never charged if it still fails. There's no free tier and no trial balance; access requires an prepaid balance, which keeps the endpoint free of the abuse that free tiers tend to attract.

Comment sections at scale

Score every incoming comment before it publishes, auto-hiding anything above your spam threshold and queueing borderline cases for a moderator.

Contact and lead forms

Filter out bot-generated form fills so your sales inbox only receives submissions worth a reply.

Marketplace and review pages

Catch fake reviews and promotional spam before they affect a product's rating or public trust.

Support ticket intake

Strip junk tickets out of the queue so agents spend time on real customer issues, not ad spam.

How does the spam detection API work?

You send text items to POST /text/spam, get a task_id back, and receive a spam score plus reason code per item once processing finishes, delivered by webhook or signed link.

Is there a free tier for spam detection?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How much does it cost to score comments or form entries?

It's $0.003 per request plus $0.0135 per item scored, and you're never charged for a task that ultimately fails.

Can I send a large batch of comments at once?

Yes, the endpoint is built for bulk scoring — submit an array of items in one request and results arrive asynchronously as a batch.

What does the response actually contain?

Each item gets a spam likelihood and a short reason code, enough to drive auto-approve, auto-reject or human-review logic in your own workflow.

Does it work on languages other than English?

The model reads intent and phrasing rather than matching fixed keyword lists, which lets it handle spam across languages, not just English patterns.

How do I get the results — webhook or polling?

Results are delivered via a signed webhook, which is recommended, or through a signed link valid for 24 hours if you'd rather fetch on your own schedule.

What happens if a scoring task fails?

The task retries automatically up to three times; if it still fails, you get a clear error and are not charged for that item.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/text/spam

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/text/spam \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":["valor-1","valor-2"]}'
{
  "items": [
    "valor-1",
    "valor-2"
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "text.spam",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.003
Per item$0.0135

Published price — no tokens, no invented credits. A failed task is never charged.

max_tokens20000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →