← Home

API Documentation

Complete reference for API DNA detection engine

🖥️ CLI Tool

Run API DNA scans from your terminal:

$ npx api-dna api.openai.com
$ npx api-dna my-relay.com --deep --key sk-xxx
$ npx api-dna api.openai.com --json > report.json

Flags: --deep (full scan with API key), --key (API key), --json (machine-readable output)

🔑 Authentication

API keys unlock higher rate limits (60/min vs 10/min). Pass via header:

curl -H "x-api-key: adna_your_key" \
  -X POST https://api-dna.com/api/quick \
  -H "Content-Type: application/json" \
  -d '{"endpoint": "https://api.openai.com"}'

⚡ Rate Limits

10
Quick/min (no key)
60
Quick/min (with key)
3
Deep/min

🔍 Quick Scan

POST /api/quick

No API key required. Detects family, relay status, pricing, trust level.

Request Body:
{"endpoint": "https://api.openai.com"}
Key Response Fields:
overallScore — 0-100
grade — A/B/C/D
fingerprint — detectedFamily, detectedModel, confidence
relay — isRelay, isOfficial, isLegitRelay, relayHops
trustReport — level (L0-L7), checks[]
priceAudit — priceStatus, markupPercent, officialPriceRange
ipInfo — ip, org, city, country

🧬 Deep Scan

POST /api/scan

Requires target API key. Returns SSE stream with progress + final report.

Request Body:
{"endpoint": "https://api.openai.com", "apiKey": "sk-xxx", "model": "gpt-4o-mini"}

Response: Server-Sent Events stream with progress and complete events.

📊 Other Endpoints

GET /api/stats — Global scan statistics + recent scans
GET /api/ranking — Provider rankings by score
GET /api/providers — Verified provider directory
POST /api/verify — Submit provider for verification
POST /api/monitor — Subscribe to endpoint monitoring
GET /api/monitor/alerts — Get monitoring alerts
POST /api/keys — Create API key
GET /api/keys — List API keys (masked)
GET /embed/badge?endpoint=xxx — SVG embed badge
POST /api/share — Generate share text

🛡️ Trust Levels

L7
Fully Verified
All checks + token audit
L6
Verified Official
Domain + ASN + models + headers
L5
High Trust
Domain + most checks passed
L4
Legit Relay
Verified relay with matching models
L3
Moderate
Some checks passed
L2
Low Trust
Multiple check failures
L1
Suspicious
Most checks failed
L0
Dangerous
Known fraud or critical failures

📎 Embed Badge

Add a trust badge to your site:

<img src="https://api-dna.com/embed/badge?endpoint=api.openai.com" />
© 2026 API DNA