{
  "service": "textstats.tools.town",
  "version": "1.0.0",
  "description": "Word, character, line, and byte counts for editors, SEO, localization, and server-side content pipelines — no persistence.",
  "limits": {
    "max_text_plain": 8000,
    "max_text_b64_decoded": 120000
  },
  "endpoints": {
    "docs_html": "GET /",
    "stats": "GET /v1/stats?text= or ?text_b64=",
    "validate": "GET /v1/validate?text=",
    "embed_widget": "GET /embed/",
    "health": "GET /health",
    "discovery": "GET /meta"
  },
  "query_params": {
    "text": "UTF-8 string, max 8000 chars (mutually exclusive with text_b64).",
    "text_b64": "Base64 (standard) UTF-8 payload, max 120000 chars after decode."
  },
  "examples": {
    "plain": "https://textstats.tools.town/v1/stats?text=Hello%20world",
    "b64_note": "Use text_b64 for longer markdown/HTML from CI without giant query strings."
  }
}