1) Pre-LLM (block input)
- Send the user message to
/api/v1/guard
before calling your LLM provider. - If
flagged: true
, block or sanitize the input and show a user-friendly message. - If not flagged, forward the original message to the LLM.
2) Post-LLM (block output)
- Call your LLM provider first.
- Send the LLM output to
/api/v1/guard
. - If
flagged: true
, block returning the output and show a safe alternative.
flagged
results (block, sanitize, route to a human, etc.).