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

# REST API

> POST /v1/evaluate from curl or any HTTP client.

Create an API key on the collector first. Set `direction` on every call (`input` /
`output`). Prefer the Go SDK over hand-rolled HTTP in Go. Full contract:
[Evaluate API](/trustguard/api/evaluate).

**Input**

```bash theme={null}
curl -X POST "{TRUSTGUARD_URL}/v1/evaluate" \
  -H "Authorization: Bearer <collector-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "llm",
    "direction": "input",
    "payload": { "input": "summarize this customer call" },
    "session_id": "sess-123",
    "consumer_id": "alex@acme.com"
  }'
```

**Output**

```bash theme={null}
curl -X POST "{TRUSTGUARD_URL}/v1/evaluate" \
  -H "Authorization: Bearer <collector-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "protocol": "llm",
    "direction": "output",
    "payload": { "input": "Here is a summary…" },
    "session_id": "sess-123",
    "consumer_id": "alex@acme.com"
  }'
```

```text theme={null}
{ "status": "allow", "findings": [], "transformed_payload": null, "trace_id": "…", "request_id": "…" }
```
