mydetector AI Security & Humanizer
Detector Images Humanizer Pricing API Dashboard
REST API Reference v1

REST API Documentation

Integrate enterprise AI text detection and adversarial rewriting directly into your applications, LMS, CMS, or Chrome extensions.

Authentication

Authenticate requests by providing your API key (starting with sk_live_...) in either the X-API-Key request header or the standard Authorization: Bearer sk_live_... header.

Authorization: Bearer sk_live_9a7b8c...
# OR
X-API-Key: sk_live_9a7b8c...
POST /api/v1/detect

Analyzes text using deep multi-layer neural ensemble models and returns overall AI fake probability, human probability, sentence-level predictions, and perplexity stylometry metrics. Cost: $0.0001 per call.

Request Body (JSON)

{
  "text": "Artificial intelligence plays a crucial role in modern technology..."
}

Response Example (200 OK)

{
  "fake_probability": 88.5,
  "real_probability": 11.5,
  "verdict": "AI-Generated",
  "total_sentences": 4,
  "metrics": {
    "perplexity": 18.4,
    "burstiness": 6.2,
    "repetition_score": 0.12
  },
  "sentences": [
    {
      "sentence": "Artificial intelligence plays a crucial role in modern technology...",
      "fake_prob": 0.94,
      "is_ai": true
    }
  ]
}

Code Example: Python

import requests

url = "https://mydetector.xyz/api/v1/detect"
headers = {
    "X-API-Key": "sk_live_your_api_key_here",
    "Content-Type": "application/json"
}
payload = {
    "text": "Paste your article or essay text here..."
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
POST /api/v1/detect-image

Analyzes images for generative AI artifacts using a dual-backbone ensemble (Smaug CNN + Vision Transformer ViT). Detects synthetic images from Midjourney, DALL-E 3, Stable Diffusion, Flux, Recraft, and generative models. Cost: $0.0005 per image.

Supported Formats: JPG, JPEG, PNG, WEBP (Max: 10 MB)

Supported Input Methods: Multipart file upload (file=@...), JSON with image_url, or JSON with base64 image_base64.

Request Example: cURL (Multipart File Upload)

curl -X POST https://mydetector.xyz/api/v1/detect-image \
  -H "X-API-Key: sk_live_your_api_key_here" \
  -F "file=@photo.jpg"

Request Example: cURL (JSON with Image URL)

curl -X POST https://mydetector.xyz/api/v1/detect-image \
  -H "X-API-Key: sk_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image_url": "https://example.com/artwork.png"}'

Response Example (200 OK)

{
  "success": true,
  "ai_probability": 0.942,
  "ai_percent": 94.2,
  "human_percent": 5.8,
  "verdict": "ai",
  "label": "This image is likely created by AI - 94% FAKE",
  "description": "High-confidence generative AI signatures detected across image textures and composition.",
  "smaug_percent": 96.1,
  "vit_percent": 92.3,
  "width": 1024,
  "height": 1024,
  "format": "JPEG",
  "remaining_credits": 0.9995
}

Code Example: Python

import requests

url = "https://mydetector.xyz/api/v1/detect-image"
headers = {"X-API-Key": "sk_live_your_api_key_here"}

# Option A: Direct file upload
with open("photo.jpg", "rb") as f:
    response = requests.post(url, headers=headers, files={"file": f})
print(response.json())

# Option B: Image URL via JSON
# response = requests.post(url, headers={**headers, "Content-Type": "application/json"}, json={"image_url": "https://example.com/photo.jpg"})

Code Example: Node.js / JavaScript

const fs = require('fs');
const FormData = require('form-data');
const axios = require('axios');

const form = new FormData();
form.append('file', fs.createReadStream('photo.jpg'));

const response = await axios.post('https://mydetector.xyz/api/v1/detect-image', form, {
  headers: {
    ...form.getHeaders(),
    'X-API-Key': 'sk_live_your_api_key_here'
  }
});
console.log(response.data);
POST /api/v1/humanize

Transforms robotic text into natural human-like prose. Cost: $0.0001 per call.

Request Body (JSON)

{
  "text": "In conclusion, it is important to note that machine learning frameworks foster productivity...",
  "mode": "balanced"  // Options: "balanced", "aggressive", "formal"
}

Response Example (200 OK)

{
  "success": true,
  "humanized_text": "Ultimately, machine learning systems streamline daily tasks...",
  "final_ai_score": 0.0,
  "original_words": 15,
  "mode": "balanced"
}

HTTP Error Status Codes

Code Meaning Resolution
400 Bad Request Invalid input or text exceeds word limit Shorten text to under 1500 words.
401 Unauthorized Missing or invalid API key / session Include valid X-API-Key: sk_live_... header.
402 Payment Required Insufficient credit balance Top up your account balance in the dashboard.
429 Too Many Requests Rate limit exceeded (60 req/min) Throttle request frequency or contact support.