> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuraltrust.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Portkey

> TrustGuard via Portkey Bring-Your-Own-Guardrails webhook.

Portkey calls TrustGuard through a **Bring-Your-Own-Guardrails** webhook on requests and
responses.

<Warning>
  Portkey expects `{ verdict }`. Map TrustGuard `status` → `verdict` (e.g.
  `verdict = status != "block"`) and apply `transformed_payload` on transform, or Portkey
  will not enforce TrustGuard decisions.
</Warning>

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`.

```json theme={null}
{
  "input_guardrails": [{
    "default.webhook": {
      "webhookURL": "{TRUSTGUARD_URL}/v1/evaluate",
      "headers": { "Authorization": "Bearer <collector-api-key>" }
    },
    "deny": true
  }]
}
```
