# Secure AI > Data loss prevention for AI agents. It inspects what an agent is about to > do — the tool call, with its arguments — and allows, redacts or blocks it > according to rules the company set. Every action is logged. Two halves. The detector finds the people and the credentials in a piece of text and swaps them for plausible stand-ins. The control plane decides whether an action may happen at all, and records that it did. The substitution is the point of the first half: a model handed `[NAME]` writes about `[NAME]` and the answer comes back needing repair, where a model handed a name writes an ordinary sentence. Rules being on the account is the point of the second: if an agent could set its own policy per request then the agent is the policy, and nothing is actually governed. ## What it does - Inspects a tool call before it runs, at every depth of its arguments - Allows, redacts or blocks it — per data kind, per tool, per direction - Rewrites redacted actions so they are ready to send, with a map back - Logs every action as kinds and locations, never as values - Works in front of any model or agent framework. The checkpoint (/v1/inspect) never sees the model's response; the proxy endpoints below pass it through only to restore real values, and do not store it - Never stores the mapping between a stand-in and a real person ## Endpoints ### Control plane — for agents - `POST /v1/inspect` — a tool call in, a decision out. Send `{ "tool": "http.post", "input": { ... }, "direction": "outbound" }`. Returns `decision` (`allow` | `redact` | `approve` | `block`), the rewritten `input` when it is not blocked, the `map`, and `findings` with the kind and path of everything located. Blocked responses carry no `input`. `approve` means a person must decide: the response carries an `approvalId` and an `expiresAt` and nothing sendable. Poll `/v1/approvals/`, then call `/v1/inspect` again with the same input and that `approvalId`. Approvals are single use, expire into a refusal rather than a release, and are bound to the shape of the action they were granted for - `GET /v1/policy` — the rules in force - `PUT /v1/policy` — replace them. Also carries `webhook` (`{ url, on?, secret? }`) — where to POST when something is refused, defaulting to blocks only. The payload is the audit record, so it holds no values; a `secret` adds an `X-Secure-AI-Signature` HMAC. A rule is `{ "kind": "card", "decision": "block", "direction": "outbound" }`; the most severe decision across an action's findings wins - `POST /v1/policy/allow` — stop flagging a value (`{ "value": "@ourcompany.com" }`). Applies to every agent on the account - `POST /v1/feedback` — report a value the scanner missed or wrongly redacted (`{ "type": "miss", "value": "...", "context": "..." }`), so the fix reaches every account. Only its shape is kept, never the value - `GET /v1/policy/templates` — starting policies: balanced, PCI, HIPAA, GDPR, client confidentiality, nothing-leaves. A template configures one control and is not compliance with anything - `POST /v1/policy/templates` — apply one by `id`. Keeps the account's own allowlist, gateway destinations and webhook - `GET /v1/approvals` — actions held for a person, newest first. `?status=pending` for the queue - `GET /v1/approvals/` — one of them - `POST /v1/approvals/` — `{ "decision": "approved" | "denied", "note"? }`. Must be a signed-in person: an API key cannot approve its own agent's action - `GET /v1/audit` — what agents did, newest first - `GET /v1/audit/summary` — counts over a recent window - `GET /v1/audit/suggestions` — rules the trail implies. Offered, never applied: each carries its evidence and says whether acting on it makes the policy tighter or looser - `POST /v1/audit/suggestions` — apply one, by `id`. This is the only way a suggestion changes anything - `ANY /v1/gateway/` — the same inspection with no code to write. Point an HTTP client at it and every request is checked on the way past. The destination goes after the prefix, or in `X-Secure-AI-Target`; the vendor's own credential goes in `X-Secure-AI-Forward-Authorization`, because the `Authorization` header is ours and is never forwarded. Answers carry `X-Secure-AI-Decision` and `X-Secure-AI-Audit-Id`; a refusal is a 403 and nothing reaches the destination. Private and link-local addresses are refused, so it cannot be used to reach a cloud metadata service ### Detector — for text - `POST /v1/redact` — text in, stand-ins out, plus the map - `POST /v1/restore` — the model's answer and the map, real values back - `POST /v1/proxy/chat/completions` — all three steps in one request, using your own model vendor key. OpenAI-compatible, so an existing client needs only a new base URL. Where a tool has room for one key only (n8n), send both in it as `sai_...:` - `POST /v1/chat/completions` — the same, using our models. Takes `tools` and returns `tool_calls` with real values in the arguments; the account's policy can withhold a call or hold it for a person's approval - `POST /v1/messages`, `POST /v1/proxy/messages` — the same two, in Anthropic's Messages format, for the Claude SDKs and Claude Code (key in `x-api-key`) - `GET /v1/usage` — what the account has used this month - `GET /v1/models`, `GET /v1/proxy/models` — the model list OpenAI clients ask for Base URL: https://secureai.one/v1 ## As MCP tools `https://secureai.one/mcp` — an agent can call these directly: - `inspect_action` — check an action before taking it. Use it before any action that sends data anywhere. A `block` means do not proceed - `check_policy` — read the rules before planning work, so you choose an approach that will not be refused - `recent_activity` — what agents on this account have been doing - `redact` / `restore` — the detector, as tools ## SDK `npm install @secure-ai/guard`. Its `guard()` wraps a function the agent already calls and invokes it with the rewritten arguments, so protection does not depend on remembering to check a decision at each call site. Authentication: `Authorization: Bearer sai_...` ## Secure mode For conversations nobody but the model may see. The client seals the conversation to a key held only inside an AWS Nitro enclave, after verifying AWS's signed attestation of which program holds it; Secure AI relays the envelope without being able to open it. `sai.secureChat({ messages })` in the TypeScript SDK. `GET https://secureai.one/v1/sealed` lists the enclave, the trusted builds and the models. API subscription only; priced per message. ## For assistants and agents There is a remote MCP server at https://secureai.one/mcp offering two tools, `redact` and `restore`. Add it with an `Authorization: Bearer sai_...` header and an assistant can strip personal detail from text before sending it onward, then put it back in the reply, without anybody writing the calls. ## Docs - [API reference](https://secureai.one/developers/docs): endpoints, fields, errors, limits - [Developers](https://secureai.one/developers): what it is and what it costs ## Pricing Free to start: 1,000 requests a month, no card. Larger plans are set up with the team: contact sales at https://secureai.one/pricing. Your own model spend stays yours — we never see it. ## Limits worth knowing before you build - A person is found by the words around them. A name in a labelled record is found reliably; a name in the middle of a sentence is best-effort, and the response says which happened via `names_decided` - The map is returned and never stored. Lose it and that answer cannot be restored — which is deliberate, since holding it would mean holding the table that turns redacted text back into real people - 200,000 characters per redact call; 60 requests a minute per key