API reference

Base URL: https://api.slopapi. All requests and responses are JSON. No SDK required.

Authentication

The free tier needs no key (25 detections per day per IP). For more, buy credits and send your key:

Authorization: Bearer sk_live_xxxxxxxx

Each detection costs one credit. Credits never expire. Buy more anytime and they add to the same key.

POST /v1/detect

Score one text or a batch. Body is either {"text": "..."} or {"texts": [{"id": "a", "text": "..."}, ...]} (up to 50).

# single, free tier
curl -s https://api.slopapi/v1/detect \
  -H "content-type: application/json" \
  -d '{"text": "This comprehensive solution leverages a robust, seamless approach."}'

Response:

{
  "ok": true,
  "tier": "free",
  "cost": 1,
  "credits_remaining": 24,
  "result": {
    "p": 0.94,
    "verdict": "flagged_ai",
    "flagged": true,
    "abstained": false,
    "words": 9,
    "language": "en",
    "signals": ["3 buzzword hits (leverage, seamless, robust)"]
  }
}

Fields: p is the calibrated probability (null when abstained). verdict is one of flagged_ai, no_detection, abstained_too_short, abstained_non_english, ai_artifact. signals lists the human-readable evidence. For a batch, results is an array keyed by your id, and cost is the number of texts scored.

With a key, batched, in JS

const res = await fetch("https://api.slopapi/v1/detect", {
  method: "POST",
  headers: { "content-type": "application/json", "authorization": `Bearer ${key}` },
  body: JSON.stringify({ texts: comments.map((c, i) => ({ id: String(i), text: c })) }),
});
const { results, credits_remaining } = await res.json();

In Python

import requests
r = requests.post("https://api.slopapi/v1/detect",
    headers={"authorization": f"Bearer {key}"},
    json={"text": text})
print(r.json()["result"]["verdict"])

POST /v1/scan

Everything /v1/detect returns, plus a text-integrity report: hidden Unicode (zero-width and other invisible characters), bidirectional controls (the "Trojan Source" trick), and homoglyph / mixed-script words used for spoofing. Add "sanitize": true to get a cleaned copy with the invisible characters removed. Same one-credit cost.

curl -s https://api.slopapi/v1/scan \
  -H "content-type: application/json" \
  -d '{"text": "Login at PаyPal now", "sanitize": true}'
{
  "ok": true,
  "result": {
    "detection": { "verdict": "no_detection", ... },
    "integrity": {
      "clean": false,
      "mixed_script": [{ "at": 9, "word": "PаyPal", "scripts": ["Latin", "Cyrillic"] }],
      "invisible": [], "bidi": [],
      "summary": "1 mixed-script word (possible homoglyph spoof)"
    },
    "sanitized": "Login at PаyPal now"
  }
}

Use it to defend against prompt-injection via hidden characters, catch homoglyph phishing, and clean text pasted out of an AI chat UI. Homoglyphs are reported, not rewritten, since guessing the intended letter can corrupt real text.

GET /v1/me

Check a key's balance.

curl -s https://api.slopapi/v1/me -H "authorization: Bearer sk_live_..."
# -> {"ok":true,"credits_remaining":98421,"used_total":1579,"plan":"Pro"}

Errors

StatuserrorMeaning
400bad_json / no_scorable_textBad body or nothing to score
401invalid_keyKey missing or unknown
402insufficient_creditsBuy more; the same key keeps working
429free_limit_reachedFree daily cap hit; use a key

Honest limits

The detector runs at a 5% false-positive operating point and abstains on short or non-English text. It is a signal, not proof. Text written densely about AI vocabulary can itself flag. See the benchmark for the numbers and the failure modes, and never use a single score to accuse a person.