Documentation / Quickstart

Quickstart Guide

Get up and running with AI image detection in under two minutes. Get your API key, install the SDK, send your first request, and read the verdict. All four steps below.

2 min
time to first verdict
<100ms
p50 latency
7
SDK languages
Free
500 scans/month
Step 1 of 4

Get your API key

Sign up at aiimagedetectorapi.com. Your API key appears in the dashboard immediately, no approval wait, no credit card required. Free tier covers 500 scans per month with full feature access including model attribution and region heatmaps.

Your API key will look like: aidet_live_sk_5d8f23ab...

Test keys use the aidet_test_* prefix for development without affecting your quota.

Step 2 of 4

Install the SDK (or use cURL)

Pick your language. All seven SDKs ship with automatic retries, request signing, and helpful error messages. If you prefer to hit the REST API directly with cURL, skip to step 3.

Python

pip install aiimagedetector

Node.js / TypeScript

npm install @aiimagedetector/node

Go

go get github.com/aiimagedetector/go

Ruby

gem install aiimagedetector

PHP

composer require aiimagedetector/php

Java

implementation 'com.aiimagedetector:java:1.0'
Step 3 of 4

Send your first image

POST an image URL or a base64-encoded image to the /v1/detect endpoint. The response includes the verdict, a confidence score from 0 to 1, model attribution across 25+ generators, and a heatmap URL.

PythonPOST /v1/detect
from aiimagedetector import Client

client = Client(api_key="aidet_live_sk_...")

result = client.detect(
    image_url="https://example.com/photo.jpg",
    include_attribution=True,
    include_heatmap=True,
)

print(f"Verdict: {result.verdict} ({result.confidence:.0%})")
print(f"Top model: {result.top_model()}")
Node.js / TypeScriptPOST /v1/detect
import { Client } from "@aiimagedetector/node";

const client = new Client({ apiKey: process.env.AIDET_KEY! });

const result = await client.detect({
  imageUrl: "https://example.com/photo.jpg",
  includeAttribution: true,
  includeHeatmap: true,
});

console.log(`${result.verdict} (${(result.confidence * 100).toFixed(1)}%)`);
cURLRaw HTTP
curl -X POST https://api.aiimagedetectorapi.com/v1/detect \
  -H "Authorization: Bearer aidet_live_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/photo.jpg",
    "include_attribution": true,
    "include_heatmap": true
  }'
Step 4 of 4

Read the response

The response is JSON with stable contracts across versions. Inspect the verdict, the calibrated confidence, the model attribution map, and the heatmap URL.

SAMPLE RESPONSE
{
  "verdict": "ai_generated",
  "confidence": 0.978,
  "model_attribution": {
    "midjourney_v7": 0.84,
    "flux_pro": 0.09,
    "stable_diffusion_4": 0.05,
    "dalle_4": 0.02
  },
  "heatmap_url": "https://cdn.aiimagedetectorapi.com/h/8a3f....png",
  "c2pa_manifest_present": false,
  "request_id": "req_01HXYZABC...",
  "latency_ms": 87
}

verdict

One of authentic, ai_generated, or ai_edited.

confidence

Calibrated 0 to 1 probability. Pair with your own threshold for the action you want to take.

model_attribution

Per-model confidence across 25+ generators (Midjourney v6/v7, Flux, DALL-E, Stable Diffusion, Sora, more).

heatmap_url

Pixel-level heatmap highlighting suspicious regions. Useful for inpainted or partially edited images.

Ready to ship detection?

Get your free API key, no credit card required. 500 free scans per month forever.

Sign up free