Protocol Detection API
/api/detect/{model}Run detection against Claude, OpenAI, or Gemini protocols — verify endpoint reachability, response format, usage fields, model mapping, and basic compatibility.
View detection page →TokenAPI Scan provides not just one-off relay detection, but also leaderboard, site directory, candidate pool, pricing clues, and network diagnostics data endpoints. Suitable for pre-purchase verification, automated monitoring, internal dashboards, and third-party tool integration.
/api/detect/{model}Run detection against Claude, OpenAI, or Gemini protocols — verify endpoint reachability, response format, usage fields, model mapping, and basic compatibility.
View detection page →/api/result/{job_id}Poll a single detection job for status, duration, error info, and public report links — suitable for automated verification workflows.
View FAQ →/api/site/{site_id}Read provider profiles, aggregated metrics, and recent detection records — for internal provider databases or pre-purchase checks.
Browse site directory →/api/rankingReturns aggregated leaderboard results with confidence labels. Focuses on sites with accumulated detection evidence.
View leaderboard →/api/candidatesReturns candidate domains with first-round probe status — for candidate archiving, manual review queues, and site expansion workflows.
View candidate archive →/tools/*Network tools covering IP, Ping, DNS, WebRTC, service status, and Claude connectivity — helps rule out local network variables.
Open toolbox →These endpoints live under /tools/api/* and require no API key — designed for operational monitoring, automated monitoring, and third-party troubleshooting integration.
/tools/api/ip/myGet visitor's public IP (CF-Connecting-IP / X-Forwarded-For), with ASN, geolocation, and IP type.
Live call →/tools/api/ip/risk/{ip}?source=claudeScores IP against datacenter/proxy/anonymous network/known risk pools (0-100). Source supports claude/openai/gemini.
Example: 8.8.8.8 →/tools/api/ip/lookup?ip={ip}Look up any IPv4/IPv6 for ASN, organization, geolocation, and IP range.
Example: 1.1.1.1 →/tools/api/ping/runMulti-probe ICMP/HTTP test with presets: global5, asia3, cn3. Returns per-probe RTT and packet loss.
/tools/api/dns/diagnose?host={host}Multi-resolver comparison (CF/Google/Quad9/Ali) — detects DNS pollution, CDN distribution, and CNAME chains.
Example: api.openai.com →/tools/api/status/allReturns aggregated status from Claude/OpenAI/Gemini/Anthropic Status and other official status pages (5min cache).
Live call →/tools/api/claude/endpointsProbes api.anthropic.com multi-region reachability, comparing direct vs CF edge responses.
Live call →/tools/api/webrtc/configReturns STUN/TURN server config for browser-side IP leak detection (public IP vs private IP).
Live call →/tools/api/feedbackSubmit bug reports or suggestions, body: {"type","message","context"}. Returns ticket_id.
/tools/api/ip/trace-targetsList available trace targets (cloudflare, google, microsoft, etc.) for traceroute path diagnostics.
Live call →/tools/api/ip/profile-traceRun traceroute to a target, returning per-hop RTT and ASN — for locating international link bottlenecks.
Use in toolbox →/api/prices/snapshotReturns the latest full price crawl snapshot (OpenRouter / LiteLLM dual source) with fetched_at timestamp.
View pricing page →/sitemap-prices.xmlL3 price detail page sitemap (~300 URLs, weekly lastmod). Used with /sitemap_index.xml main index.
/tools/api/ip/dual-stackParallel query of visitor IPv4 + IPv6 public IPs. Returns {ipv4, ipv6, ipv4_ok, ipv6_ok, primary}.
/tools/api/health/connectivity/{brand}DNS+TCP+TLS+latency probes for claude/openai/gemini/anthropic/chatgpt — no API key needed. Returns {ok, host, dns_resolved, tcp_open, tls_ok, latency_ms}.
import requests # Run Claude protocol detection r = requests.post( "https://tokenscanai.com/api/detect/claude", json={ "base_url": "https://api.example.com", "api_key": "sk-xxx" }, timeout=30, ) job_id = r.json()["job_id"] # Query results result = requests.get( f"https://tokenscanai.com/api/result/{job_id}", timeout=15, ) print(result.json())