/v1/guard and
enforces the verdict for every model call with no application changes.
Every gateway integration starts the same way: create an API key on the collector,
then wire the gateway to call the guard endpoint and block when the response
status is "block".
TrustGate (recommended)
TrustGate is NeuralTrust’s own AI gateway and the first-class collector — findings appear as first-class spans in TrustGate traces, across LLM, MCP, and A2A traffic.- Create an API key on the collector.
- Open your TrustGate gateway configuration.
- Enable the TrustGuard policy on the routes you want to protect and paste the API key into its settings.
- Send a test request — it appears in TrustGuard’s Activity page within seconds.
Portkey
Portkey calls TrustGuard through a Bring-Your-Own-Guardrails webhook check on requests and responses.- Create an API key on the collector.
- In Portkey, create a Guardrail with a Webhook check pointing at the guard endpoint.
- Add it to
input_guardrails/output_guardrailsin your Portkey Config withdeny: trueto enforce. - Portkey expects a
{ verdict }response — mapverdict = (status != "block")with a thin adapter if your plan doesn’t support response mapping. Map Portkey request metadata (user, trace id) toconsumer_idandsession_id.
LiteLLM
Add TrustGuard as a LiteLLM custom guardrail that calls the guard endpoint on every request.- Create an API key on the collector.
- Create
trustguard_guardrail.py: aCustomGuardrailsubclass that calls TrustGuard via the Python SDK (pip install neuraltrust-trustguard) and raises whenis_blockedis true. Setconsumer_idfrom the LiteLLM user/key alias andsession_idfromlitellm_session_id. - Reference the class from your proxy
config.yaml. - Restart your LiteLLM proxy.
Kong
Use Kong’sai-custom-guardrail plugin (requires AI Proxy) to send prompts and
completions to the guard endpoint.
- Create an API key on the collector.
- Configure the AI Proxy (or AI Proxy Advanced) plugin on your route.
- Add the
ai-custom-guardrailplugin pointing at the guard endpoint. Includeconsumer_id(Kong’sX-Consumer-ID) andsession_idin the body template. - Apply the config — requests are blocked when TrustGuard returns
status: "block".
Apigee
Call the guard endpoint from a Shared Flow and raise a fault when a request is blocked.- Create an API key on the collector.
- Create a Shared Flow with an AssignMessage policy that builds the request body
(
{ protocol, direction, payload, consumer_id, session_id }) — use the client_id / developer app asconsumer_id. - Add a ServiceCallout policy that POSTs it to the guard endpoint with the
Authorization: Bearerheader. - Add a RaiseFault policy (403) conditioned on
status == "block". - Attach the Shared Flow to your proxies with a FlowCallout.
Azure APIM
Call the guard endpoint with asend-request policy and block requests before
they reach your backend.
- Create an API key on the collector.
- Open your API in the Azure portal.
- Add a
send-requestpolicy in the inbound section posting the prompt to the guard endpoint. - Return 403 when the response
statusis"block"; repeat in outbound for completions.