Proofademic API

AI Detector

Analyze text to detect AI-generated content with confidence scores and sentence-level analysis.

POST /api/detector/

Analyze text to determine whether it was written by AI. Returns a confidence score and per-sentence breakdown.

Authentication: X-API-Key header with ai_detector scope

Request Parameters

ParameterTypeRequiredDescription
contentstringYesText content to analyze
callback_urlstringNoURL to receive results asynchronously via webhook
pollbooleanNoSet to true to enable polling mode (default: false)
webhook_secretstringNoSecret sent in X-Webhook-Secret header of webhook POST

Processing Modes

The endpoint supports synchronous and asynchronous processing:

ParametersModeResponse
(none)Sync200 OK — result in response body
callback_urlAsync + webhook202 Accepted — result POSTed to your URL
poll: trueAsync + polling202 Accepted — result via GET /api/jobs/{task_id}/
callback_url + poll: trueAsync + both202 Accepted — result via webhook AND polling

See Async Jobs for details on asynchronous processing.

Synchronous Example

Request

curl -X POST https://developer-portal.proofademic.ai/api/detector/ \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "content": "Artificial intelligence has revolutionized numerous industries by automating complex tasks and enhancing decision-making processes."
  }'

Response (200 OK)

{
  "status": "success",
  "task_id": null,
  "result": "ai",
  "ai_score": 0.87,
  "items": [
    {
      "text": "Artificial intelligence has revolutionized numerous industries by automating complex tasks and enhancing decision-making processes.",
      "prediction": "ai-generated",
      "ai_score": 0.87
    }
  ],
  "service_name": "detector_service",
  "execution_time": 1.52,
  "word_count": 18,
  "credits_remaining": 1982,
  "message": "Text has been successfully checked",
  "user": {
    "id": 12345
  }
}

Asynchronous Example

Request

curl -X POST https://developer-portal.proofademic.ai/api/detector/ \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "content": "Your long text here...",
    "poll": true,
    "callback_url": "https://your-server.com/webhook",
    "webhook_secret": "your_secret_123"
  }'

Response (202 Accepted)

{
  "status": "pending",
  "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "result": null,
  "ai_score": null,
  "items": null,
  "service_name": null,
  "execution_time": null,
  "word_count": 256,
  "credits_remaining": 1744,
  "message": null,
  "user": {
    "id": 12345
  }
}

Use the returned task_id to poll for results, or wait for the webhook delivery to your callback_url.

Response Fields

FieldTypeDescription
statusstring"success" (sync) or "pending" (async)
task_idstring | nullJob ID for async requests; null for sync
resultstring | nullDetection verdict: "ai" or "human"
ai_scorefloat | nullAI probability (0.0 = human, 1.0 = AI)
itemsarray | nullSentence-level analysis with individual scores
items[].textstringIndividual sentence text
items[].predictionstringClassification: "ai-generated" or "original"
items[].ai_scorefloatAI probability for this sentence (0.0–1.0)
service_namestring | nullDetection service used
execution_timefloat | nullProcessing time in seconds
word_countintegerWord count of input text
credits_remainingintegerCredit balance after this request
messagestring | nullStatus message
user.idintegerYour user ID

AI Score Interpretation

Score RangeClassificationConfidence
0.0 – 0.3HumanHigh confidence
0.3 – 0.5Likely HumanMedium confidence
0.5 – 0.7Likely AIMedium confidence
0.7 – 1.0AI-GeneratedHigh confidence

The binary result field returns "ai" when ai_score > 0.5 and "human" otherwise.

Webhook Delivery

When using callback_url, the result is POSTed to your URL as JSON with the same response structure as the synchronous response. If you provided a webhook_secret, it is sent in the X-Webhook-Secret header so you can verify the request originated from Proofademic.

The callback_url must be a publicly routable URL. Requests to private, internal, or reserved IP addresses are blocked for security reasons.

POST https://your-server.com/webhook
Content-Type: application/json
X-Webhook-Secret: your_secret_123

{
  "status": "success",
  "task_id": "a1b2c3d4-...",
  "result": "ai",
  "ai_score": 0.87,
  ...
}

On this page