This endpoint supports both mask mode and route mode. Route mode requires a local LLM with Anthropic API support (e.g., Ollama). The request format follows the Anthropic Messages API.
Request
Parameters
All Anthropic Messages API parameters are supported.
Response
Streaming
Setstream: true for Server-Sent Events:
Response Headers
PasteGuard adds headers to indicate PII and secrets handling:Content Types
PasteGuard scans configured text roles in Anthropic requests. By default it scans:- User messages — String content or text blocks
- Tool results — Text content in tool responses
pii_detection.scan_roles or secrets_detection.scan_roles if you want PasteGuard to inspect them.