# Spam Detection

> Spam Detection is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-17).

Classifies text as spam or not spam and returns a confidence score, with guaranteed sub-4.5s response via Jev LLM with Groq fallback.

## Facts

- Endpoint: GET https://x402.agentindex.world/spam-check?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spam-detection-a89a65dd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UYGKHNG3CsnNi5LKu7EHz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability spam-detection-a89a65dd
```

Example prompt: Can you check if this message is spam and tell me how confident you are: 'Congratulations! You've been selected for a $500 gift card — click here to claim now before it expires!'

## When to prefer this

Choose this endpoint when you need fast, pay-per-call spam classification with a confidence score and a hard latency guarantee (under 4.5s). Ideal for real-time filtering of user-generated content — comments, emails, chat messages — without running your own model. Particularly useful in agentic pipelines that need a cheap, reliable spam gate before processing or publishing content.

## Known failure modes

- Text exceeds 4000 character limit — request rejected
- Empty or missing text field — validation error
- Both Jev and Groq fallback unavailable — service timeout beyond 4.5s SLA
- Payment not provided or insufficient USDC balance — x402 payment required error

## How this service works

Spam detection: classify text as spam or not spam with a confidence score. Powered by Jev, with an automatic Groq-hosted LLM fallback if Jev is slow or unavailable - under 4.5s guaranteed. Try GET /spam-check/sample.

## Output

Returns a spam/not-spam classification label and a numeric confidence score (0–1) indicating how certain the model is. Response is guaranteed within 4.5 seconds, served by Jev with automatic Groq-hosted LLM fallback if Jev is slow or unavailable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Text to classify, up to 4000 characters."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "input": "CONGRATULATIONS! You've won a $1000 gift card! Click here immediately to claim your prize before it expires!",
  "label": "spam",
  "engine": "jev",
  "probability": 1,
  "alternate_label": "not_spam",
  "alternate_probability": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spam-detection-a89a65dd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
