Skip to main content

Health Check

Check if PasteGuard and its dependencies are running.
GET /health

Request

curl http://localhost:3000/health

Response

Returns HTTP 200 when healthy, HTTP 503 when degraded.
{
  "status": "healthy",
  "services": {
    "detector": "up"
  },
  "timestamp": "2026-01-15T10:30:00Z"
}
When a service is down:
{
  "status": "degraded",
  "services": {
    "detector": "down"
  },
  "timestamp": "2026-01-15T10:30:00Z"
}
In route mode, local_llm is also included in services.

Info

Get current configuration and mode.
GET /info

Request

curl http://localhost:3000/info

Response

{
  "name": "PasteGuard",
  "version": "0.7.3",
  "description": "Privacy proxy for LLMs",
  "mode": "mask",
  "providers": {
    "openai": {
      "base_url": "https://api.openai.com/v1"
    },
    "anthropic": {
      "base_url": "https://api.anthropic.com"
    },
    "codex": {
      "base_url": "https://chatgpt.com/backend-api/codex"
    }
  },
  "pii_detection": {
    "phone_regions": [],
    "score_threshold": 0.7,
    "entities": ["PERSON", "EMAIL_ADDRESS", "PHONE_NUMBER"]
  },
  "secrets_detection": {
    "enabled": true,
    "action": "mask",
    "entities": [
      "OPENSSH_PRIVATE_KEY",
      "PEM_PRIVATE_KEY",
      "API_KEY_SK",
      "API_KEY_AWS",
      "API_KEY_GITHUB",
      "JWT_TOKEN",
      "BEARER_TOKEN",
      "ENV_PASSWORD",
      "ENV_SECRET",
      "CONNECTION_STRING"
    ],
    "max_scan_chars": 200000,
    "log_detected_types": true
  },
  "logging": {
    "retention_days": 30,
    "log_masked_content": true
  },
  "masking": {
    "show_markers": false
  }
}
In route mode, local provider info is also included.