Introduction#
The AIDetector.cx REST API lets you integrate AI content detection directly into your application. Send text over HTTPS and receive a structured JSON response with AI probability scores, sentence-level analysis, model fingerprinting, and confidence metrics.
All endpoints use HTTPS. Request and response bodies are JSON. The base URL for all v1 endpoints is https://api.aidetector.cx/v1.
Documentation Preview. API endpoints are shown here as technical reference. Endpoints marked
Quick Start#
Make your first detection call in under 5 minutes:
- Sign up or log in at aidetector.cx/signup
- Go to your API Dashboard and generate a key
- Replace
YOUR_API_KEYin the examples below and send your first request
cURL
curl -X POST https://api.aidetector.cx/v1/detect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Your content to analyze here...",
"include_sentences": true
}'JavaScript
const response = await fetch('https://api.aidetector.cx/v1/detect', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Your content to analyze here...',
include_sentences: true,
}),
});
const data = await response.json();
console.log(data.data.ai_probability); // e.g. 0.92Python
import requests
response = requests.post(
'https://api.aidetector.cx/v1/detect',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'text': 'Your content to analyze here...',
'include_sentences': True,
}
)
data = response.json()
print(data['data']['ai_probability']) # e.g. 0.92Authentication#
All requests must include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEYRequests without a valid key return 401 Unauthorized. Keys are tied to your account and plan quota. Never expose API keys in client-side code — always route through a backend or serverless function.
Generate API Key#
API keys are managed from your API Dashboard. You can create multiple named keys per integration, copy them once at creation, and revoke any key at any time.
API access requires an active Business or Enterprise plan. Requests draw from the account's shared monthly credit pool.
Open API DashboardPOST /v1/detect#
Analyzes a single text for AI generation. Returns probability scores, model fingerprint, and optional sentence-level breakdown.
| Property | Value |
|---|---|
| Method | POST |
| URL | https://api.aidetector.cx/v1/detect |
| Content-Type | application/json |
| Auth | Bearer token (required) |
Request Body#
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The text content to analyze. Min 50 words. |
| include_sentences | boolean | No | Return per-sentence scores. Default: false. |
| language | string | No | ISO 639-1 code. Default: auto-detected. |
Response Schema#
Successful responses return HTTP 200 with the following structure:
{
"success": true,
"data": {
"ai_probability": 0.92,
"human_probability": 0.08,
"confidence_score": 0.95,
"detected_model": "ChatGPT",
"sentence_analysis": [
{
"sentence": "Artificial intelligence has rapidly transformed...",
"ai_probability": 0.89,
"human_probability": 0.11
}
]
}
}| Field | Type | Description |
|---|---|---|
| ai_probability | float | Probability the text is AI-generated. Range 0.0–1.0. |
| human_probability | float | Complement of ai_probability. Range 0.0–1.0. |
| confidence_score | float | Model confidence in the prediction. Range 0.0–1.0. |
| detected_model | string | Most likely source AI model (e.g., "ChatGPT"). |
| sentence_analysis | array | Per-sentence scores. Only present when include_sentences=true. |
Sentence Analysis#
When include_sentences: true is set, the response includes a sentence_analysis array. Each element contains:
{
"sentence": "The sentence text...",
"ai_probability": 0.89,
"human_probability": 0.11
}POST /v1/batch#
Analyze up to 100 texts in a single request. Each item is processed independently. Available on Pro and Enterprise plans.
cURL
curl -X POST https://api.aidetector.cx/v1/batch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{ "id": "doc-1", "text": "First text to analyze..." },
{ "id": "doc-2", "text": "Second text to analyze..." }
]
}'JavaScript
const response = await fetch('https://api.aidetector.cx/v1/batch', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
items: [
{ id: 'doc-1', text: 'First text to analyze...' },
{ id: 'doc-2', text: 'Second text to analyze...' },
],
}),
});Error Codes#
Errors are returned as HTTP 4xx/5xx with a JSON body:
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "You have exceeded your monthly request quota.",
"retry_after": 86400
}
}| HTTP | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | Your plan does not have access to this endpoint. |
| 422 | VALIDATION_ERROR | Request body failed validation (e.g., text too short). |
| 429 | RATE_LIMIT_EXCEEDED | Monthly quota exhausted. Retry after reset. |
| 500 | INTERNAL_ERROR | Server-side error. Retry with exponential backoff. |
| 503 | SERVICE_UNAVAILABLE | Temporary outage. Check status page. |
Rate Limits#
Rate limit information is returned in response headers on every request:
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9843
X-RateLimit-Reset: 1748736000| Plan | Requests/Month | Batch Size | Concurrent |
|---|---|---|---|
| Free | 100 | — | 1 |
| Pro | 10,000 | 50 | 10 |
| Enterprise | Custom | 100 | Custom |
Usage & Quotas#
Quotas reset on the first day of each calendar month (UTC). Each call to /v1/detect consumes one request regardless of text length. Batch requests consume one request per item in the array. Monitor your real-time usage in your API Dashboard.
SDKs#
Official SDKs are in active development. In the meantime, the REST API works directly from any HTTP client. Community libraries are available for Python, JavaScript, PHP, and Go — check our GitHub organisation once launched.