/v1/evaluate. When you create or open a collector in the console,
its side panel shows the exact steps and a ready-to-paste snippet for the integration you
picked. This section documents each one.
Gateway
Enforce at the AI gateway. TrustGate is first-class; Portkey, LiteLLM, Kong, Apigee,
and Azure APIM are supported.
Application
Wrap model calls in your app with the Python / Node SDKs, middleware, or the REST API.
Browser
Monitor AI web apps from a managed Chrome / Edge / Firefox extension.
Edge / WAF
Run at the CDN edge: Cloudflare Workers, CloudFront Lambda@Edge, Fastly, Akamai.
The call is always the same
Every integration makes one call:direction. That
direction selects which policy Detectors
phase runs. Exception: TrustGate sets
direction for you on the request and response path. See the full contract in
the Evaluate API and the SDK walkthrough in
Application integrations.
Rules for every integration
- Create the API key on the collector and pass it as
Authorization: Bearer <key>. - Always send
consumer_idandsession_idwhen you have them. They attribute findings to the right user and conversation in Activity and power the behavioral detectors. Each snippet shows the natural source on its platform (auth context, headers, cookies). - Send
direction(input/output) unless TrustGate is the collector — otherwise Output-phase (or Input-phase) policy rules will not run.
SDKs
For application code, prefer the official TrustGuard SDKs over hand-rolled HTTP — they take the base URL and call/v1/evaluate for you:
Gateway and edge integrations use raw HTTP, since they run inside vendor config or edge
runtimes where the SDKs don’t apply.
Run several at once
You can run multiple collectors simultaneously (e.g. gateway + browser). Each has its own key and policy, and behavioral signals correlate across them byconsumer_id.