1import{a as j,j as e}from"./react-core-B_NPnx9L.js";import{u as T}from"./react-query-DhhpI0VK.js";import{u as E,S as R,H as M,f as r,B as i,T as D,m as F,n as h,o as g,C as l,e as n,b as c,d,q as o}from"./index-DaGE8UZR.js";import{I as q}from"./input-ot47S0Fe.js";import{c as N,ay as u,c7 as O,ag as v,a1 as w,ar as _,ce as C,$ as P,bH as z,an as L,O as U,Q as H}from"./ui-lib-d6ZI__ZU.js";import"./vendor-DZoFMmQa.js";import"./sentry-CQCgREoE.js";import"./i18n-Z_19K4At.js";const x={curl:`# REST API â detect text directly 2curl -X POST "https://aiidentifiers.com/api/extension/detect-text" \\ 3 -H "Authorization: Bearer aid_..." \\ 4 -H "Content-Type: application/json" \\ 5 -d '{"text": "Quantum entanglement enables non-local correlations..."}' 6 7# REST API â detect image from URL 8curl -X POST "https://aiidentifiers.com/api/detect" \\ 9 -H "Authorization: Bearer aid_..." \\ 10 -H "Content-Type: application/json" \\ 11 -d '{"url": "https://example.com/photo.jpg"}' 12 13# REST API â upload a file 14curl -X POST "https://aiidentifiers.com/api/detect" \\ 15 -H "Authorization: Bearer aid_..." \\ 16 -F "file=@./image.jpg"`,python:`from aiidentifiers import Client 17 18client = Client(api_key="aid_...") 19 20# Text detection 21result = client.detect_text( 22 "Quantum entanglement enables non-local correlations " 23 "predicted by quantum mechanics, transforming cryptography." 24) 25print(result.verdict, result.confidence) # ai_generated 87 26 27# Image detection from URL 28result = client.detect_url("https://example.com/photo.jpg") 29print(result.verdict, result.scan_id) 30 31# Full forensics 32result = client.inspect_media_provenance( 33 media_url="https://example.com/photo.jpg", 34 scan_depth="deep_forensics" 35) 36print(result.deep_forensics["gan_fingerprint_detected"])`,typescript:`import { AIIdentifiersClient } from '@aiidentifiers/sdk'; 37 38const client = new AIIdentifiersClient({ apiKey: 'aid_...' }); 39 40// Text detection 41const text = await client.detectText( 42 'Quantum entanglement enables non-local correlations...' 43); 44console.log(text.verdict, text.confidence); // ai_generated 87 45 46// Image from URL 47const img = await client.detectUrl('https://example.com/photo.jpg'); 48console.log(img.verdict, img.scanId); 49 50// Retrieve a past scan 51const report = await client.getScanReport(img.scanId); 52console.log(report.reportStatus); // completed`,mcp_fastmcp:`from mcp.server.fastmcp import FastMCP 53import httpx, json 54 55MCP_ENDPOINT = "https://aiidentifiers.com/api/mcp" 56API_KEY = "aid_..." # get yours at aiidentifiers.com/get-api-key 57 58mcp = FastMCP("AI Identifiers Server") 59 60def _call(tool: str, args: dict) -> dict: 61 r = httpx.post(MCP_ENDPOINT, headers={ 62 "Authorization": f"Bearer {API_KEY}", 63 "Content-Type": "application/json", 64 }, json={"jsonrpc": "2.0", "id": 1, "method": "tools/call", 65 "params": {"name": tool, "arguments": args}}) 66 return json.loads(r.json()["result"]["content"][0]["text"]) 67 68@mcp.tool() 69async def analyze_text_authenticity(text_content: str) -> str: 70 """Scans text for AI generation markers, perplexity anomalies, 71 and synthetic writing patterns.""" 72 res = _call("analyze_text_authenticity", {"text_content": text_content}) 73 return f"verdict={res['verdict']} confidence={res['confidence']}% scan_id={res['scan_id']}" 74 75@mcp.tool() 76async def inspect_media_provenance( 77 media_url: str, scan_depth: str = "standard" 78) -> str: 79 """Extracts EXIF metadata, deepfake artifacts, and digital 80 watermark provenance from an image URL or base64 payload.""" 81 res = _call("inspect_media_provenance", 82 {"media_url": media_url, "scan_depth": scan_depth}) 83 return f"verdict={res['verdict']} providers={len(res['provenance_chain'])} scan_id={res['scan_id']}" 84 85@mcp.tool() 86async def get_scan_report(scan_id: str) -> str: 87 """Retrieves a historical forensic report using a unique Scan ID.""" 88 res = _call("get_scan_report", {"scan_id": scan_id}) 89 return f"status={res['report_status']} verdict={res.get('verdict')} file_type={res.get('file_type')}" 90 91if __name__ == "__main__": 92 mcp.run()`,claude_desktop:`// Add to ~/Library/Application Support/Claude/claude_desktop_config.json 93{ 94 "mcpServers": { 95 "ai-identifiers": { 96 "command": "npx", 97 "args": ["-y", "@aiidentifiers/mcp-server"], 98 "env": { 99 "AI_IDENTIFIERS_API_KEY": "aid_..." 100 } 101 } 102 } 103}`,nodejs:`import { AIIdentifiersClient } from '@aiidentifiers/sdk'; 104 105const client = new AIIdentifiersClient({ 106 apiKey: process.env.AI_IDENTIFIERS_API_KEY, 107}); 108 109// Scan a file from disk 110import { readFileSync } from 'fs'; 111const buffer = readFileSync('./image.jpg'); 112const b64 = buffer.toString('base64'); 113 114const result = await client.detectFile(b64, 'image/jpeg', 'image.jpg'); 115console.log(result.verdict, result.confidence, result.scanId); 116 117// Retrieve the full forensic report 118const report = await client.getScanReport(result.scanId); 119console.log(JSON.stringify(report, null, 2));`},K=[{group:"Text Detection",icon:e.jsx(U,{className:"h-4 w-4"}),color:"yellow",tools:[{name:"detect_text",badge:"1 credit",badgeColor:"bg-green-500/20 text-green-400",description:"Detects AI-generated text. Returns verdict, confidence, and a per-model provenance chain.",params:[{name:"text",type:"string",required:!0,note:"min 20 chars"}]},{name:"analyze_text_authenticity",badge:"1 credit · Enterprise",badgeColor:"bg-purple-500/20 text-purple-400",description:"Extended text forensics â perplexity estimate, burstiness score, anomaly flags, plus the full detection result.",params:[{name:"text_content",type:"string",required:!0,note:"raw text str
119ing"}]}]},{group:"Image & Media",icon:e.jsx(H,{className:"h-4 w-4"}),color:"blue",tools:[{name:"detect_url",badge:"1â3 credits",badgeColor:"bg-blue-500/20 text-blue-400",description:"Fetches a URL and routes to text or image detection automatically based on Content-Type.",params:[{name:"url",type:"string",required:!0,note:"https:// only"}]},{name:"detect_file",badge:"3 credits",badgeColor:"bg-blue-500/20 text-blue-400",description:"Analyzes a base64-encoded file. Supports JPEG, PNG, WebP, GIF, PDF.",params:[{name:"content",type:"string",required:!0,note:"base64"},{name:"mimeType",type:"string",required:!0,note:"e.g. image/jpeg"},{name:"filename",type:"string",required:!1,note:"for history display"}]},{name:"inspect_media_provenance",badge:"3 credits · Enterprise",badgeColor:"bg-purple-500/20 text-purple-400",description:"Deep image forensics â EXIF anomalies, model signals, supported C2PA manifest review, and pixel artifacts.",params:[{name:"media_url",type:"string",required:!0,note:"https:// or data: URI"},{name:"scan_depth",type:'"standard" | "deep_forensics"',required:!1,note:"default: standard"}]}]},{group:"History & Reports",icon:e.jsx(P,{className:"h-4 w-4"}),color:"green",tools:[{name:"get_recent_analyses",badge:"Free",badgeColor:"bg-slate-500/20 text-slate-400",description:"Lists the authenticated user's most recent scans including MCP-sourced and web-app uploads.",params:[{name:"limit",type:"integer",required:!1,note:"1â50, default 10"}]},{name:"get_scan_report",badge:"Free · Enterprise",badgeColor:"bg-purple-500/20 text-purple-400",description:"Retrieves a forensic report by scan_id. Works for both sync (text/image) and async (audio/video) scans.",params:[{name:"scan_id",type:"string",required:!0,note:"returned by any detection tool"}]},{name:"get_job_status",badge:"Free",badgeColor:"bg-slate-500/20 text-slate-400",description:"Polls an async detection job (audio/video). Returns status and full result when complete.",params:[{name:"jobId",type:"string",required:!0,note:"from async detect_file / detect_url"}]}]}],G=[{title:"Multi-Format Detection",description:"Analyze images, video, audio, and text for AI-generated content",icon:e.jsx(w,{className:"h-5 w-5"})},{title:"Probabilistic Processing",description:"Processing time varies by content and service conditions",icon:e.jsx(_,{className:"h-5 w-5"})},{title:"Forensic Evidence",description:"Detailed provenance chains with per-model verdicts and scan_ids",icon:e.jsx(C,{className:"h-5 w-5"})}],B={verdict:"ai_generated",confidence:87,isAIGenerated:!0,scan_id:"3fa85f64-5717-4562-b3fc-2c963f66afa6",modality:"text",creditsUsed:1,provenance:[{model:"GPT-5 Text Analysis",provider:"openai",verdict:"ai_generated",confidence:92,weight:6},{model:"Gemini 2.0 Flash",provider:"google",verdict:"ai_generated",confidence:81,weight:4}
119],processingTimeMs:412,quota:{plan:"free",used:1,limit:50,remaining:49}};function ee(){const[b,I]=j.useState("curl"),[y,A]=j.useState(""),{toast:S}=E(),[,f]=T(),p=t=>{navigator.clipboard.writeText(t),S({title:"Copied to clipboard",description:"Code example copied successfully"})},k={curl:"cURL",python:"Python SDK",typescript:"TypeScript SDK",mcp_fastmcp:"FastMCP (Python)",claude_desktop:"Claude Desktop",nodejs:"Node.js"};return e.jsxs(e.Fragment,{children:[e.jsx(R,{canonicalUrl:"https://aiidentifiers.com/developers",title:"AI Identifiers Developer API â Detect AI-Generated Content",description:"Integrate probabilistic AI-content analysis with the REST API, MCP server, and Python and TypeScript SDKs. Review results with human oversight for consequential decisions.",keywords:["AI detection API","deepfake detection API","MCP server AI detection","AI content detection SDK","REST API AI detector","Model Context Protocol"],structuredData:{"@context":"https://schema.org","@type":"WebAPI",name:"AI Identifiers Detection API",description:"Probabilistic analysis for images, video, audio, and text. MCP is in controlled early access and is not publicly available; A2A is planned for controlled early access and is not publicly available.",documentation:"https://aiidentifiers.com/developers",termsOfService:"https://aiidentifiers.com/terms-of-service",provider:{"@type":"Organization",name:"AI Identifiers",url:"https://aiidentifiers.com"}}}),e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 text-white",children:[e.jsx(M,{}),e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-4xl font-bold mb-4 bg-gradient-to-r from-yellow-400 to-orange-500 bg-clip-text text-transparent",children:"API & MCP Developer Tools"}),e.jsx("p",{className:"text-xl text-gray-300 max-w-3xl mx-auto",children:"Integrate probabilistic AI-content analysis into applications and agent workflows with web-based analysis. MCP is in controlled early access and is not publicly available; A2A is planned for controlled early access and is not publicly available."}),e.jsxs("div",{className:"flex justify-center flex-wrap gap-3 mt-6",children:[e.jsx(r,{className:"bg-yellow-500/20 text-yellow-400",children:"Public API reference unavailable"}),e.jsx(r,{className:"bg-purple-500/20 text-purple-400",children:"MCP controlled early access"}),e.jsx(r,{className:"bg-green-500/20 text-green-400",children:"A2A planned early access"}),e.jsx(r,{className:"bg-blue-500/20 text-blue-400",children:"Public endpoints unavailable"}),e.jsx(i,{variant:"outline",onClick:()=>f("/docs"),className:"border-yellow-500/50 text-yellow-400",children:"Open documentation"})]})]}),e.jsxs(D,{defaultValue:"mcp",className:"space-y-8",children:[e.jsxs(F,{className:"grid w-full grid-cols-3 sm:grid-cols-6 bg-slate-800/50",children:[e.jsx(h,{value:"mcp",children:"MCP Tools"}),e.jsx(h,{value:"overview",children:"Overview"}),e.jsx(h,{value:"quickstart",children:"Quick Start"}),e.jsx(h,{value:"examples",children:"Code Examples"}),e.jsx(h,{value:"reference",children:"API Reference"}),e.jsx(h,{value:"sdks",children:"SDKs"})]}),e.jsxs(g,{value:"mcp",className:"space-y-6",children:[e.jsx(l,{className:"bg-slate-800/50 border-slate-700",children:e.jsx(n,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"MCP Availability"}),e.jsx("code",{className:"block break-words text-yellow-400 text-lg font-mono",children:"Controlled early access â not publicly available"}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Approved participants receive current access details directly from AI Identifiers."})]}),e.jsxs("div",{className:"flex w-full flex-col gap-3 sm:w-auto sm:flex-row sm:flex-shrink-0",children:[e.jsx(i,{variant:"outline",asChild:!0,className:"w-full border-yellow-500/50 text-yellow-400 hover:bg-yellow-500/10 sm:w-auto","data-testid":"button-download-mcp-schema",children:e.jsxs("a",{href:"/contact",children:[e.jsx(N,{className:"h-4 w-4 mr-2"}),"Request access"]})}),e.jsx(i,{className:"w-full bg-yellow-500 hover:bg-yellow-600 text-black sm:w-auto",onClick:()=>f("/get-api-key"),children:"Contact us"})]})]})})}),K.map(t=>e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsx(c,{className:"pb-3",children:e.jsxs(d,{className:"flex items-center gap-2 text-base",children:[e.jsx("span",{className:"p-1.5 bg-slate-700 rounded",children:t.icon}),t.group,e.jsxs(r,{variant:"secondary",className:"ml-auto",children:[t.tools.length," tool",t.tools.length>
1191?"s":""]})]})}),e.jsx(n,{className:"space-y-4",children:t.tools.map(s=>e.jsxs("div",{className:"border border-slate-700 rounded-lg p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.jsx("code",{className:"min-w-0 break-all text-yellow-400 font-mono text-sm font-semibold",children:s.name}),e.jsx(r,{className:s.badgeColor,children:s.badge})]}),e.jsxs(i,{size:"sm",variant:"ghost",className:"text-gray-400 hover:text-white h-7 px-2",onClick:()=>p(s.name),children:[e.jsx(u,{className:"h-3 w-3 mr-1"}),"Copy name"]})]}),e.jsx("p",{className:"text-sm text-gray-300",children:s.description}),e.jsxs("div",{className:"bg-slate-900/60 rounded-md p-3",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-2 uppercase tracking-wide",children:"Parameters"}),e.jsx("div",{className:"space-y-1",children:s.params.map(a=>e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2 text-xs font-mono",children:[e.jsx("code",{className:"text-blue-300",children:a.name}),e.jsx("span",{className:"text-gray-500",children:a.type}),a.required?e.jsx(r,{className:"bg-red-500/15 text-red-400 text-[10px] px-1 py-0",children:"required"}):e.jsx(r,{className:"bg-slate-600/40 text-slate-400 text-[10px] px-1 py-0",children:"optional"}),e.jsxs("span",{className:"min-w-0 break-words text-gray-600",children:["â ",a.note]})]},a.name))})]})]},s.name))})]},t.group)),e.jsxs("div",{className:"grid min-w-0 md:grid-cols-2 gap-6",children:[e.jsxs(l,{className:"min-w-0 overflow-hidden bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsxs(d,{className:"text-sm text-purple-400 flex items-center gap-2",children:[e.jsx(O,{className:"h-4 w-4"})," FastMCP Python Server"]}),e.jsx(o,{children:"Wrap AI Identifiers tools inside your own MCP server"})]}),e.jsx(n,{children:e.jsxs("div",{className:"relative",children:[e.jsx(i,{size:"sm",variant:"ghost",className:"absolute top-2 right-2 text-gray-400",onClick:()=>p(x.mcp_fastmcp),children:e.jsx(u,{className:"h-3.5 w-3.5"})}),e.jsx("pre",{className:"bg-slate-900/60 p-4 rounded-lg text-xs text-gray-300 overflow-x-auto max-h-64",children:e.jsx("code",{children:x.mcp_fastmcp})})]})})]}),e.jsxs(l,{className:"min-w-0 overflow-hidden bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsxs(d,{className:"text-sm text-blue-400 flex items-center gap-2",children:[e.jsx(v,{className:"h-4 w-4"})," Claude Desktop Config"]}),e.jsx(o,{children:"Add to claude_desktop_config.json for instant MCP access"})]}),e.jsxs(n,{children:[e.jsxs("div",{className:"relative",children:[e.jsx(i,{size:"sm",variant:"ghost",className:"absolute top-2 right-2 text-gray-400",onClick:()=>p(x.claude_desktop),children:e.jsx(u,{className:"h-3.5 w-3.5"})}),e.jsx("pre",{className:"bg-slate-900/60 p-4 rounded-lg text-xs text-gray-300 overflow-x-auto max-h-64",children:e.jsx("code",{children:x.claude_desktop})})]}),e.jsxs("div",{className:"mt-4 p-3 bg-slate-900/40 rounded-lg text-xs text-gray-400 space-y-1",children:[e.jsx("p",{className:"font-semibold text-gray-300",children:"Compatible with:"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:["Claude Desktop","Cursor","Continue","Cline","Zed","Custom agent hosts"].map(t=>e.jsx(r,{variant:"secondary",className:"text-[10px]",children:t},t))})]})]})]})]})]}),e.jsxs(g,{value:"overview",className:"space-y-8",children:[e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsx(d,{className:"text-yellow-400",children:"Platform Capabilities"}),e.jsx(o,{children:"Discover what makes our API the industry leader in AI content detection"})]}),e.jsx(n,{children:e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:G.map((t,s)=>e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx("div",{className:"p-2 bg-yellow-500/20 rounded-lg text-yellow-400",children:t.icon}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-1",children:t.title}),e.jsx("p",{className:"text-sm text-gray-400",children:t.description})]})]},s))})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsx(c,{children:e.jsx(d,{className:"text-purple-400",children:"Detection Pipeline"})}),e.jsx(n,{className:"space-y-4",children:[["GPT-5 Text Analysis","Weight 6","bg-orange-500/20 text-orange-400"],["Gemini 2.0 Flash Vision","Weight 4","bg-blue-500/20 text-blue-400"],["Google SynthID","Weight 3","bg-green-500/20 text-green-400"],["AI Ensemble (Claude + o3)","Weight 2","bg-purple-500/20 text-purple-400"],["Heuristic models Ã5","Weight 1 each","bg-slate-500/20 text-slate-400"]].map(([t,s,a])=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm",children:t}),e.jsx(r,{className:a,children:s})]},t))})]}),e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsx(c,{children:e.jsx(d,{className:"text-green-400",children:"Enterprise Features"})}),e.jsx(n,{className:"space-y-4",children:[[w,"text-green-400","Evidence-oriented reports and supported C2PA manifest review"],[_,"text-yellow-400","Auto-scaling â handles burst traffic"],[C,"text-purple-400","Full audit trail with scan_id persistence"],[v,"text-blue-400","MCP + REST + webhook integrations"],[P,"text-gray-400","Team dashboards and quota pooling (Pro+)"]].map(([t,s,a],m)=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(t,{className:`h-4 w-4 ${s}`}),e.jsx("span",{className:"text-sm",children:a})]},m))})]})]})]}),e.jsx(g,{value:"quickstart",className:"space-y-8",children:e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsx(d,{className:"text-yellow-400",children:"Getting Started in 2 Minutes"}),e.jsx(o,{children:"3 steps to your first AI detection result"})]}),e.jsxs(n,{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-yellow-500 text-black font-bold text-sm flex-shrink-0",children:"1"}),e.jsx("h3",{className:"text-lg font-semibold text-white",children:"Get Your API Key"})]}),e.jsxs("div",{className:"ml-11 flex space-x-2",children:[e.jsx(q,{placeholder:"Paste your key here: aid_...",value:y,onChange:t=>A(t.target.value),className:"bg-slate-700 border-slate-600","data-testid":"input-api-key"}),e.jsx(i,{variant:"outline",onClick:()=>f("/get-api-key"),"data-testid":"button-get-api-key",className:"border-yellow-500/50 text-yellow-400 hover:bg-yellow-500/10 whitespace-nowrap",children:"Get Free Key â"})]}),e.jsx("p",{className:"ml-11 text-xs text-gray-500",children:"Free tier: 50 credits/month. No credit card required."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-yellow-500 text-black font-bold text-sm flex-shrink-0",children:"2"}),e.jsx("h3",{className:"text-lg font-semibold text-white",children:"Make Your First Call"})]}),e.jsxs("div",{className:"ml-11 relative",children:[e.jsx(i,{size:"sm",variant:"ghost",className:"absolute top-2 right-2 text-gray-400 z-10",onClick:()=>p(`curl -X POST "https://aiidentifiers.com/api/extension/detect-text" \\ 120 -H "Authorization: Bearer ${y||"aid_..."}" \\ 121 -H "Content-Type: application/json" \\ 122 -d '{"text": "Quantum entanglement enables non-local correlations predicted by quantum mechanics."}'`),children:e.jsx(u,{className:"h-4 w-4"})}),e.jsx("pre",{className:"bg-slate-900/50 p-4 rounded-lg text-sm text-gray-300 overflow-x-auto",children:e.jsx("code",{children:`curl -X POST "https://aiidentifiers.com/api/extension/detect-text" \\ 123 -H "Authorization: Bearer ${y||"aid_..."}" \\ 124 -H "Content-Type: application/json" \\ 125 -d '{"text": "Quantum entanglement enables non-local correlations predicted by quantum mechanics."}'`})})]}),e.jsxs("div",{className:"ml-11 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg text-xs text-blue-300",children:[e.jsx("strong",{children:"Also works with files:"})," ",e.jsxs("code",{className:"text-blue-200",children:['curl -X POST .../api/detect -H "Authorization: Bearer ',y||"aid_...",'" -F "[email protected]"']})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-yellow-500 text-black font-bold text-sm flex-shrink-0",children:"3"}),e.jsx("h3",{className:"text-lg font-semibold text-white",children:"Handle the Response"})]}),e.jsxs("div",{className:"ml-11 bg-slate-900/50 p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide mb-3",children:"Example JSON response"}),e.jsx("pre",{className:"text-xs text-gray-300 overflow-x-auto",children:JSON.stringify(B,null,2)})]}),e.jsx("div",{className:"ml-11 grid grid-cols-1 sm:grid-cols-2 gap-3",children:[{field:"verdict",type:"string",desc:'"ai_generated" | "human" | "inconclusive"'},{field:"confidence",type:"number",desc:"0â100 confidence score"},{field:"isAIGenerated",type:"boolean",desc:"true when confidence ⥠70"},{field:"scan_id",type:"string",desc:"UUID for retrieving the full report later"},{field:"processingTimeMs",type:"number",desc:"Server-side processing time in ms"},{field:"creditsUsed",type:"number",desc:"Credits deducted from your quota"},{field:"provenance",type:"array",desc:"Per-model breakdown with weight & confidence"},{field:"quota",type:"object",desc:"Current plan usage: used, limit, remaining"}].map(({field:t,type:s,desc:a})=>e.jsxs("div",{className:"bg-slate-800 rounded-md p-3 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("code",{className:"text-yellow-400 font-semibold",children:t}),e.jsx("span",{className:"text-blue-400 text-[10px]",children:s})]}),e.jsx("p",{className:"text-gray-400",children:a})]},t))})]}),e.jsxs("div",{className:"ml-11 p-4 bg-gradient-to-r from-purple-500/20 to-yellow-500/20 border border-purple-500/40 rounded-lg flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"font-semibold text-white flex items-center gap-2",children:[e.jsx(z,{className:"h-4 w-4 text-yellow-400"}),"Try it live in the Playground"]}
125),e.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Test the API interactively â paste any text or URL, see a real detection result."})]}),e.jsx(i,{className:"bg-yellow-500 hover:bg-yellow-600 text-black font-semibold whitespace-nowrap",onClick:()=>f("/analyze"),children:"Open Playground â"})]})]})]})}),e.jsx(g,{value:"examples",className:"space-y-8",children:e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsx(d,{className:"text-yellow-400",children:"Integration Examples"}),e.jsx(o,{children:"Choose your language or integration type"})]}),e.jsxs(n,{children:[e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:Object.keys(x).map(t=>e.jsx(i,{variant:b===t?"default":"outline",size:"sm",onClick:()=>I(t),className:b===t?"bg-yellow-500 hover:bg-yellow-600 text-black":"","data-testid":`button-lang-${t}`,children:k[t]??t},t))}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute top-2 right-2 flex gap-2 z-10",children:e.jsx(i,{size:"sm",variant:"outline",onClick:()=>p(x[b]),"data-testid":"button-copy-code",children:e.jsx(u,{className:"h-4 w-4"})})}),e.jsx("pre",{className:"bg-slate-900/50 p-6 rounded-lg overflow-x-auto text-sm max-h-[500px]",children:e.jsx("code",{className:"text-gray-300",children:x[b]})})]})]})]})}),e.jsxs(g,{value:"reference",className:"space-y-8",children:[e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsx(d,{className:"text-yellow-400",children:"REST & MCP Endpoints"}),e.jsxs(o,{children:["All detection endpoints accept Bearer auth via ",e.jsx("code",{className:"text-yellow-300",children:"Authorization: Bearer aid_..."})]})]}),e.jsxs(n,{className:"space-y-4",children:[[{method:"POST",color:"bg-green-500/20 text-green-400",path:"/api/extension/detect-text",desc:"Detect AI-generated text. Body: { text: string (â¥50 chars) }"},{method:"POST",color:"bg-green-500/20 text-green-400",path:"/api/detect",desc:"Multimodal detection â send multipart file upload OR JSON { url }. Auto-routes by Content-Type."},{method:"POST",color:"bg-green-500/20 text-green-400",path:"/api/mcp",desc:"MCP JSON-RPC 2.0 server â tools/list, tools/call, initialize. SSE stream at /api/mcp/sse."},{method:"GET",color:"bg-blue-500/20 text-blue-400",path:"/api/mcp/usage",desc:"Quota status â returns used, remaining, limit, plan, resetsAt."},{method:"GET",color:"bg-blue-500/20 text-blue-400",path:"/api/mcp/tools.json",desc:"Machine-readable JSON schema for all 8 MCP tools."}].map(({method:t,color:s,path:a,desc:m})=>e.jsxs("div",{className:"border border-slate-600 rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(r,{className:s,children:t}),e.jsx("code",{className:"text-yellow-400 text-sm",children:a})]}),e.jsx("p",{className:"text-gray-300 text-sm",children:m})]},a)),e.jsx("div",{className:"border border-slate-600 rounded-lg p-4",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"font-semibold text-white mb-2",children:"MCP request shape:"}),e.jsx("pre",{className:"text-xs text-gray-300 bg-slate-900/50 p-3 rounded",children:`{ 126 "jsonrpc": "2.0", 127 "id": 1, 128 "method": "tools/call", 129 "params": { 130 "name": "detect_text", 131 "arguments": { "text": "..." } 132 } 133}`})]}),e.jsxs("div",{children:[e.jsx("h5",{className:"font-semibold text-white mb-2",children:"Auth (either header works):"}),e.jsx("pre",{className:"text-xs text-gray-300 bg-slate-900/50 p-3 rounded",children:`Authorization: Bearer aid_... 134# or 135x-api-key: aid_...`}),e.jsx(i,{size:"sm",variant:"outline",className:"mt-3 border-yellow-500/40 text-yellow-400",asChild:!0,children:e.jsxs("a",{href:"/api/mcp/tools.json",download:"mcp_tools.json",children:[e.jsx(N,{className:"h-3.5 w-3.5 mr-1.5"}),"Download mcp_tools.json"]})})]})]})})]})]}),e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsx(d,{className:"text-yellow-400",children:"Rate Limits & Quotas"}),e.jsx(o,{children:"Credits reset on the 1st of each month. Purchased credit packs never expire."})]}),e.jsxs(n,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-slate-600",children:[e.jsx("th",{className:"text-left py-3 px-4 text-gray-400 font-medium",children:"Plan"}),e.jsx("th",{className:"text-left py-3 px-4 text-gray-400 font-medium",children:"Monthly Credits"}),e.jsx("th",{className:"text-left py-3 px-4 text-gray-400 font-medium",children:"API Rate Limit"}),e.jsx("th",{className:"text-left py-3 px-4 text-gray-400 font-medium",children:"Overage"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-700",children:[{plan:"Consumer",credits:"See product",rate:"See product",overage:"Not applicable"},{plan:"MCP",credits:"Controlled early access",rate:"Not publicly available",overage:"Not publicly available"},{plan:"A2A",credits:"Planned controlled early access",rate:"Not publicly available",overage:"Not publicly available"}].map(({plan:t,credits:s,rate:a,overage:m})=>e.jsxs("tr",{children:[e.jsx("td",{className:"py-3 px-4",children:e.jsx(r,{className:t==="Free"?"bg-slate-500/20 text-slate-300":t==="Pro"?"bg-purple-500/20 text-purple-400":"bg-yellow-500/20 text-yellow-400",children:t})}),e.jsx("td",{className:"py-3 px-4 text-gray-300 font-mono",children:s}),e.jsx("td",{className:"py-3 px-4 text-gray-300 font-mono",children:a}),e.jsx("td",{className:"py-3 px-4 text-gray-400 text-xs",children:m})]},t))})]})}),e.jsxs("div",{className:"mt-4 p-3 bg-slate-900/50 rounded-lg text-xs text-gray-400 space-y-1",children:[e.jsxs("p",{children:["⢠",e.jsx("strong",{className:"text-gray-300",children:"1 text detection"})," = 1 credit  | ",e.jsx("strong",{className:"text-gray-300",children:"1 image/URL detection"})," = 1â3 credits  | ",e.jsx("strong",{className:"text-gray-300",children:"1 file (video/audio)"})," = 3â10 credits"]}),e.jsxs("p",{children:["⢠Rate-limit headers returned on every response: ",e.jsx("code",{className:"text-yellow-400",children:"X-RateLimit-Remaining"}),", ",e.jsx("code",{className:"text-yellow-400",children:"X-RateLimit-Reset"})]}),e.jsxs("p",{children:["⢠Check current usage anytime: ",e.jsx("code",{className:"text-yellow-400",children:"GET /api/mcp/usage"})]})]})]})]}),e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsxs(d,{className:"text-yellow-400 flex items-center gap-2",children:[e.jsx(L,{className:"h-5 w-5"})," Error Codes"]}),e.jsxs(o,{children:["All errors return JSON: ",e.jsx("code",{className:"text-gray-300",children:"{ error: string, message: string }"})]})]}),e.jsxs(n,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-slate-600",children:[e.jsx("th",{className:"text-left py-3 px-4 text-gray-400 font-medium",children:"HTTP Code"}),e.jsx("th",{className:"text-left py-3 px-4 text-gray-400 font-medium",children:"Name"}),e.jsx("th",{className:"text-left py-3 px-4 text-gray-400 font-medium",children:"Cause & Fix"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-700",children:[{code:"401",name:"Unauthorized",badge:"bg-red-500/20 text-red-400",desc:"Missing or invalid API key. Check your Authorization: Bearer aid_... header."},{code:"402",name:"Payment Required",badge:"bg-orange-500/20 text-orange-400",desc:"Monthly quota exhausted or plan upgrade required. Purchase credit packs at /pricing."},{code:"413",name:"File Too Large",badge:"bg-yellow-500/20 text-yellow-400",desc:"Uploaded file exceeds the 50 MB per-request limit. Compress the file or use a URL instead."},{code:"422",name:"Unprocessable Entity",badge:"bg-yellow-500/20 text-yellow-400",desc:"Missing required field (e.g. no text or file provided), or text is too short (< 50 chars)."},{code:"429",name:"Rate Limited",badge:"bg-purple-500/20 text-purple-400",desc:"Exceeded requests-per-minute cap. Check Retry-After header. Upgrade for higher limits."},{code:"500",name:"Internal Server Error",badge:"bg-red-500/20 text-red-400",desc:"Unexpected server error. Retry with exponential back-off. Status: aiidentifiers.com/status"}].map(({code:t,name:s,badge:a,desc:m})=>e.jsxs("tr",{children:[e.jsx("td",{className:"py-3 px-4",children:e.jsx(r,{className:a,children:t})}),e.jsx("td",{className:"py-3 px-4 text-gray-300 font-semibold",children:s}),e.jsx("td",{className:"py-3 px-4 text-gray-400 text-xs",children:m})]},t))})]})}),e.jsxs("div",{className:"mt-4 p-3 bg-slate-900/50 rounded-lg",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-2 uppercase tracking-wide",children:"Example 429 response body"}),e.jsx("pre",{className:"text-xs text-gray-300 overflow-x-auto",children:`{ 136 "error": "rate_limited", 137 "message": "Too many requests. Retry after 12 seconds.", 138 "retryAfterSeconds": 12 139}`})]})]})]})]}),e.jsx(g,{value:"sdks",className:"space-y-8",children:e.jsxs(l,{className:"bg-slate-800/50 border-slate-700",children:[e.jsxs(c,{children:[e.jsx(d,{className:"text-yellow-400",children:"Official SDKs & Integrations"}),e.jsx(o,{children:"Install the SDK for your stack and start detecting in minutes"})]}),e.jsx(n,{children:e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:[{name:"Python SDK",install:"pi
139p install aiidentifiers",badge:"PyPI",source:"https://github.com/aiidentifiers/aiidentifiers-python",docs:"https://aiidentifiers.com/developers#python"},{name:"TypeScript / Node",install:"npm install @aiidentifiers/sdk",badge:"npm",source:"https://github.com/aiidentifiers/aiidentifiers-node",docs:"https://aiidentifiers.com/developers#typescript"},{name:"FastMCP (Python)",install:"pip install mcp aiidentifiers",badge:"MCP",source:"https://github.com/aiidentifiers/aiidentifiers-mcp",docs:"https://aiidentifiers.com/developers#mcp"},{name:"LangChain",install:"pip install aiidentifiers",badge:"Python",source:"https://github.com/aiidentifiers/aiidentifiers-langchain",docs:"https://aiidentifiers.com/developers#langchain"},{name:"LlamaIndex",install:"pip install aiidentifiers",badge:"Python",source:"https://github.com/aiidentifiers/aiidentifiers-llamaindex",docs:"https://aiidentifiers.com/developers#llamaindex"},{name:"CrewAI",install:"pip install aiidentifiers",badge:"Python",source:"https://github.com/aiidentifiers/aiidentifiers-crewai",docs:"https://aiidentifiers.com/developers#crewai"}].map(t=>e.jsxs("div",{className:"border border-slate-600 rounded-lg p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"font-semibold text-white",children:t.name}),e.jsx(r,{variant:"secondary",className:"text-xs",children:t.badge})]}),e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"bg-slate-900/50 p-2 rounded text-xs text-green-400 overflow-x-auto pr-8",children:t.install}),e.jsx(i,{size:"sm",variant:"ghost",className:"absolute top-1 right-1 h-6 w-6 p-0 text-gray-500 hover:text-white",onClick:()=>p(t.install),children:e.jsx(u,{className:"h-3 w-3"})})]}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsx("a",{href:t.source,target:"_blank",rel:"noopener noreferrer",className:"text-slate-400 hover:text-white flex items-center gap-1 transition-colors",children:"⥠Source"}),e.jsx("a",{href:t.docs,target:"_blank",rel:"noopener noreferrer",className:"text-purple-400 hover:text-purple-300 flex items-center gap-1 transition-colors",children:"â Docs"})]})]},t.name))})})]})})]})]})]})]})}export{ee as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.