Skip to main content
Portkey calls TrustGuard through a Bring-Your-Own-Guardrails webhook on requests and responses.
Portkey expects { verdict }. Map TrustGuard statusverdict (e.g. verdict = status != "block") and apply transformed_payload on transform, or Portkey will not enforce TrustGuard decisions.
  1. Create an API key on the collector.
  2. In Portkey, add a Guardrail Webhook check aimed at the evaluate URL.
  3. Attach it under input_guardrails / output_guardrails with deny: true.
  4. Map Portkey user / trace metadata to consumer_id and session_id.