{
  "openapi": "3.1.0",
  "info": {
    "title": "AntidetectLab Diagnostic, Benchmark & MCP API",
    "version": "2026.12",
    "description": "Browser, mobile and network session diagnostics. Measurements depend on browser and deployment capabilities.",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "servers": [
    {
      "url": "https://antidetectlab.com",
      "description": "AntidetectLab Canonical Endpoint"
    }
  ],
  "externalDocs": {
    "description": "Machine-readable AI documentation (llms.txt) and Agent SKILL.md",
    "url": "https://antidetectlab.com/llms.txt"
  },
  "paths": {
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApiSpec",
        "summary": "OpenAPI 3.1 Specification Document",
        "description": "Returns this OpenAPI 3.1 JSON schema describing AntidetectLab diagnostic, benchmark, discovery, and MCP endpoints.",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 JSON specification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "getHealthStatus",
        "summary": "Service Health & Readiness Check",
        "description": "Returns lightweight JSON service liveness, storage readiness, and active listener status without external GeoIP or rDNS lookups.",
        "responses": {
          "200": {
            "description": "Service is healthy and ready",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Service degraded or storage unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "operationId": "getHealthzAlias",
        "summary": "Service Health & Readiness Alias (/healthz)",
        "description": "Lightweight alias of /v1/health returning JSON liveness, storage readiness, and active listener status.",
        "responses": {
          "200": {
            "description": "Service is healthy and ready",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Service degraded or storage unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/echo": {
      "get": {
        "operationId": "getWireEcho",
        "summary": "CLI & Agent Wire/IP Echo",
        "description": "Returns observed client IP, rDNS PTR hostname, ASN/GeoIP intel, JA4/JA4T/ECH/HTTP2 wire observations, and HTTP header fingerprint. Served with Cross-Origin-Resource-Policy: same-origin and without cross-origin CORS headers.",
        "responses": {
          "200": {
            "description": "Wire and IP echo payload (same-origin CORP protected)",
            "headers": {
              "Cross-Origin-Resource-Policy": {
                "description": "Enforces same-origin protection for caller wire and IP telemetry.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "same-origin"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "ip": {
                      "type": "string"
                    },
                    "ipIntel": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "contagion": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "wire": {
                      "type": "object",
                      "properties": {
                        "userAgent": {
                          "type": "string"
                        },
                        "acceptLanguage": {
                          "type": "string"
                        },
                        "ja4": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ja4t": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ja3Hash": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "ja4h": {
                          "type": "string"
                        },
                        "ja4hSource": {
                          "type": "string"
                        },
                        "httpProtocol": {
                          "type": "string"
                        },
                        "httpProtocolSource": {
                          "type": "string"
                        },
                        "originHttpProtocol": {
                          "type": "string"
                        },
                        "tlsVersion": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "cipherSuite": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "akamaiH2": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "observedTtl": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "observedMss": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "tcpRttMs": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "tcpRttSource": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "hasEch": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "hasAlps": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "hasPostQuantumMlkem": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "webBotAuth": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": true
                        },
                        "proxyLeakHeaders": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/v1/ip-check": {
      "get": {
        "operationId": "checkIpAndSubnet",
        "summary": "Check IP Reputation, rDNS PTR & /24 Subnet Contagion",
        "description": "Queries IP reputation, rDNS PTR, and /24 subnet contagion. When called without the ?ip query parameter (defaulting to the caller IP), the response enforces Cross-Origin-Resource-Policy: same-origin.",
        "parameters": [
          {
            "name": "ip",
            "in": "query",
            "required": false,
            "description": "Target IPv4 or IPv6 address (defaults to caller IP, which is protected by Cross-Origin-Resource-Policy: same-origin).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "IP intelligence and /24 subnet contagion report (Cross-Origin-Resource-Policy: same-origin when ?ip is omitted)",
            "headers": {
              "Cross-Origin-Resource-Policy": {
                "description": "Set to same-origin when querying caller IP without explicit ?ip; cross-origin when ?ip is specified.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "same-origin",
                    "cross-origin"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "ipIntel": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "contagion": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid IP address"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/v1/report/{reportId}": {
      "get": {
        "operationId": "getRedactedReport",
        "summary": "Fetch & Verify Redacted Signed Report",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "description": "Signed AntidetectLab report ID.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Redacted evaluation payload (callers must verify hmacVerified === true before trusting signature)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reportId": {
                      "type": "string"
                    },
                    "hmacVerified": {
                      "type": "boolean"
                    },
                    "score": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "verdict": {
                      "type": "string"
                    },
                    "grade": {
                      "type": "string"
                    },
                    "maskedIp": {
                      "type": "string"
                    },
                    "payload": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "Report not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/benchmarks/data/antidetect-browsers-2026.json": {
      "get": {
        "operationId": "get2026BenchmarksJson",
        "summary": "2026 Antidetect Browser & Cloud Phone Benchmark JSON",
        "responses": {
          "200": {
            "description": "Benchmark publication status and available comparative run records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/benchmarks/data/antidetect-browsers-2026.csv": {
      "get": {
        "operationId": "get2026BrowsersCsv",
        "summary": "2026 Antidetect Browser Benchmark CSV",
        "responses": {
          "200": {
            "description": "CSV schema and any published browser benchmark rows",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/benchmarks/data/cloud-phones-2026.csv": {
      "get": {
        "operationId": "get2026CloudPhonesCsv",
        "summary": "2026 Cloud Phone Benchmark CSV",
        "responses": {
          "200": {
            "description": "CSV schema and any published cloud phone benchmark rows",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "Concise AI & Agent Discovery Index (llms.txt)",
        "responses": {
          "200": {
            "description": "Markdown summary of diagnostic tools, HTTP/MCP discovery endpoints, and articles",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "operationId": "getLlmsFullTxt",
        "summary": "Full AI Corpus, Diagnostic Capability Matrix & FAQ (llms-full.txt)",
        "responses": {
          "200": {
            "description": "Complete Markdown corpus including the 7-checker capability matrix and FAQ",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp/server-card.json": {
      "get": {
        "operationId": "getWellKnownMcpServerCard",
        "summary": "Well-Known MCP Server Discovery Card",
        "responses": {
          "200": {
            "description": "MCP server card metadata, capabilities, tools, resources, and prompts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent-skills/antidetectlab/SKILL.md": {
      "get": {
        "operationId": "getWellKnownAgentSkillMd",
        "summary": "Agent SKILL.md Instruction Manifest",
        "responses": {
          "200": {
            "description": "Markdown agent skill guide for HTTP and MCP tools",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "operationId": "getWellKnownApiCatalog",
        "summary": "RFC 9727 API Catalog Linkset",
        "description": "Returns the RFC 9727 application/linkset+json discovery catalog for AntidetectLab HTTP and MCP endpoints.",
        "responses": {
          "200": {
            "description": "RFC 9727 linkset+json catalog",
            "content": {
              "application/linkset+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/og/report/{reportId}.png": {
      "get": {
        "operationId": "getReportOgPng",
        "summary": "Shareable Signed Report OpenGraph Card (PNG)",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "description": "Signed AntidetectLab report ID.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "1200x630 PNG OpenGraph summary card",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Report not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/og/report/{reportId}.svg": {
      "get": {
        "operationId": "getReportOgSvg",
        "summary": "Shareable Signed Report OpenGraph Card (SVG)",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "description": "Signed AntidetectLab report ID.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "1200x630 SVG OpenGraph summary card",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Report not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/badge/{reportId}.svg": {
      "get": {
        "operationId": "getReportStatusBadgeSvg",
        "summary": "Compact Report Trust Score Badge (SVG)",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "description": "Signed AntidetectLab report ID.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compact SVG trust score badge",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Report not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "operationId": "getMcpServerMetadata",
        "summary": "Get MCP Server Discovery Card",
        "description": "Returns the AntidetectLab MCP server card metadata and supported tool schemas.",
        "responses": {
          "200": {
            "description": "MCP server metadata JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Browser origin is outside the configured allowed origins"
          },
          "405": {
            "description": "SSE streaming (text/event-stream) is not supported on this stateless endpoint"
          }
        }
      },
      "post": {
        "operationId": "postMcpJsonRpc",
        "summary": "Model Context Protocol (MCP) JSON-RPC 2.0 Endpoint",
        "description": "Stateless HTTP JSON-RPC 2.0 MCP server supporting initialize, ping, tools/list, tools/call (check_ip_and_subnet, verify_signed_report, get_2026_benchmarks, inspect_ja4_and_wire, get_signal_remediation, evaluate_waf_readiness), resources/list (6 adl://docs & benchmark resources), resources/templates/list, resources/read, prompts/list, and prompts/get.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "jsonrpc",
                      "method"
                    ],
                    "properties": {
                      "jsonrpc": {
                        "const": "2.0"
                      },
                      "method": {
                        "type": "string"
                      },
                      "id": {
                        "type": [
                          "string",
                          "integer"
                        ]
                      },
                      "params": {
                        "type": "object"
                      }
                    }
                  },
                  {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 32,
                    "items": {
                      "type": "object",
                      "required": [
                        "jsonrpc",
                        "method"
                      ],
                      "properties": {
                        "jsonrpc": {
                          "const": "2.0"
                        },
                        "method": {
                          "type": "string"
                        },
                        "id": {
                          "type": [
                            "string",
                            "integer"
                          ]
                        },
                        "params": {
                          "type": "object"
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 MCP response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Notifications accepted"
          },
          "403": {
            "description": "Browser origin is outside the configured allowed origins"
          },
          "413": {
            "description": "Payload too large"
          },
          "415": {
            "description": "Unsupported content encoding"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    }
  }
}