Documentation

Everything you need to integrate AI compliance monitoring into your applications.

Getting Started

1

Create an account

Sign up for a free Neural Detective account to access the monitoring dashboard and API keys.

2

Generate an API key

From the monitoring dashboard, create an API key. Include it as a Bearer token in all API requests.

3

Make your first API call

Record a decision, register a model, or scan text for safety. See the example below.

POST /api/v1/decisions
curl -X POST https://api.neuraldetective.com/api/v1/decisions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": "your-model-uuid",
    "inputs": { "applicant_id": "eu-7291" },
    "output": { "decision": "approved", "confidence": 0.87 }
  }'

Why It Matters

AI compliance isn't optional — and the cost of getting it wrong is rising fast.

EU AI Act Compliance

High-risk AI systems must demonstrate continuous monitoring and bias testing. Fines reach up to 35 million euros or 7% of global turnover.

Silent Model Degradation

Drift degrades predictions silently. A lending model can approve bad loans for months before anyone notices.

Bias & Discrimination Risk

Disparate impact liability doesn't require intent. The 4/5ths rule is used by regulators on both sides of the Atlantic.

Content Safety & Trust

PII leakage, toxic output, or missing disclaimers in AI-generated content create brand and legal risk.

What We Measure

Three capabilities that cover the full AI risk surface — from data drift to content safety.

Drift Detection

Catch distribution shifts before they degrade predictions.

PSI

Population Stability Index

Compares live input distributions to training baselines. A value above 0.25 indicates significant shift.

JSD

Jensen-Shannon Divergence

Symmetric divergence measure on a 0–1 scale. Works well for categorical features.

Wasserstein

Wasserstein Distance

Measures the magnitude of distribution shift for continuous features.

CBPE

Confidence-Based Performance Estimation

Estimates accuracy without ground-truth labels using model confidence scores.

Bias Monitoring

Quantify fairness and produce audit-ready evidence.

Disparate Impact Ratio

Compares favourable outcome rates across groups. The 4/5ths rule threshold is a ratio of 0.8 or above.

Group Outcome Rates

Per-attribute breakdown (gender, age group, etc.) for audit evidence and regulatory reporting.

Safety Scanning

A three-tier pipeline that balances speed with depth.

1

Tier 1 — Rules & PII

Regex patterns and PII detection. Runs in approximately 5 ms.

2

Tier 2 — ML Classifiers

Toxicity and content-policy classifiers. Runs in 50–200 ms.

3

Tier 3 — LLM Judge

Optional large-language-model evaluation for nuanced cases. Runs in 500 ms – 3 s.

What it detects

Toxic language, hate speech, PII (emails, phone numbers, SSNs), prompt injection attempts, missing safety disclaimers, and off-topic content.

Pass Flag Block

How You Stay Informed

From dashboards to webhook events — know the moment something changes.

Real-Time Dashboard

Drift trends, alert history, and scan verdicts — filterable by model and time range.

Compliance Reports

Five-section, PDF-exportable reports covering executive summary, model health, safety, alerts, and usage.

Configurable Alerts

Set per-metric warning and critical thresholds with cooldown periods to avoid alert fatigue.

Webhook Notifications

HMAC-signed alert.created events delivered to your endpoint for Slack, PagerDuty, or custom integrations.

API Overview

The Neural Detective API is organized around three capabilities.

Decisions & Models

Register AI models, record decisions, and upload training baselines for drift detection.

Enables drift detection and audit logging required by EU AI Act Article 12.

POST
/api/v1/decisions

Record an AI decision for monitoring and drift detection.

POST
/api/v1/models

Register a new model for monitoring.

GET
/api/v1/models

List all monitored models.

GET
/api/v1/models/:id

Retrieve details for a single model.

POST
/api/v1/models/:id/baselines

Upload training baseline for drift detection.

Safety Scanning

Scan AI-generated text for harmful, toxic, or non-compliant content in real-time or asynchronously.

Prevents PII leakage and toxic content from reaching your users in production.

POST
/api/v1/scans

Scan text for harmful content (sync).

POST
/api/v1/scans/async

Scan text for harmful content (async).

Bias Monitoring

Attach protected attributes to decisions to enable disparate impact analysis and fairness reporting.

Documents fairness for the 4/5ths rule and EU AI Act non-discrimination requirements.

POST
/api/v1/protected_attributes

Attach protected attributes for bias monitoring.

Authentication

All API requests require a Bearer token. Include your API key in the Authorization header of every request.

Authorization Header
Authorization: Bearer YOUR_API_KEY

Webhooks

Receive real-time notifications when alerts are triggered — such as drift threshold breaches or bias detection events. Configure webhook endpoints from the monitoring dashboard.

WEBHOOK
alert.created

Fired when a new alert is created (e.g. drift threshold exceeded, bias detected).

Ready to get started?

Create a free account to access the full API reference, generate API keys, and start monitoring your AI models.