Skip to main content
A collector is wherever you call /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:
…and reacts to the verdict:
Inspect input before calling the model and output before returning it — usually two calls per interaction, each with the matching 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

  1. Create the API key on the collector and pass it as Authorization: Bearer <key>.
  2. Always send consumer_id and session_id when 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).
  3. 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 by consumer_id.