AI Detector API Endpoint Reference
Complete reference for every endpoint in the AI Detector API. Includes request/response schemas, example payloads, error codes, and rate limit details. New to the API? Start with the quickstart guide.
https://aidetectorapi.comAuthorization header. Get your free API key.On this page
/v1/detect
Analyze a single text for AI-generated content. Returns an overall score, per-sentence breakdown, and a confidence rating.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The text to analyze. 10 – 50,000 characters. |
| language | string | No | ISO 639-1 code. Auto-detected if omitted. |
Response
| Field | Type | Description |
|---|---|---|
| score | number | Overall AI probability, 0 (human) to 1 (AI). |
| label | string | "ai-generated" | "human-written" | "mixed" |
| sentences | array | Per-sentence objects with text and score. |
| confidence | string | "low" | "medium" | "high" |
| words_analyzed | number | Total words processed. |
Example
curl -X POST https://aidetectorapi.com/v1/detect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "The quick brown fox jumps over the lazy dog. This sentence was generated by an AI model to demonstrate detection capabilities.",
"language": "en"
}'{
"score": 0.94,
"label": "ai-generated",
"sentences": [
{ "text": "The quick brown fox jumps over the lazy dog.", "score": 0.12 },
{ "text": "This sentence was generated by an AI model to demonstrate detection capabilities.", "score": 0.97 }
],
"confidence": "high",
"words_analyzed": 21
}/v1/batch
Analyze multiple texts in a single request. Ideal for bulk content moderation, document processing, and high-volume workflows.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| texts | string[] | Yes | Array of texts to analyze. Maximum 100 items. |
| webhook_url | string | No | URL to receive results when processing completes. |
Response
| Field | Type | Description |
|---|---|---|
| batch_id | string | Unique identifier for the batch job. |
| status | string | Always "processing" on creation. |
| count | number | Number of texts queued for analysis. |
GET /v1/batch/{batch_id}.Example
curl -X POST https://aidetectorapi.com/v1/batch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"texts": [
"First document to analyze...",
"Second document to analyze...",
"Third document to analyze..."
],
"webhook_url": "https://yourapp.com/webhooks/ai-detect"
}'{
"batch_id": "batch_abc123def456",
"status": "processing",
"count": 3
}/v1/usage
Get current billing period usage for your API key. Use this to monitor consumption and avoid hitting plan limits.
Response
| Field | Type | Description |
|---|---|---|
| plan | string | Current plan name (e.g. "free", "pro", "enterprise"). |
| requests_used | number | Requests consumed in the current period. |
| requests_limit | number | Maximum requests allowed in the current period. |
| period_start | string | ISO 8601 timestamp for the billing period start. |
| period_end | string | ISO 8601 timestamp for the billing period end. |
Example
curl https://aidetectorapi.com/v1/usage \
-H "Authorization: Bearer YOUR_API_KEY"{
"plan": "pro",
"requests_used": 12847,
"requests_limit": 50000,
"period_start": "2026-02-01T00:00:00Z",
"period_end": "2026-03-01T00:00:00Z"
}Webhooks
Configure a webhook URL to receive batch processing results automatically. When a batch job completes, we send a POST request to your webhook URL with the results payload.
Webhook Payload
{
"event": "batch.completed",
"batch_id": "batch_abc123def456",
"results": [
{
"index": 0,
"score": 0.94,
"label": "ai-generated",
"confidence": "high",
"words_analyzed": 142
},
{
"index": 1,
"score": 0.07,
"label": "human-written",
"confidence": "high",
"words_analyzed": 89
}
],
"completed_at": "2026-02-26T14:30:00Z"
}Signature Verification
Every webhook request includes an X-Signature-SHA256 header containing an HMAC-SHA256 signature of the request body. Verify it using your API key as the secret to ensure the request is authentic.
import hmac
import hashlib
def verify_webhook(payload: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(),
payload,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)Error Codes
The API uses standard HTTP status codes. All error responses include a JSON body with error and message fields.
| Status | Error | Description |
|---|---|---|
400 | Bad Request | Invalid request body, missing required fields, or text outside allowed length. |
401 | Unauthorized | Missing or invalid API key in the Authorization header. |
403 | Forbidden | Your API key does not have permission for this resource or action. |
404 | Not Found | The requested endpoint or resource does not exist. |
429 | Rate Limit Exceeded | Too many requests. Back off and retry after the Retry-After header value. |
500 | Internal Server Error | An unexpected error occurred. Try again or contact support if the issue persists. |
{
"error": "unauthorized",
"message": "Invalid or missing API key. Include a valid Bearer token in the Authorization header."
}Rate Limits
Rate limits are applied per API key on a per-minute sliding window. When you exceed the limit, the API returns a 429 status with a Retry-After header.
| Plan | Rate Limit | Monthly Requests |
|---|---|---|
| Free | 10 requests / minute | 1,000 |
| Pro | 100 requests / minute | 50,000 |
| Enterprise | Custom | Unlimited |
Need higher limits? View pricing plans or contact sales for enterprise options.
Ready to get started?
Sign up for a free API key and make your first detection request in minutes.