AI detection API · REST + JSON

AI Detector API with sentence-level results

Send text from your own app and get back an overall AI score and a likelihood for each flagged sentence, with character offsets you can highlight — the same AI check as our AI detector.

  • Overall score + flagged sentences
  • 2,000 free API words, no card
  • Free sandbox keys
How it works

Two calls from text to an AI result

  1. Get a free API key

    Create one in the developer portal: 2,000 free API words on every free account, plus test keys that return sample results at no cost.

  2. Send text with ai_detect

    POST the text to /scans with "tools": ["ai_detect"]. You get a scan ID back straight away.

  3. Read the AI result

    GET /scans/{id} until the status is completed, usually 30–90 seconds, and read results.aiDetection.

What you get back

An AI score and the sentences behind it

AI results arrive under results.aiDetection once the check completes. The example is shortened.

{
  "id": "9b2d4f10-6c3e-4a8b-b1d2-7e5f0a9c3d58",
  "status": "completed",
  "wordCount": 420,
  "wordsCharged": 420,
  "tools": ["ai_detect"],
  "progress": { "percent": 100, "tools": [{ "tool": "ai_detect", "status": "completed", "percent": 100 }] },
  "results": {
    "plagiarism": null,
    "aiDetection": {
      "score": 38,
      "summary": "…",
      "sentences": [
        {
          "text": "Libraries play a crucial role in fostering community engagement.",
          "probability": 0.91,
          "offset": 212,
          "length": 65
        }
      ]
    }
  }
}
score number
Overall AI score for the whole text: the percentage of the text judged AI-generated.
summary string | null
A short written summary of the result, when one is available.
sentences[] array
The sentences flagged as likely AI-written. Sentences that are not flagged, and sentences too short to judge, are left out.
sentences[].probability number
A 0–1 likelihood that the sentence is AI-generated.
sentences[].offset / length integer
Where the sentence sits in the text you sent, in characters, so you can highlight it without re-matching.
sentences[].text string
The sentence as it appears in your text.
No detector is perfect
An AI score is a likelihood, not proof that anyone used AI. It can flag human writing — especially formal or formulaic text — and miss AI text that has been heavily edited. If you build on the API, present results as a starting point for review, never as a verdict.
Quick start

Call the AI detection API in curl, Node.js or Python

Every endpoint lives under https://app.plagiarismcheckerplus.com/api/public/v1 and takes your key as a bearer token.

1. Submit text for AI detection (curl)
curl -X POST https://app.plagiarismcheckerplus.com/api/public/v1/scans \
  -H "Authorization: Bearer $PCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The text you want to check for AI writing (at least 50 words).",
    "tools": ["ai_detect"]
  }'
HTTP/1.1 202 Accepted

{
  "id": "9b2d4f10-6c3e-4a8b-b1d2-7e5f0a9c3d58",
  "status": "processing",
  "wordCount": 420,
  "wordsCharged": 420,
  "tools": ["ai_detect"]
}
2. Node.js: submit, poll, print flagged sentences
// Node.js 18+ (built-in fetch)
const BASE = "https://app.plagiarismcheckerplus.com/api/public/v1";
const headers = {
  Authorization: `Bearer ${process.env.PCP_API_KEY}`,
  "Content-Type": "application/json",
};

const { id } = await fetch(`${BASE}/scans`, {
  method: "POST",
  headers,
  body: JSON.stringify({ text, tools: ["ai_detect"] }),
}).then((r) => r.json());

let scan;
do {
  await new Promise((r) => setTimeout(r, 3000));
  scan = await fetch(`${BASE}/scans/${id}`, { headers }).then((r) => r.json());
} while (scan.status === "pending" || scan.status === "processing");

const ai = scan.results.aiDetection;
console.log("AI score:", ai.score);
for (const s of ai.sentences) {
  // Highlight text.slice(s.offset, s.offset + s.length) in your own UI.
  console.log(s.probability.toFixed(2), s.text);
}
3. Python: the same with requests
import os, time, requests

BASE = "https://app.plagiarismcheckerplus.com/api/public/v1"
headers = {"Authorization": f"Bearer {os.environ['PCP_API_KEY']}"}

scan_id = requests.post(
    f"{BASE}/scans",
    headers=headers,
    json={"text": text, "tools": ["ai_detect"]},
).json()["id"]

while True:
    scan = requests.get(f"{BASE}/scans/{scan_id}", headers=headers).json()
    if scan["status"] not in ("pending", "processing"):
        break
    time.sleep(3)

ai = scan["results"]["aiDetection"]
print("AI score:", ai["score"])
for s in ai["sentences"]:
    print(round(s["probability"], 2), s["text"])

Error codes, every schema and an interactive console are in the API docs; the raw spec is at openapi.json. Open-source clients for JavaScript, Python, PHP, Ruby, Go, Java and .NET are on GitHub.

Use cases

Where teams use an AI detection API

Learning platforms and LMS tools

Check submissions as they arrive and show teachers the flagged sentences in context, next to a plagiarism check of the same text, so they have something concrete to discuss with the student.

Publishing and content teams

Screen guest posts, freelance drafts and agency copy before an editor reviews them, and keep the result with the draft in your CMS or editorial workflow.

Content moderation and review queues

Add an AI likelihood to reviews, applications or community posts and route high scores to a person for a closer look, rather than rejecting anything automatically.

Need to know where text came from, too? The same scan can run a plagiarism check with matching sources — see the plagiarism checker API. Integration patterns are on the LMS and edtech and publishers and CMS pages.

Pricing and limits

What to know before you build

Free to start

2,000 free API words on every free account, no card, and test keys that return sample results at no cost. Then pay as you go from $4.50 (50,000 words), or choose an API plan from $25 a month. Your email must be verified. See API pricing.

Billed in words

An AI check uses the text’s word count from your monthly allowance, then your purchased balance. Adding plagiarism uses the word count again.

50 words minimum

Shorter text returns 400 text_too_short and costs nothing. The longest text your plan accepts is in GET /account.

60 requests per minute per key

On paid plans; 10 per minute on the free trial. Over the limit you get 429 with Retry-After. Up to 10 keys, each with its own limit.

Keep keys on your server

Keys are stored only as a hash and shown once. Never put one in browser or mobile code; a revoked key stops working immediately.

Not used to train AI

Text you send is used to produce your results and saved to your scan history, never sold or used to train AI models. Read our privacy policy.

Working inside an AI assistant instead of your own code? Use the MCP connector, which works with a free account. Comparing providers? See AI detection APIs compared, or how ours compares with the GPTZero, Copyleaks and Sapling APIs.

FAQ

AI detector API questions

Yes. The Plagiarism Checker Plus API includes AI detection. Send text to POST /scans with "tools": ["ai_detect"], then read the result from GET /scans/{id}: an overall AI score, a summary, and each flagged sentence with a 0–1 likelihood and its character offset and length in your text.

Add AI detection to your app

Create a free key with 2,000 words, send your first text and read the flagged sentences in minutes. Everything for developers is on the developer hub. Want to try it by hand first? Use the free AI detector.

Use of the API is subject to our Terms of Service and Privacy Policy. Questions? Contact us.