Skip to main content

SDKs & integrations

Official Python and JavaScript SDKs, plus framework integration guides. The fastest way to call AI Detector API from your stack.

Install the SDK

Both SDKs are open-source and MIT-licensed. They wrap the same REST API under the hood.

pip install aidetectorapi

Basic usage

Pass text in, get a score and sentence-level breakdown back.

from aidetectorapi import AIDetector

client = AIDetector(api_key="YOUR_API_KEY")

# Detect AI text — returns score + sentence-level breakdown
result = client.detect("Paste any text to analyze for AI detection.")

print(f"AI probability: {result.score:.0%}")
print(f"Confidence: {result.confidence}")
for s in result.sentences:
    print(f"  [{s.score:.0%}] {s.text}")

Framework integrations

Drop-in handlers for the most common backend frameworks. Each example expects an AIDETECTORAPI_KEY env var.

// app/api/check/route.ts
import { NextResponse, type NextRequest } from "next/server";
import { AIDetector } from "@aidetectorapi/sdk";

const detector = new AIDetector(process.env.AIDETECTORAPI_KEY!);

export async function POST(req: NextRequest) {
  const { text } = await req.json();
  const result = await detector.detect(text);
  return NextResponse.json(result);
}

No-code & low-code

Don't want to write code? AI Detector API works with the no-code platforms below via a standard REST connector.

Zapier

Trigger detection on new form submissions, emails, or CRM events.

Make (Integromat)

Branch workflows on AI probability or sentence-level threshold.

n8n

Self-hosted automation; same REST endpoint.

Bubble

Add detection to Bubble apps via the API Connector plugin.

All four platforms can hit the AI Detector API REST endpoint directly. See the API reference for request and response details.

Python SDK on GitHub

MIT-licensed. Issues and PRs welcome. aidetectorapi-python

JavaScript SDK on GitHub

MIT-licensed. TypeScript-first, native fetch, no deps. aidetectorapi-javascript

Stability

SDKs follow semver. Breaking changes ship as a major version with at least 90 days of overlap support.

Runtime support

Python 3.9+ · Node 18+ · Edge runtimes (Vercel, Cloudflare Workers, Deno). JavaScript SDK is zero-dependency.

Get an API key in under 5 minutes

Free tier — 1,000 requests/month, no credit card.

Get my free API key