POST /api/public/trident/scan
Scan a prompt against your project’s two-stage firewall before forwarding it to your LLM. This is the tenant-aware scan endpoint — it knows which project you are and applies your project-specific rules as the first gate. Endpoint:POST https://app.usetrident.dev/api/public/trident/scan
Authentication: HTTP Basic — see Authentication
How the two stages work
Stage 1 — Tenant deny-list
Trident checks the prompt against your project’s custom ban rules — substrings and regexes that were automatically generated from confirmed red-team findings or manually authored in the dashboard. A match here means Trident has seen this exact attack pattern against your project before. This stage is in-process and adds no network latency.
CLOSED (default — block the request) or OPEN (allow through). The fail mode is set on your project settings page.
Request body
The user-supplied text to scan. Maximum 8 KB. Must not be empty.
The agent processing this prompt. Optional but recommended — it is attached
to any finding the firewall creates for audit and alerting.
Example request
curl
Example responses
Safe prompt:Response fields
true means the prompt is safe to forward to your LLM. false means it
was blocked — do not send it to your model.Map of scanner name to scanner-specific verdict object. Contents vary by
which stage fired the verdict.
Identifies which stage produced the verdict:
"trident.tenantRule"— blocked by a project-scoped custom rule"trident.orgRule"— blocked by an organisation-wide policy"trident.firewall"— verdict from the upstream LLM Guard ensemble
Present only when
source is "trident.tenantRule" or
"trident.orgRule". Contains id, label, kind, scope, snippet,
and severity of the rule that fired.Wall-clock time in milliseconds from request receipt to response. Tenant
rule hits are typically under 5 ms; LLM Guard verdicts are typically
80–200 ms.
POST /api/public/trident/self-report
Report an anomaly your agent observed at runtime. Use this when your agent detects something unusual — a tool that returned an unexpected error, a response that looks hallucinated, a refusal that should not have happened — and you want it to appear in the Trident findings inbox with Slack alerts and lifecycle tracking. Endpoint:POST https://app.usetrident.dev/api/public/trident/self-report
Authentication: HTTP Basic — see Authentication
Request body
The reporting agent’s ID. Minimum 1, maximum 160 characters.
A kebab-case category for the anomaly. Trident groups findings by kind, so
use a consistent taxonomy across your agents. Maximum 64 characters.
Examples:
tool-call-failure, hallucinated-policy, infinite-loop,
refused-valid-request, context-loss.Human-readable description of what went wrong. This text appears in the
finding card and the Slack notification. Maximum 4 000 characters.
One of
LOW, MEDIUM, HIGH, CRITICAL. Default is MEDIUM.OTel trace ID of the request that triggered the anomaly. Links the finding
to a specific trace in the Trident traces view. Maximum 80 characters.
Free-form key/value pairs to attach to the finding. Useful for structured
data like tool names, error codes, or request IDs.
Example request
Example response
GET /api/public/trident/firewall/rules
Fetch the active augmented ban rules for your project. These rules are built automatically when you confirm a red-team finding as a true positive — the attack pattern is extracted and added to the ban list so the firewall blocks identical attacks in production. Endpoint:GET https://app.usetrident.dev/api/public/trident/firewall/rules
Authentication: HTTP Basic — see Authentication
Example request
curl
Example response
Response fields
Exact substrings that, if found anywhere in a prompt, cause the tenant
rule scanner to block it immediately.
Regular expression patterns applied after substring matching. Compiled
once per firewall poll cycle.
ISO 8601 timestamp of the last time Trident regenerated these rules from
the confirmed attack corpus.
null if no rules have been generated yet.Number of confirmed attack examples in the project’s corpus that contributed
to the current rule set.
The Trident firewall service polls this endpoint every 5 minutes to refresh
its in-memory rule cache. You can also call it directly to audit what your
firewall is currently enforcing or to build custom tooling around your
project’s deny-list.