API Documentation

Integrate DeepSense™ AI detection into your application. RESTful JSON API with simple key-based authentication.

🎛️ Sensitivity Modes

Choose the detection strictness that fits your use case. Pass the sensitivity parameter in your request.

Mode AI Catch False Positives Best For
conservative Moderate Very Low Student self-checks, minimal risk of false accusations
balanced High Low Content platforms, business default
aggressive Very High Moderate Batch screening with human review

Authentication

All requests require an API key passed as an HTTP header. Get a key at /pricing.

// All requests:
X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Invalid or missing keys return 401. Rate-limited requests return 429 with retry headers.

Rate Limits & Headers

Plan Words/Month ~Essays
Free 10,000 ~50 essays
Essential 60,000 ~300 essays
Premium 180,000 ~900 essays
Professional 360,000 ~1,800 essays
Enterprise 15,000,000 ~75,000 essays

Every response includes rate-limit headers (word count):

X-RateLimit-Limit: 200000
X-RateLimit-Remaining: 183700

Endpoints

POST /api/detect

Analyze text for AI-generated content. Minimum 20 words.

Request

// POST /api/detect
Content-Type: application/json
X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

{
  "text": "The rapid advancement of deep learning techniques has...",
  "sensitivity": "balanced"  // optional: conservative | balanced | aggressive
}

Parameters

Field Type Required Description
text string Text to analyze (min 20 words)
sensitivity string Detection strictness: conservative (fewer false positives), balanced (recommended), aggressive (maximum AI catch). Default: conservative

Response

{
  "success": true,
  "score": 87,
  "verdict": "Likely AI",
  "docTypeLabel": "Academic Paper",
  "totalDimensions": 21,
  "activeDimensions": 15,
  "ms_cost": 12.4,
  "rate_limit": 5000,
  "rate_remaining": 4837,
  "dimensions": [
    {
      "label": "Prosodic Cadence Quotient",
      "detected": true
    }
  ],
  "textAnnotations": [
    {
      "sentence": "Furthermore, it is important...",
      "start": 420,
      "end": 510,
      "dims": [
        { "id": "template_phrases", "label": "..." }
      ]
    }
  ],
  "bullets": [
    {
      "text": "Formulaic sequence tendency detected",
      "example": "It is important to note that...",
      "start": 420,
      "end": 510
    }
  ]
}

Status Codes

Code Meaning
200 Detection completed
400 Missing text field or text below 20 words
401 Invalid or missing API key
429 Monthly quota exceeded

POST /api/detect (Batch)

Upload multiple files for batch detection. Returns NDJSON stream.

Request

// POST /api/detect
Content-Type: multipart/form-data
X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

files[]: essay1.txt
files[]: report2.docx
files[]: paper3.pdf

Response (NDJSON stream, 1 line per file)

// Real-time streaming — each line = 1 file result
{"type":"progress","index":0,"fileName":"essay1.txt","total":3"}
{"type":"result","index":0,"fileName":"essay1.txt","score":87,"verdict":"Likely AI","words":450","flagged":7","totalDims":15","docType":"General"}
{"type":"progress","index":1,"fileName":"report2.docx","total":3"}
{"type":"complete","total":3"}

Supported formats: TXT, MD, DOCX, PDF.

Quick Start Examples

cURL

# Basic detection
curl -X POST https://www.anyaizero.com/api/detect \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ak_your_key_here" \
  -d '{"text":"Your text to analyze for AI content..."}'

# With sensitivity (balanced recommended for business)
curl -X POST https://www.anyaizero.com/api/detect \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ak_your_key_here" \
  -d '{"text":"...", "sensitivity":"balanced"}'

Python

import requests

response = requests.post(
    "https://www.anyaizero.com/api/detect",
    headers={
        "Content-Type": "application/json",
        "X-API-Key": "ak_your_key_here"
    },
    json={"text": "Your text to analyze..."}
)

result = response.json()
print(f"AI Score: {result['score']}% — {result['verdict']}")

JavaScript / Node

const res = await fetch("https://www.anyaizero.com/api/detect", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "ak_your_key_here"
  },
  body: JSON.stringify({ text: "Your text to analyze..." })
});

const data = await res.json();
console.log(`Score: ${data.score}%, Verdict: ${data.verdict}`);

FAQ

How is usage counted?

Usage is counted by words processed. Each word in the submitted text counts toward your monthly quota. Batch uploads count total words across all files.

Can I exceed my monthly limit?

Requests return 429 when limit is reached. Contact us to upgrade or discuss overage pricing.

Is there a sandbox or test key?

Contact api@https://www.anyaizero.com for a trial key with 500 free test calls.

What's the response time?

Average 10-80ms depending on text length. No external API dependencies — all processing is done in-house.

Do you store submitted text?

No. Text is processed in memory and discarded. We log only metadata (word count, score, timestamp) for billing purposes.

Questions? Email api@https://www.anyaizero.com · Pricing