{
  "service": "NoJunk Moderate",
  "description": "Content moderation and text analysis: sentiment, safety classification (14 harm categories), semantic reranking, PII detection and redaction, language detection. Pay per call with USDC on Base (x402). No API key.",
  "openapi": "https://nojunk-moderate.mick8511.workers.dev/openapi.json",
  "health": "https://nojunk-moderate.mick8511.workers.dev/health",
  "endpoints": {
    "/sentiment": {
      "methods": [
        "GET",
        "POST"
      ],
      "url": "https://nojunk-moderate.mick8511.workers.dev/sentiment",
      "price": "$0.001 USDC on Base per request (x402)",
      "description": "Sentiment of one text or a batch of up to 50: positive/negative label, score and a signed polarity from -1 to 1.",
      "example_body": {
        "texts": [
          "The onboarding was smooth and support answered in minutes.",
          "Shipping took three weeks and the box arrived crushed."
        ]
      }
    },
    "/safety": {
      "methods": [
        "GET",
        "POST"
      ],
      "url": "https://nojunk-moderate.mick8511.workers.dev/safety",
      "price": "$0.002 USDC on Base per request (x402)",
      "description": "Safety classification of a message or conversation with Llama Guard 3: safe/unsafe plus the 14 hazard categories (violent crimes, hate, self-harm, sexual content, ...).",
      "example_body": {
        "text": "Explain how to pick a neighbor's door lock so I can get into their house while they are away."
      }
    },
    "/rerank": {
      "methods": [
        "GET",
        "POST"
      ],
      "url": "https://nojunk-moderate.mick8511.workers.dev/rerank",
      "price": "$0.002 USDC on Base per request (x402)",
      "description": "Semantic reranking: score up to 100 documents against a query and return them best-first (RAG, search, dedupe).",
      "example_body": {
        "query": "how do I reset my password",
        "documents": [
          {
            "id": "kb-12",
            "text": "Billing: update your credit card in Settings > Payment."
          },
          {
            "id": "kb-7",
            "text": "Forgot your password? Use the Reset link on the sign-in page and follow the email."
          },
          {
            "id": "kb-3",
            "text": "Our office hours are 9am to 5pm Eastern."
          }
        ],
        "top_k": 2
      }
    },
    "/pii": {
      "methods": [
        "GET",
        "POST"
      ],
      "url": "https://nojunk-moderate.mick8511.workers.dev/pii",
      "price": "$0.003 USDC on Base per request (x402)",
      "description": "Detect personal data (email, phone, SSN, credit card with Luhn check, IP, IBAN, crypto address, name, address, date of birth, passport) with character offsets; optional redaction to [TYPE].",
      "example_body": {
        "text": "Contact Maria Lopez at maria.lopez@example.com or (415) 555-0132. Card 4111 1111 1111 1111.",
        "redact": true
      }
    },
    "/language": {
      "methods": [
        "GET",
        "POST"
      ],
      "url": "https://nojunk-moderate.mick8511.workers.dev/language",
      "price": "$0.001 USDC on Base per request (x402)",
      "description": "Language identification (ISO 639-1 code, name, confidence) for one text or a batch of up to 50, with a script-based fallback.",
      "example_body": {
        "text": "¿Dónde está la estación de tren más cercana?"
      }
    }
  },
  "models": {
    "sentiment": "@cf/huggingface/distilbert-sst-2-int8",
    "safety": "@cf/meta/llama-guard-3-8b",
    "rerank": "@cf/baai/bge-reranker-base",
    "pii_and_language": "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
  },
  "safety_categories": {
    "S1": "Violent Crimes",
    "S2": "Non-Violent Crimes",
    "S3": "Sex-Related Crimes",
    "S4": "Child Sexual Exploitation",
    "S5": "Defamation",
    "S6": "Specialized Advice",
    "S7": "Privacy",
    "S8": "Intellectual Property",
    "S9": "Indiscriminate Weapons",
    "S10": "Hate",
    "S11": "Suicide & Self-Harm",
    "S12": "Sexual Content",
    "S13": "Elections",
    "S14": "Code Interpreter Abuse"
  },
  "pii_types": {
    "regex": [
      "email",
      "phone",
      "ssn",
      "credit_card",
      "ip",
      "iban",
      "crypto_address"
    ],
    "llm": [
      "name",
      "address",
      "date_of_birth",
      "passport"
    ]
  },
  "limits": {
    "max_text_chars": 20000,
    "max_texts": 50,
    "max_messages": 20,
    "max_documents": 100,
    "max_query_chars": 2000,
    "max_request_bytes": 131072
  },
  "no_charge_on": [
    "400 invalid input or text too long",
    "413 request body too large",
    "502 AI model unavailable or unusable result"
  ],
  "configured": true,
  "facilitator": "cdp"
}