Honest AI Detector

API documentation

Detect AI-generated text from any application. Interactive reference: OpenAPI / Swagger.

1. Get a key

Create a free account, open the dashboard and create an API key. It is shown once; store it as a secret. Send it in the X-API-Key header.

2. Send text

curl -X POST https://aidetector.duckdns.org/v1/detect \
  -H "X-API-Key: $DETECTOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Paste at least 50 words...", "return_segments": true}'
# Python
import os, requests

r = requests.post(
    "https://aidetector.duckdns.org/v1/detect",
    headers={"X-API-Key": os.environ["DETECTOR_API_KEY"]},
    json={"text": text, "return_segments": True},
    timeout=60,
)
r.raise_for_status()
print(r.json()["ai_percentage"])
// JavaScript (Node 18+)
const r = await fetch("https://aidetector.duckdns.org/v1/detect", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.DETECTOR_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ text, return_segments: true }),
});
const result = await r.json();
console.log(result.ai_percentage);

3. Read the result

{
  "id": "5f0c...",               // scan id
  "ai_percentage": 63.2,         // share of characters judged AI-written
  "human_percentage": 31.5,
  "mixed_percentage": 5.3,       // uncertain sentences
  "label": "mostly_ai",          // human | mostly_human | mixed | mostly_ai | ai
  "confidence": 0.91,            // 0-1, how decisive the sentence scores are
  "model_version": "v1.0",
  "word_count": 812,
  "sentence_count": 41,
  "obfuscation_detected": false, // hidden characters / look-alike letters found
  "segments": [
    { "start": 0, "end": 142, "text": "...", "ai_probability": 0.97, "label": "ai" }
  ]
}

start and end are character offsets into the text you sent, so you can highlight sentences in your own UI.

Long texts

POST /v1/detect/async   -> 202 {"job_id": "...", "status_url": "/v1/jobs/..."}
GET  /v1/jobs/{job_id}   -> {"status": "queued" | "running" | "done" | "failed", "result": {...}}

Endpoints

  • POST /v1/detect
    Analyze up to 5,000 words and get the result immediately.
  • POST /v1/detect/async
    Queue up to 20,000 words. Returns a job id.
  • GET /v1/jobs/{job_id}
    Status and result of an async job (kept for 24 hours).
  • GET /v1/scans
    Your scan history (scores only, unless you stored the text).
  • GET /v1/usage
    Words used this month, quota and daily usage.
  • GET /v1/info
    Model version and limits.

Errors and limits

  • 401 Missing, invalid or revoked API key.
  • 402 Monthly word quota exceeded (resets on the 1st).
  • 413 Text too long for this endpoint; use /v1/detect/async.
  • 422 Text too short (minimum 50 words) or invalid JSON.
  • 429 Rate limit exceeded; wait for the number of seconds in the Retry-After header.

Free plan: 100,000 words per month, 60 requests per minute. Responses include X-RateLimit-Remaining.

Privacy and fair use

Submitted text is not stored unless you pass "store_text": true; by default only the scores are kept for your history and usage. AI detection is probabilistic: use results as one signal among others, never as sole proof that someone used AI.