🚀 Is It AI? Extension 2.0 is here! Completely rebuilt with Chrome's Side Panel, one-click sign-in, automatic history sync, and usage tracking at a glance. Faster, cleaner, and works on more sites than ever. Add to Chrome →

API Documentation

Integrate AI image detection into your applications with our simple REST API. Detect AI-generated images programmatically.

Base URL: https://api.isitai.com

Quick Start

Get started with the Is It AI? API in three steps.

1

Get your API key

Create an account and generate an API secret from your API Keys page. Then authenticate to get a bearer token.

2

Make a request

Send an image URL to the detection endpoint.

Request
# Detect an image by URL
curl -X POST "https://api.isitai.com/detect-img?image_url=https://example.com/image.jpg" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "accept: application/json"
3

Get results

Receive a detailed AI detection verdict with confidence scores.

Response
{
  "predicted_label": "AI",
  "probability": 0.92,
  "potential_method": "midjourney",
  "method_probability": 0.85,
  "NSFW": "False",
  "NSFW_probability": 0.02
}

Authentication

The API uses JWT bearer tokens. Authenticate with your email and API secret to get a token, then include it in the Authorization header of every request.

Step 1: Get your API secret

Your API secret is available on your API Keys page. This is different from your account password — it is used exclusively for API authentication.

Step 2: Request an access token

POST your email and API secret to the /login endpoint to receive a JWT access token.

Get Token
curl -X POST https://api.isitai.com/login \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "[email protected]&password=YOUR_API_SECRET"
Token Response
{
  "access_token": "eyJhbGciOiJIUzI1NiIs..."
}

Step 3: Use the token

Include the token in the Authorization header as a Bearer token on all subsequent requests.

Header
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Token lifecycle: Access tokens are JWTs with an expiration. When a token expires, request a new one by calling /login again. You can also revoke a token early using the /revoke-token endpoint.

Endpoint Reference

All endpoints use the base URL https://api.isitai.com.

POST /login

Authenticate and receive a JWT access token.

Headers

HeaderValue
Content-Typeapplication/x-www-form-urlencoded

Body Parameters

ParameterTypeRequiredDescription
emailstringYesYour account email address
passwordstringYesYour API secret (from the API Keys page)

Response

200 OK
{
  "access_token": "eyJhbGciOiJIUzI1NiIs..."
}
POST /detect-img

Analyze an image for AI-generated content. Supports two modes: image URL (query parameter) or file upload (multipart form).

Headers

HeaderValue
AuthorizationBearer YOUR_ACCESS_TOKEN
acceptapplication/json

Option A: Image URL

ParameterInTypeDescription
image_urlquerystringURL of the image to analyze
cURL (URL mode)
curl -X POST "https://api.isitai.com/detect-img?image_url=https://example.com/photo.jpg" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "accept: application/json"

Option B: File Upload

ParameterInTypeDescription
filebody (multipart)fileImage file to analyze
cURL (file upload)
curl -X POST https://api.isitai.com/detect-img \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "accept: application/json" \
  -F "file=@/path/to/image.jpg"

Response

200 OK
{
  "predicted_label": "AI",
  "probability": 0.92,
  "potential_method": "midjourney",
  "method_probability": 0.85,
  "NSFW": "False",
  "NSFW_probability": 0.02
}
GET /consumption/

Retrieve your current API usage count for the billing period.

Note: The trailing slash is required for this endpoint.

Headers

HeaderValue
AuthorizationBearer YOUR_ACCESS_TOKEN
cURL
curl https://api.isitai.com/consumption/ \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK
{
  "consumption": 142
}
POST /revoke-token

Revoke your current access token. After revocation, you will need to authenticate again via /login.

Headers

HeaderValue
AuthorizationBearer YOUR_ACCESS_TOKEN
cURL
curl -X POST https://api.isitai.com/revoke-token \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

200 OK
{
  "message": "Token revoked successfully"
}

Response Fields

The detection endpoint (/detect-img) returns the following fields.

