Skip to content
Notice This app is in Beta Testing We are still testing Record Sender, so features may change.
Sign in

AI governance — API reference

The account's AI policy (read: everyone; change: `ai:manage`), the model registry as the account sees it, the AI audit log (metadata; kept content only for `ai:manage` when the account opted in), ratings and the quality report. Keys need the `account` scope.

← All groups
GET /api/v1/ai/audit

The AI audit log, newest first

`ai:manage` sees everyone's calls, others only their own. Content is never in the list.

Scope: account · paginated · ai_governance.audit

ParameterInTypeDescription
featurequerystring
providerquerystring
statusquerystring
limitqueryintegerDefault 100, at most 500
cursorquerystringThe `next_cursor` of the previous page
Responses 200 · 401 · 403 · 429

200 Success

audit * [AiAuditEntry]
fields

AiAuditEntry

at string (date-time)
attempts any
content_expires_at string | null
content_kept boolean
credits string | null
feature string
id string (uuid)
kind string
latency_ms integer | null
model string | null
provider string | null
redactions any
region string | null
status string
tokens_in integer | null
tokens_out integer | null
user_id string | null
has_more boolean
next_cursor string | null Pass as `cursor` for the next page; null on the last

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

GET /api/v1/ai/audit/{id}/content

The kept prompt and response of an audit entry

Needs `ai:manage`; viewing is itself audited.

Scope: account · ai_governance.audit_content

ParameterInTypeDescription
id *pathstring (uuid)
Responses 200 · 401 · 403 · 404 · 429

200 Success

content * object
fields
expires_at string | null
kept boolean
prompt string | null
response string | null

401 Problem details (401)

403 Problem details (403)

404 Problem details (404)

429 Problem details (429)

POST /api/v1/ai/feedback

Rate an AI answer

Scope: account · Idempotency-Key · ai_governance.feedback

Request body application/json
engine string
feature string
model string
provider string
rating * "up" | "down" | "" Empty clears the rating
subject_id string
subject_type string Default answer
Responses 200 · 401 · 402 · 403 · 409 · 422 · 429

200 Success

ok boolean

401 Problem details (401)

402 Problem details (402)

403 Problem details (403)

409 Problem details (409)

422 `invalid`: rating must be up or down

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

429 Problem details (429)

GET /api/v1/ai/models

The AI providers and models, and whether the account may use them

Scope: account · paginated · ai_governance.models

ParameterInTypeDescription
cursorquerystringThe `next_cursor` of the previous page
limitqueryintegerPage size
Responses 200 · 401 · 403 · 429

200 Success

has_more boolean
models * [AiProvider]
fields

AiProvider

allowed boolean Allowed by the plan and the account's policy
capabilities [string]
configured boolean
enabled boolean
key string
label string
models [object]
fields
model string
tier string
usd_in string
usd_out string
plans [string]
region string
self_hosted boolean
next_cursor string | null Pass as `cursor` for the next page; null on the last

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

GET /api/v1/ai/policy

The account's AI policy

Scope: account · ai_governance.policy

Responses 200 · 401 · 403 · 429

200 Success

policy * AiPolicy
fields

AiPolicy

alert_percent integer | null
allowed_providers [string]
allowed_regions [string]
audit_content boolean
audit_retention_days integer | null
can_manage boolean The caller has `ai:manage`
disabled_features [string]
month_usage string Decimal credits used this month
monthly_cap string | null Decimal credits
redact_pii boolean
self_hosted_only boolean
updated_at string | null

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)

PUT /api/v1/ai/policy

Change the account's AI policy

Needs `ai:manage`.

Scope: account · ai_governance.update_policy

Request body application/json
alert_percent integer
allowed_providers [string] Empty = every provider
allowed_regions ["eu" | "us" | "cn" | "me" | "ap"] Empty = every region
audit_content boolean Keep prompts and responses in the audit log
audit_retention_days integer
disabled_features [string] Features or groups (`insights`, `brain.ask` …)
monthly_cap number Credits a month (null = no cap)
redact_pii boolean
self_hosted_only boolean
Responses 200 · 401 · 402 · 403 · 422 · 429

200 Success

policy * AiPolicy
fields

AiPolicy

alert_percent integer | null
allowed_providers [string]
allowed_regions [string]
audit_content boolean
audit_retention_days integer | null
can_manage boolean The caller has `ai:manage`
disabled_features [string]
month_usage string Decimal credits used this month
monthly_cap string | null Decimal credits
redact_pii boolean
self_hosted_only boolean
updated_at string | null

401 Problem details (401)

402 `billing_read_only`

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

403 Problem details (403)

422 `invalid` (+`fields`)

Problem

code * string Stable machine-readable code (snake_case)
detail string A sentence an app can show
error object | string Legacy member kept for existing clients (deprecated)
errors object Field → messages, for validation errors
instance string The request path
message string Legacy member of the mobile sign-in errors (deprecated)
request_id string
status * integer
title * string
type string (uri) A URI identifying the problem type (https://recordsender.com/problems/<code>)

429 Problem details (429)

GET /api/v1/ai/quality

Ratings by model and feature

Scope: account · ai_governance.quality

ParameterInTypeDescription
daysqueryintegerDefault 30, at most 365
Responses 200 · 401 · 403 · 429

200 Success

quality * object
fields
by_feature [object]
fields
down integer
key string
score number | null
up integer
by_model [object]
fields
down integer
model string
provider string
score number | null
up integer
days integer
down integer
score number | null Percent up
up integer

401 Problem details (401)

403 Problem details (403)

429 Problem details (429)