Scan API

Screen text for AI writing patterns from your own tools and workflows. Available on teacher plans.

What the API returns

Every response is a screening signal, not proof of authorship. The API reports a screening result, an AI-pattern score, and the passages that triggered it — inputs for a human conversation, never grounds for an accusation on their own. How the screening works, what it can and cannot do, and the measured limits are documented on the methodology page.

Submitted text is not stored. The result cache holds character offsets, never the text itself, and the scan history row records only the outcome.

Authentication

Create an API key from the dashboard (teacher plans only) and send it as a bearer token. The full key is shown once at creation — we store only a hash, so it can never be shown again. Revoke a key from the dashboard at any time; revocation takes effect immediately.

Authorization: Bearer isitai_sk_YOUR_KEY

Scan text

POST /api/v1/scan with a JSON body containing the text to screen. Text is the only input mode: the API does not fetch URLs or files.

curl -X POST https://isitai.co.uk/api/v1/scan \
  -H "Authorization: Bearer isitai_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Paste the text you want screened here. At least 50 characters."}'

Response

{
  "screening_result": "likely_ai",
  "ai_pattern_score": 78,
  "flagged_passages": [
    {
      "text": "Furthermore, it is important to note that...",
      "reason": "Leans on formulaic transition phrasing that appears far more often in AI writing."
    }
  ],
  "meta": {
    "scanner_version": "ensemble_v7_clean_adr002",
    "analysed_chars": 4210,
    "input_chars": 4210,
    "truncated": false
  }
}
  • screening_result — one of likely_human, uncertain, likely_ai.
  • ai_pattern_score — an integer from 0 to 100. It measures how strongly the text matches patterns common in AI writing; it is not a percentage of the text that is AI-written.
  • flagged_passages — the specific passages that triggered the screening, each with a plain-English reason.
  • meta.truncated — true when only part of a very long input was analysed; analysed_chars against input_chars shows the coverage.
  • Every 200 response carries an X-Scans-Remaining header with the scans left in the current monthly allowance.

Limits and usage

  • 50 characters minimum. Shorter samples cannot support a meaningful screening result and are refused without using a scan.
  • 50,000 characters maximum. Split longer documents into sections and scan each.
  • One shared allowance. API scans draw from the same monthly plan allowance as scans run on the website, and they appear in your dashboard history. A failed scan never uses your allowance.
  • Repeats are free. Re-submitting text that was already screened recently is served from the result cache and does not use a scan — useful when the same template comes back across a class set.

Errors

Errors are JSON with an error and a human-readable message.

StatusMeaningWhat to do
400Invalid requestThe body is not valid JSON, is missing "text", or the text is under 50 characters.
401Missing or invalid API keyNo Authorization header, a malformed key, an unknown key, or a revoked key.
403Plan does not include API accessThe account is not on an active teacher plan.
413Text too longThe text exceeds 50,000 characters. Split the document into sections and scan each.
429Scan limit reachedThe monthly plan allowance is used up. It resets when the subscription renews.
500Internal server errorSomething went wrong on our side. The scan allowance is not used.
503Screening unavailableThe screening service is temporarily down. The scan allowance is not used. Retry shortly.

Using results fairly

The same rules apply through the API as on the website: treat every result as a starting point for a conversation, weigh it alongside what you know about the writer, and read the methodology before building the API into any process that affects a student.