FieldTypeDescription
predicted_label string "AI" or "Human" — the detection verdict
probability number Confidence score from 0 to 1 (e.g. 0.92 = 92% confidence)
potential_method string Suspected AI generation method (e.g. "midjourney", "stable_diffusion", "dall-e"). Present when label is "AI".
method_probability number Confidence score for the generation method (0 to 1)
NSFW string "True" or "False" — whether the image contains NSFW content
NSFW_probability number Confidence score for the NSFW classification (0 to 1)

Error Handling

The API uses standard HTTP status codes. Errors include a JSON body with a message.

StatusMeaningCommon Cause
200SuccessRequest completed successfully
401UnauthorizedMissing, invalid, or expired token
422Unprocessable EntityInvalid image URL, unsupported format, or image too large
429Too Many RequestsRate limit exceeded — wait and retry
500Internal Server ErrorUnexpected error on our side — retry or contact support

Error Response Format

Error Response
{
  "detail": "Invalid or expired token"
}

Supported Formats & Limits

Image Types

  • JPEG / JPG
  • PNG
  • WebP
  • GIF (first frame)

Limits

  • Max file size: 5 MB
  • Rate limiting applies per account
  • Quota based on your subscription plan

Best Practices

  • Use images at least 256×256 px for best accuracy
  • Avoid heavily compressed or cropped images
  • Re-authenticate when you receive a 401 response

Code Examples

Full authentication + detection flow in popular languages.

Detect by Image URL

cURL
# 1. Get access token
TOKEN=$(curl -s -X POST https://api.isitai.com/login \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "[email protected]&password=YOUR_API_SECRET" \
  | jq -r '.access_token')

# 2. Detect image
curl -X POST "https://api.isitai.com/detect-img?image_url=https://example.com/photo.jpg" \
  -H "Authorization: Bearer $TOKEN" \
  -H "accept: application/json"
Python
import requests

# 1. Authenticate
auth = requests.post("https://api.isitai.com/login", data={
    "email": "[email protected]",
    "password": "YOUR_API_SECRET"
})
token = auth.json()["access_token"]

# 2. Detect by URL
response = requests.post(
    "https://api.isitai.com/detect-img",
    params={"image_url": "https://example.com/photo.jpg"},
    headers={
        "Authorization": f"Bearer {token}",
        "accept": "application/json"
    }
)
result = response.json()
print(f"Verdict: {result['predicted_label']} ({result['probability']:.0%} confidence)")
Node.js
// 1. Authenticate
const authRes = await fetch("https://api.isitai.com/login", {
  method: "POST",
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
  body: "[email protected]&password=YOUR_API_SECRET"
});
const { access_token } = await authRes.json();

// 2. Detect by URL
const imageUrl = encodeURIComponent("https://example.com/photo.jpg");
const res = await fetch(
  `https://api.isitai.com/detect-img?image_url=${imageUrl}`,
  {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${access_token}`,
      "accept": "application/json"
    }
  }
);
const result = await res.json();
console.log(`Verdict: ${result.predicted_label} (${(result.probability * 100).toFixed(0)}% confidence)`);

Detect by File Upload

cURL
curl -X POST https://api.isitai.com/detect-img \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "accept: application/json" \
  -F "file=@/path/to/image.jpg"
Python
import requests

token = "YOUR_ACCESS_TOKEN"

with open("image.jpg", "rb") as f:
    response = requests.post(
        "https://api.isitai.com/detect-img",
        headers={
            "Authorization": f"Bearer {token}",
            "accept": "application/json"
        },
        files={"file": f}
    )
print(response.json())
Node.js
import { readFileSync } from "fs";

const token = "YOUR_ACCESS_TOKEN";
const formData = new FormData();
formData.append("file", new Blob([readFileSync("image.jpg")]), "image.jpg");

const res = await fetch("https://api.isitai.com/detect-img", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
    "accept": "application/json"
  },
  body: formData
});
console.log(await res.json());

API Pricing

API access is included with all subscription plans. Choose the plan that fits your usage needs.

View Plans & Pricing

Start Building with Is It AI?

Get your API token and integrate AI detection into your applications today.