API Reference
REST API for AI text detection. Send text, receive an AI-likelihood score and writing statistics in JSON.
Authentication
All API requests require a Bearer token in the Authorization header.
curl -X POST https://aintai.io/api/detect/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Your text to analyze..."}'
POST /api/detect/
Submit text for AI detection analysis.
Request Body
| Parameter | Type | Description |
|---|---|---|
| text | string | The text to analyze. Required. Max 25,000 characters. |
Response
{
"score": 75,
"label": "Likely AI-Generated",
"confidence": "high",
"burstiness": 0.234,
"vocabulary_richness": 0.521,
"avg_sentence_length": 18.3,
"sentence_count": 12,
"word_count": 220
}
Response Fields
| Field | Type | Description |
|---|---|---|
| score | integer | AI probability score (0-100) |
| label | string | Human-readable verdict |
| confidence | string | "low", "medium", or "high" |
| burstiness | float | Sentence length variation (higher = more human) |
| vocabulary_richness | float | Unique words ratio (0-1) |
Rate Limits
| Plan | Requests/min | Requests/month |
|---|---|---|
| Pro | 60 | Fair use |
| Custom | On request | Contact us |
Try it live
Code examples
Python
import requests
r = requests.post(
"https://aintai.io/api/detect/",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"text": "Your text to analyze..."},
)
print(r.json()["score"])
JavaScript
const r = await fetch("https://aintai.io/api/detect/", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ text: "Your text to analyze..." }),
});
console.log((await r.json()).score);