Walter AI PlatformWalter AI Platform

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

Limits

LimitValue
Minimum length50 words
Maximum length2,000 words

Requests outside these bounds are rejected with 400 (code service_error) before any credits are charged. The limits apply to both synchronous and asynchronous requests.

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.walterwrites.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 improving business decisions. Organizations across healthcare, finance, and manufacturing now rely on machine learning models to analyze vast amounts of data, identify meaningful patterns, and generate accurate predictions. As these technologies continue to evolve, they are expected to deliver even greater efficiency, innovation, and value across the global economy."
  }'

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 improving business decisions.",
      "prediction": "ai-generated",
      "ai_score": 0.91
    },
    {
      "text": "Organizations across healthcare, finance, and manufacturing now rely on machine learning models to analyze vast amounts of data, identify meaningful patterns, and generate accurate predictions.",
      "prediction": "ai-generated",
      "ai_score": 0.86
    },
    {
      "text": "As these technologies continue to evolve, they are expected to deliver even greater efficiency, innovation, and value across the global economy.",
      "prediction": "ai-generated",
      "ai_score": 0.84
    }
  ],
  "service_name": "detector_service",
  "execution_time": 1.52,
  "word_count": 60,
  "credits_remaining": 1940,
  "message": "Text has been successfully checked",
  "user": {
    "id": 12345
  }
}

Asynchronous Example

Request

curl -X POST https://developer-portal.walterwrites.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 improving business decisions. Organizations across healthcare, finance, and manufacturing now rely on machine learning models to analyze vast amounts of data, identify meaningful patterns, and generate accurate predictions. As these technologies continue to evolve, they are expected to deliver even greater efficiency, innovation, and value across the global economy.",
    "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": 60,
  "credits_remaining": 1940,
  "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 | nullName of the service that handled the request. For reference only.
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 WalterAI.

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