ScribeLens

AI detection API

Add explainable AI-writing detection to your own product. Every response carries sentence-level evidence and reason keywords, not just a score, so you can surface the same auditable output your users would get here.

Base URL: https://scribelensai.com/api/v1

Authentication

Every /api/v1 request needs an API key in the x-api-key header. Create keys from your account page once you are signed in.

Keys look like aidk_ followed by 48 hex characters. Treat one as a password: it carries your quota, so keep it server-side and never ship it in browser or mobile client code.

curl https://scribelensai.com/api/v1/analyze \
  -H "x-api-key: aidk_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"text": "The text you want to analyse."}'

POST /api/v1/analyze

Analyse a full document and return an overall verdict plus sentence-level evidence.

{
  "text": "Full document text to analyse."
}
{
  "success": true,
  "detection": {
    "humanScore": 62,
    "aiScore": 38,
    "verdict": "uncertain",
    "signals": 4,
    "confidence": "moderate",
    "explanation": "...",
    "signalCategories": ["..."]
  },
  "sentenceDetections": [
    {
      "text": "...",
      "detection": { "aiScore": 88, "verdict": "likely-ai", "...": "..." },
      "whyFlagged": [ { "label": "..." } ],
      "likelyAiPhrases": ["..."]
    }
  ],
  "detectionReport": { "...": "..." },
  "excludedSection": null
}

POST /api/v1/analyze/sentences

Score an array of sentences independently. Useful for incremental checks and inline editor feedback.

{
  "sentences": [
    "First sentence to score.",
    "Second sentence to score."
  ]
}
{
  "success": true,
  "results": [
    {
      "text": "First sentence to score.",
      "detection": { "aiScore": 71, "verdict": "likely-ai", "...": "..." },
      "whyFlagged": [ { "label": "..." } ],
      "likelyAiPhrases": ["..."]
    }
  ]
}

GET /api/v1/usage

Check the calling key's monthly quota without consuming any tokens.

No body. Send the x-api-key header only.
{
  "success": true,
  "keyLabel": "Contract key",
  "usage": {
    "tokensUsedThisMonth": 12500,
    "tokensRemainingThisMonth": 187500,
    "requestsThisMonth": 42,
    "monthlyTokenAllowance": 200000,
    "monthKey": "2026-07"
  }
}

Quotas and usage headers

Quota is measured in tokens, where one token covers one word of submitted text. Each key has its own monthly allowance that resets at the start of the month.

Successful /api/v1 responses include headers describing your position in the current period, so you can monitor consumption without a separate call.

Common integrations

Learning platforms

Score submissions on upload in an LMS and surface sentence evidence alongside the grading view rather than a bare percentage.

Content and CMS workflows

Screen drafts before publication and route anything above your threshold to human review.

Editorial review

Batch-check freelance or agency submissions and attach the evidence to your existing review record.

Using the results responsibly

Detection is probabilistic pattern analysis, not proof of authorship. Scores describe how closely text resembles patterns common in AI-generated writing — they do not establish who wrote it.

If you are building a workflow that affects people, surface whyFlagged and the sentence-level detail rather than the headline score alone, and keep a human in the decision. False positives cluster in predictable groups, including multilingual writers and formal academic prose.

Do not present a ScribeLens score to end users as a determination of misconduct.

Frequently asked questions

How do I get an API key?

Sign in and create one from your account page. Keys are shown once at creation, so store the value immediately.

What happens if I exceed my quota?

Requests return 429 with an apiLimits object showing your usage for the period. The allowance resets at the start of the next month.

Can I use the API from the browser?

No. Your key carries your quota and would be exposed to anyone viewing the page. Call the API from your server and proxy the result.

Is there a rate limit per second?

Consumption is governed by your monthly token allowance rather than a per-second limit. Deep scans are substantially slower, so queue them rather than issuing many in parallel.

Do you store text sent to the API?

Submitted text is used to produce the analysis for that request. See the privacy policy for the current retention position before sending sensitive material.