Secure AI Audit API
The Audit API from Secure AI — 3 operation(s) for audit.
The Audit API from Secure AI — 3 operation(s) for audit.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/secureai-one:secureai-one-audit-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Secure AI Audit API
version: 1.0.0
description: 'Data loss prevention for AI agents. Inspects what an agent is about to do — the tool call, with its arguments — and allows, redacts or blocks it according to rules the account holds. Every inspected action is logged as kinds and locations, never as values.
The detector half is still here on its own: /redact swaps the people in a piece of text for plausible stand-ins before it reaches a model, and /restore puts them back.'
contact:
url: https://secureai.one/developers
servers:
- url: https://secureai.one/v1
security:
- apiKey: []
tags:
- name: Audit
paths:
/audit:
get:
summary: What agents did
description: Newest first. Records hold the kind and location of what was found and never the values. Kept for 90 days.
operationId: listAudit
parameters:
- name: limit
in: query
schema:
type: integer
default: 50
minimum: 1
maximum: 200
- name: cursor
in: query
schema:
type: string
description: From a previous page.
responses:
'200':
description: A page of events.
content:
application/json:
schema:
type: object
properties:
events:
type: array
items:
$ref: '#/components/schemas/AuditEvent'
cursor:
type: string
nullable: true
'401':
description: Missing or invalid API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Audit
/audit/summary:
get:
summary: The counts, over a recent window
operationId: auditSummary
parameters:
- name: limit
in: query
schema:
type: integer
default: 50
minimum: 1
maximum: 200
responses:
'200':
description: Counts over the window, not all time.
content:
application/json:
schema:
type: object
properties:
window:
type: integer
actions:
type: integer
blocked:
type: integer
redacted:
type: integer
allowed:
type: integer
byKind:
type: array
items:
type: object
properties:
kind:
type: string
enum:
- secret
- card
- iban
- ssn
- govid
- email
- phone
- address
- postcode
- name
- host
count:
type: integer
byTool:
type: array
items:
type: object
properties:
tool:
type: string
count:
type: integer
'401':
description: Missing or invalid API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Audit
/audit/suggestions:
get:
summary: Rules the trail implies
description: 'Derived from recent activity. Nothing is changed by reading this.
Some useful corrections cannot be suggested: ''stop flagging this specific value'' would need the trail to hold values, and it does not. That one is set by hand through /policy/allow.'
operationId: listSuggestions
responses:
'200':
description: Up to ten suggestions, strongest evidence first, tightenings ahead of loosenings.
content:
application/json:
schema:
type: object
properties:
window:
type: integer
description: How many recent actions they were derived from.
suggestions:
type: array
items:
$ref: '#/components/schemas/Suggestion'
'401':
description: Missing or invalid credentials.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Audit
post:
summary: Apply one suggestion
description: The only way a suggestion changes anything. A product that quietly loosened a rule because a pattern looked benign would be indefensible the first time the pattern was an agent being exploited.
operationId: applySuggestion
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
id:
type: string
required:
- id
responses:
'200':
description: The updated policy, and the suggestion that was applied.
content:
application/json:
schema:
type: object
properties:
policy:
$ref: '#/components/schemas/Policy'
applied:
$ref: '#/components/schemas/Suggestion'
'401':
description: Missing or invalid credentials.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No current suggestion with that id — they change as activity does.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Audit
components:
schemas:
Policy:
type: object
properties:
version:
type: integer
enum:
- 1
fallback:
type: string
enum:
- allow
- redact
- approve
- block
description: What happens to a kind no rule mentions.
rules:
type: array
items:
$ref: '#/components/schemas/Rule'
maxItems: 200
denyTools:
type: array
items:
type: string
description: Tools that may not be called at all, whatever is inside them.
allow:
type: array
items:
type: string
maxItems: 500
description: Literal values that are never sensitive here. A leading "@" exempts a whole domain. These are stored, unlike anything in the audit trail.
gatewayAllow:
type: array
items:
type: string
maxItems: 200
description: Hosts the gateway may forward to. Empty or absent means any public host. A leading "." matches a domain and its subdomains. Private-address rules still apply and cannot be opened up from here.
webhook:
type: object
description: Where to POST when an action is refused. The payload is the audit record, which holds kinds and locations and never values.
properties:
url:
type: string
description: https only. Private and link-local addresses are refused, as everywhere else.
'on':
type: array
items:
type: string
enum:
- allow
- redact
- block
description: Which decisions to send. Defaults to blocks only — a notification on every allowed action is one nobody reads.
secret:
type: string
maxLength: 200
description: 'When set, each delivery carries X-Secure-AI-Signature: sha256=<hmac of the body>.'
required:
- url
approvalTtlSeconds:
type: integer
minimum: 30
maximum: 86400
description: How long a held action waits before it is denied. Expiry is a denial and never a release — an action somebody wanted reviewed must not proceed because nobody had time to review it.
required:
- version
- fallback
- rules
Suggestion:
type: object
description: A rule the trail implies. Offered with its evidence; applying it is a separate, explicit call.
properties:
id:
type: string
description: Stable across calls, so one can be dismissed or applied.
title:
type: string
because:
type: string
description: The evidence, with the numbers that produced it.
rule:
$ref: '#/components/schemas/Rule'
denyTool:
type: string
description: Set instead of `rule` when the suggestion is about a tool rather than a kind.
direction:
type: string
enum:
- tighter
- looser
- advisory
description: Whether acting on this narrows or widens the policy. A UI should never present the two in one undifferentiated list.
count:
type: integer
required:
- id
- title
- because
- direction
- count
AuditEvent:
type: object
description: One inspected action. There is no field here that can hold a value an agent handled.
properties:
id:
type: string
ts:
type: integer
description: Milliseconds since epoch.
keyId:
type: string
description: Which API key made the call, so a leak traces to an integration.
agent:
type: string
nullable: true
tool:
type: string
direction:
type: string
enum:
- outbound
- inbound
decision:
type: string
enum:
- allow
- redact
- approve
- block
toolDenied:
type: boolean
findings:
type: array
items:
$ref: '#/components/schemas/Finding'
inspected:
type: boolean
description: False when the gateway could not read the body — an image, a zip. Absent means it was inspected.
required:
- id
- ts
- keyId
- tool
- direction
- decision
- toolDenied
- findings
Rule:
type: object
description: One line of policy. When two rules match the same finding, the later one wins.
properties:
kind:
type: string
enum:
- secret
- card
- iban
- ssn
- govid
- email
- phone
- address
- postcode
- name
- host
decision:
type: string
enum:
- allow
- redact
- approve
- block
tools:
type: array
items:
type: string
description: Only these tools. Exact, or a single trailing "*". Absent means all.
direction:
type: string
enum:
- outbound
- inbound
description: Absent means both.
required:
- kind
- decision
Error:
type: object
properties:
error:
type: object
properties:
message:
type: string
type:
type: string
code:
type:
- string
- 'null'
param:
type:
- string
- 'null'
Finding:
type: object
description: Something the scanner located. Carries the kind and where it sat, never the value.
properties:
kind:
type: string
enum:
- secret
- card
- iban
- ssn
- govid
- email
- phone
- address
- postcode
- name
- host
path:
type: string
description: Dotted path into the action, e.g. "body.customer.email". Empty when the input was a bare string.
example: body.customer.email
decision:
type: string
enum:
- allow
- redact
- approve
- block
required:
- kind
- path
- decision
securitySchemes:
apiKey:
type: http
scheme: bearer
description: A key created in Settings → Developer. Shown once; what is stored is its SHA-256.