GUIDEGet up and running in under 5 minutes

AI Detector API Quickstart

Follow these five steps to go from zero to detecting AI-generated text. You will have a working integration in under five minutes — no credit card required.

1

Get Your API Key

Sign up at aidetectorapi.com/signup to get your free API key. No credit card required — the free tier includes 1,000 requests per month with full access to every feature.

After signing up, copy your API key from the dashboard. You will use it in the Authorization header of every request.

2

Install the SDK

Install the official SDK for your language of choice, or skip this step and use any HTTP client or cURL directly.

Python
$ pip install aidetectorapi
JavaScript
$ npm install aidetectorapi

You can also use any HTTP client — cURL, fetch, requests, axios — anything that can make an HTTP POST request works.

3

Make Your First Request

Send a POST request to /v1/detect with the text you want to analyze. Replace your_api_key with the key from Step 1.

detect.py
import requests

response = requests.post(
    "https://aidetectorapi.com/v1/detect",
    headers={"Authorization": "Bearer your_api_key"},
    json={"text": "Paste the text you want to analyze here."}
)

result = response.json()
print(result)
detect.js
const response = await fetch(
  "https://aidetectorapi.com/v1/detect",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer your_api_key",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      text: "Paste the text you want to analyze here."
    })
  }
);

const result = await response.json();
console.log(result);
cURL
curl -X POST https://aidetectorapi.com/v1/detect \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"text": "Paste the text you want to analyze here."}'
4

Understand the Response

The API returns a JSON object with an overall score, per-sentence breakdowns, and metadata. Here is a sample response:

response.json
{
  "score": 0.94,
  "label": "ai-generated",
  "confidence": "high",
  "words_analyzed": 342,
  "sentences": [
    {
      "text": "The quick brown fox jumps over the lazy dog.",
      "score": 0.97
    },
    "..."
  ]
}

Response Fields

FieldTypeDescription
scorenumberOverall AI probability from 0 to 1. A score of 0.94 means 94% likelihood the text is AI-generated.
labelstringHuman-readable classification: "ai-generated", "human-written", or "mixed".
sentencesarrayArray of objects, each containing text (the sentence) and score (AI probability for that sentence). Enables granular, sentence-level analysis.
confidencestringConfidence level of the result: "high", "medium", or "low". Based on text length and model certainty.
words_analyzednumberTotal number of words in the submitted text that were analyzed. Useful for verifying that the full document was processed.

Ready to Detect AI Content?

Get your free API key and start detecting AI-generated text in under five minutes. No credit card required.