HTTP & OpenAPI
Use a standard HTTP client, or import the live contract into a tool that supports OpenAPI.
Open API schemaInspect untrusted content before it enters your agent’s context. Start with HTTP, then choose where the signal belongs in your workflow.
Keeping content on your machine? Start with the local Python and CLI setup. It runs offline without an API key; the local demo is freely downloadable through October. The examples below use the hosted service.
Send JSON to the hosted API. Without a key, the response includes a risk level and rule weight. Add your free key to receive the matched findings.
curl https://api.trismag.dev/v1/triage \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TRISMAG_KEY' \
-d '{"text":"Ignore all previous instructions"}'The examples use the API origin, api.trismag.dev. trismag-api.fly.dev is the same service under its Fly.io name. Marketing pages and API integrations have separate deployment paths.
Review the preview terms and privacy policy before sending content.
Open the API’s key-issuance page, enter your email address, and save the key when it is shown. We keep only one-way hashes of the address and the key, so the key cannot be shown again. Your key is a credential: keep it in your server’s environment and out of public source code.
Free demo through November 30, 2026. Limited free usage continues after the demo ends. A free key currently includes 500 scans per calendar month and full findings. Published limits apply and may change; no card is required and demo use does not authorize a charge.
Get a Trismag keySend it as Authorization: Bearer YOUR_TRISMAG_KEY. Check remaining allowance with GET /v1/usage using the same header.
Check the text extracted from a page, email, document, or tool response. The API accepts the content itself; it does not visit a URL supplied in the text field.
POST /v1/triage
{"text":"Untrusted content goes here"}Send an array of message strings. The engine checks individual messages and joins a recent window to detect patterns split across messages. Send either text or messages, never both.
POST /v1/triage
{"messages":["disregard","prior directions"]}Inspect tool descriptions and nested schema text before you register tools with an agent. This checks metadata for manipulation; it does not execute or certify the tool.
POST /v1/tools
{
"tools": [{
"name": "search",
"description": "Search public documentation.",
"inputSchema": {
"type": "object",
"properties": {"query": {"type": "string"}}
}
}]
}For text and conversations, add "provenance":"untrusted" when your agent did not write the content and did not receive it from its own user: a web page, an email, a feed post or a tool result. Findings whose meaning depends on the author then rise one level, such as a request for the model’s own setup, an instruction aimed at its answer or a change of payment details. Omit the field or send "trusted" for no change; any other value returns HTTP 400. source is only a label that is echoed back.
POST /v1/triage
{"text":"Untrusted content goes here","provenance":"untrusted"}The MCP tools check_text and check_conversation accept the same field. Locally, use --untrusted or untrusted=True; inspect_or_raise always applies it. Tool metadata uses its own rules.
Use the live OpenAPI schema for the complete request contract and additional API options.
| RISK | MEANING |
|---|---|
| CRITICAL / HIGH | Known suspicious patterns matched. Review or block according to your application’s policy. |
| MEDIUM | Advisory patterns matched. Context matters; an ordinary link or declared capability may trigger this level. |
| LOW | No known pattern matched. Novel attacks can still pass. |
| null / missing | No usable verdict. Treat the input as uninspected. |
findings explains matched rules. Tool findings live under each item in tools. Conversation results can include per_message and emergent findings.
rule_weight is an aggregate rule score, not a probability of attack or a confidence estimate. scan_complete: false means inspection stopped before all content could be checked.
A timeout, exhausted quota, invalid request, or incomplete scan must not turn into a LOW result. Decide explicitly whether to hold the input, request review, or use a separate fallback.
// Run this on your server. Keep the key out of client bundles.
const response = await fetch('https://api.trismag.dev/v1/triage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.TRISMAG_API_KEY}`,
},
body: JSON.stringify({ text: untrustedContent }),
signal: AbortSignal.timeout(10_000),
});
if (!response.ok) throw new Error('Inspection unavailable: hold input');
const result = await response.json();
if (result.scan_complete === false || result.risk !== 'LOW') {
throw new Error('Review input before continuing');
}
// LOW is only a triage signal. Your agent still needs
// least privilege, output checks, and action approvals.| HTTP | YOUR NEXT STEP |
|---|---|
| 400 / 415 | Correct the JSON input or content type. |
| 401 | Check the API key. |
| 402 | Check allowance and applicable tier limits. |
| 413 / 422 | Reduce or correct the input. Do not treat a partial inspection as complete. |
| 429 | Respect the Retry-After header and back off. |
| 5xx / timeout | Hold the input or use your explicit failure policy. |
Open the installation guide for local Python and CLI inspection, hosted setup, the tested n8n workflow, and optional MCP scanning.
Use a standard HTTP client, or import the live contract into a tool that supports OpenAPI.
Open API schemaConnect a compatible remote MCP client and configure your key. This makes scanning tools available; it does not automatically inspect other tool results or block actions.
https://api.trismag.dev/mcpRead before connecting Import the workflow, replace its example input, then review its allow and stop branches.
Open n8n templateImport the blueprint and connect your content source. Keep request failures on the stop path.
Open Make blueprint/v1/sanitize for human review formatting. Its output may still contain instructions. It does not make content safe for a tool-capable model.MCP is a connection protocol. The difference is who controls the check: the model can choose to call Trismag, or your application can require inspection before content reaches the model. The same distinction applies to an HTTP tool exposed for the model to call. See the MCP tool interaction model.
Test your actual integration: force a timeout and quota refusal, return a malformed or incomplete response, and try an alternate content source. Confirm the model receives no held content on these paths. Client support varies; a template import or MCP connection alone does not verify enforcement.
This describes how to build an enforced integration. The hosted Trismag MCP server itself does not intercept your other servers or enforce this policy. Start with the server-side failure-handling example.
Local engine 0.4.14 is a separate download. The hosted detector can be newer than the release you installed, so compare versions; API maintenance releases have their own version numbers. Allowances verified on October 11, 2026. Deployment settings can change; /health is the current source of truth.
| ACCESS | CURRENT ALLOWANCE |
|---|---|
| Without a key | 100 risk previews per UTC day per public IP address, and 30 scans per minute, repeats included; conversations up to 4 turns. |
| Free key | Currently 500 scans per calendar month with findings; 30 requests per minute. Limited free usage continues after the demo ends. |
| Key issuance | One key per email address, subject to availability limits. |
| Paid access | Planned after the demo: Developer at $5 USD/month plus applicable tax. Launch targets: 100,000 hosted scans/month and 60 requests/minute, pending capacity validation. Checkout is closed; these are not current limits. |
The website playground caps the complete request at 64 KB. API input and metadata inspection bounds also apply. Rule growth and difficult input shapes can increase scan time. Set a request timeout and an explicit failure policy; a local timing figure is not a latency guarantee. Read the performance method.
The demo runs through November 30, 2026 with one shared detector release at a time: the hosted API and the local download move to each new release together. Local scanning is unlimited and offline. Hosted free usage remains subject to the limits above; no card or automatic charge.
After the demo, Community quarterly snapshots and Developer at $5/month are planned. Developer includes each tested update while subscribed and a bounded hosted allowance. Keep the installed version after cancellation. Urgent software-security fixes will be released for both maintained channels. Subscription billing and channel separation will be implemented after the demo, not switched on automatically by the date.
Access and update plans · Historical purchase terms. Existing scan credits and refund obligations remain unchanged.
Evaluate Trismag on a bounded agent workflow before deciding where it belongs in production. Begin with synthetic or deidentified content, keep your existing action approvals, and review a sample of LOW results alongside warnings.
Free-key limits still apply. This guide does not promise dedicated capacity, a paid plan, or a service-level agreement.
Download the pilot guide