Skip to main content
REST API · Preview

API Reference

Industry-leading AI text detection over JSON. Trained on 2 billion+ samples. Bearer auth, idempotent endpoints, pricing quotes returned on every call. Official JavaScript and Python SDKs ready to drop in.

Quickstart

  1. Get an API key. Sign up for Plus ($39/mo) or higher, or top up a PAYG balance. Keys live in your dashboard.
  2. Set the bearer header. Send Authorization: Bearer dad_live_... on every request except /v1/health.
  3. Make your first detection. POST to /v1/detect with a JSON body containing text (min 50 words for a verdict, 150+ recommended for high confidence).
  4. Read the verdict. Response includes score (0-1), band (categorical), per-layer scores, and a pricing_quote showing both billing modes.

Official SDKs

One-liner install in either language. Both wrap the same OpenAPI spec, ship type definitions, and handle retries + error mapping for you.

JavaScript / TypeScript

@deepaidetector/client
npm install @deepaidetector/client
View on registry →

Other languages: use the curl / Go / Ruby / PHP / C# samples below — every endpoint is a plain JSON POST/GET.

Authentication

Every request needs a bearer token in the Authorization header.

Authorization: Bearer dad_live_xxxxxxxxxxxx

Live keys start with dad_live_; sandbox / test keys (no real billing, capped quota) start with dad_test_. Issue, rotate, and revoke from your dashboard. Keys are shown in plaintext exactly once — at creation time. We only store a hash; if you lose a key you'll need to revoke and create a new one.

Code samples

Example: POST /v1/detect. The shape is identical for every other endpoint — change the path + body.

cURL

curl -X POST https://api.deepaidetector.com/v1/detect \
  -H "Authorization: Bearer $DEEPAIDETECTOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Climate change is reshaping how coastal cities approach long-term planning. Rising sea levels and intensifying storms have moved infrastructure resilience from a niche topic to the top of every mayor agenda.",
    "strictness": "balanced"
  }'

Rate limits

Limits enforced at the edge. Three headers and a meta.rate_limit object are returned on every response:

X-RateLimit-Limit:     5000
X-RateLimit-Remaining: 4892
X-RateLimit-Reset:     1717948800000
TierDetectionsWords / docAPI
Anonymous1 / mo / IP1,000No
Registered Free5 / mo1,000No
Starter ($9)1,000 / mo2,000No
Pro ($19)2,500 / mo2,000Coming soon
Plus ($39)3,500 / mo4,000Coming soon — entry API tier
Business ($99)5,000 / mo5,000Coming soon
Enterprise ($499)10,000 / mo20,000Coming soon + dedicated support
PAYG / API-onlyBalance-only5,000Coming soon

When rate-limited, the API returns 429 with a Retry-After header (seconds) and a resets_at field (unix ms). Recommended client strategy: exponential backoff with jitter, respect Retry-After, cap at 3 retries. The official SDKs do this automatically.

Errors

All errors return { "error": "<machine_code>", "message": "<human>", "request_id": "<uuid>" }. Switch on error, not message — only error is part of the API contract.

StatusCodeWhat it means
400invalid_inputBody or query failed Zod validation.
401unauthorizedMissing or invalid API key.
402upgrade_requiredWord count exceeds tier max, or feature requires a higher plan.
413payload_too_largeRequest body over 200KB.
422insufficient_textText shorter than the 50-word verdict minimum.
429rate_limit_exceededQuota exhausted. Retry after `resets_at`.
500internal_errorUnexpected server failure. Retry with backoff.
502deep_scan_failedML upstream unreachable (deep / plagiarism only).

Full error reference →

Webhooks

Configure a webhook URL in your dashboard (Plus+) to receive events when detections complete. Body is JSON; signature is HMAC-SHA256 over the body in the X-DAD-Signature header.

POST https://your-app.example.com/dad-webhook
X-DAD-Signature: a8f2e9...
X-DAD-Event:     detection.completed
X-DAD-Delivery:  0190b1f8-aae5-7e3a-9b1c-7f4ba2c0d3e1
Content-Type:    application/json

{
  "id": "evt_01J...",
  "type": "detection.completed",
  "created": 1717948800000,
  "data": { /* same shape as POST /v1/detect response */ }
}

Retry policy: 7 attempts with exponential backoff over 72h. Respond 2xx within 10s to ack.

Webhook signing + handler examples →

Full OpenAPI reference

Interactive view of /openapi.yaml. Loaded from CDN — if it doesn't render, the raw spec is always available at /openapi.yaml.

Loading interactive API explorer…

Coming soon

API is launching soon

We're putting the finishing touches on the public API surface. Sign up to be the first to know when keys go live — we'll also throw in starter credit on launch day.

In the meantime: the web dashboard, per-passage highlights, exports, and word-pack credits all work today on every paid tier.