Skip to main contentThere are two common ways to integrate /guard:
- 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.
SageXAI does not automatically block requests. You decide how to handle flagged results (block, sanitize, route to a human, etc.).