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
Two calls from text to an AI result
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.
Send text with ai_detect
POST the text to /scans with "tools": ["ai_detect"]. You get a scan ID back straight away.
Read the AI result
GET /scans/{id} until the status is completed, usually 30–90 seconds, and read results.aiDetection.
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.
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.
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"]
}// 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);
}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.
Where teams use an AI detection API
Learning platforms and LMS tools
Publishing and content teams
Content moderation and review queues
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.
What to know before you build
Free to start
Billed in words
50 words minimum
400 text_too_short and costs nothing. The longest text your plan accepts is in GET /account.60 requests per minute per key
429 with Retry-After. Up to 10 keys, each with its own limit.Keep keys on your server
Not used to train AI
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.
AI detector API questions
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.