API Reference
Two regions. Your API key says which one to call.
EU, Frankfurt
https://eu.api.complyedge.io
Key starts with ce_eu_. Use it when your contracts or customers want data kept in the EU. Preselected at sign-up.
US, Oregon
https://api.complyedge.io
Key starts with ce_. Use it when your contracts or customers want data kept in the US.
You choose the region when you create your free API key: the sign-up form asks where your checks run, EU or US. The SDK reads the key and calls the right host. With curl or your own client, call the host of your key's region; a key sent to the other region is rejected. The region is where your checks run and your audit records are stored; prompt and output text is checked there and never stored. On a paid plan, after a clean phrase pass, the injection meaning check sends that text to OpenAI in the US when the month's model budget covers it. The wider legal review sends it only when you turn it on and the month's model budget covers it (use_semantic_fallback). It does not change which laws are checked: the jurisdiction field on each check does. No general law requires either region. US law does not require US storage, and GDPR allows transfers outside the EU with safeguards such as standard contractual clauses (Chapter V). The examples below use the EU host; with a US key, use api.complyedge.io instead.
Every check names its jurisdiction; the loaded rule bundle today runs EU AI Act rules (Article 5 and related), prompt-injection rules and, for US end users, SEC Regulation FD (selective disclosure), and the same call shape carries other jurisdictions as their rule sets ship.
Authentication
Authenticated endpoints expect a Bearer token in the Authorization header (API key or, where noted, a dashboard JWT session):
Authorization: Bearer ce_your_api_key
No auth: GET /health, GET /v1/public/trust/{slug}, and GET /v1/public/badge/{slug}.svg.
Don't have a key yet? Sign in to the dashboard (free, email OTP).
/health
Readiness check. Returns 200 only when OPA and TrustLint can evaluate; anything else is 503. No auth required.
Response 200
{
"status": "healthy",
"version": "0.1.0",
"commit": "a1b2c3d",
"timestamp": "2026-06-20T00:00:00Z",
"services": {
"database": { "status": "healthy", "service": "audit_logger", "database": "dynamodb" },
"trustlint": { "engine": "trustlint", "healthy": true, "rules_loaded": 63 },
"opa": true,
"enhanced_compliance_engine": true,
"rule_manager": true
}
}
Response 503
{
"status": "unhealthy",
"version": "0.1.0",
"commit": "a1b2c3d",
"timestamp": "2026-06-20T00:00:00Z",
"services": { "database": false, "trustlint": { "engine": "trustlint", "healthy": false, "rules_loaded": 0 }, "opa": false, "enhanced_compliance_engine": false, "rule_manager": false },
"error": "Internal health check error"
}
/v1/check
Core compliance check. Phrase rules run first. On a paid plan a clean pass then runs an injection check when the month's model budget covers it, which can block. The wider review runs only when you turn it on and that budget covers it.
Request body
{
"text": "Score users based on their social behavior",
"agent_id": "my-agent",
"jurisdiction": "EU",
"direction": "output",
"context": { "user_id": "ref_5d81e2c4", "user_role": "analyst", "session_id": "sess_abc" },
"decision_context": {
"deciding_system": { "version": "gpt-5.4-2026-08-01" },
"purpose_ref": "purpose:support-replies",
"data_categories": ["contact"]
},
"use_semantic_fallback": false
}
agent_id: required. Identifier for the AI agent making the call.jurisdiction: optional. Where the end user is, not where your company is based: the EU AI Act applies when an AI system's output is used in the EU, wherever the provider or deployer is established (Art. 2(1)(c)). Defaults toEU.EUruns the EU AI Act rules and the personal-data and credential rules (email address, phone number, IBAN, card number, German, French, Spanish, Dutch and Italian national IDs, API keys and private keys): text containing one is blocked;USandUS-*run the Regulation FD disclosure rule; every check runs prompt-injection detection. The bundle's loaded jurisdictions are listed by GET /v1/rules/info.direction:output(default),prompt, oractionfor an action the AI system is about to take.context: optional.user_id,user_roleandsession_idare written on the audit record; without them those columns are blank in your export.user_idandsession_idare stored as keyed pseudonyms (p1:…) under your account's key, never as sent: send a stable identifier, never a name or email.user_roleis stored as sent and must name a role, not a person. Never send a credential (session token, JWT, API key) in these fields; ComplyEdge replaces token-shaped values withredacted:and a hash before writing. See Record who each check acts for.decision_context: optional. What you know about the decision that ComplyEdge cannot, written to the audit record as ADCR fields. A check without it is still decided and recorded. When you send it,deciding_system.version,purpose_refanddata_categoriesare required; every other key is optional, and a key left out is left out of the record, never filled in:deciding_system.version(the version of your AI system or model),purpose_ref(your reference to the purpose of the processing),data_categories(categories of personal data the decision used, from a fixed list;[]when none),correlation_idandsubject(stored as keyed pseudonyms),subject_is_employee,works_agreement_ref,legal_basis(a provision:eliorurl, andlabel) andsource_ref(your locator of the text as a URI, such asticket:88213, never the text). References must be opaque: an email address or a credential is refused with422. A record meets ADCR class Record only whendeciding_system.version,purpose_refanddata_categoriesare sent.use_semantic_fallback: optional (default false). On a Developer or Enterprise plan, after the phrase rules pass, the injection meaning check runs when the month's model budget covers it: it sends the text to OpenAI and can block, and a missing answer denies. If that budget is used up, the check does not run and the phrase rules decide. Set this true to also run the wider legal review. That review can block text the rules passed. When a rule blocks, and the hit is not a format such as an IBAN or a private key, a smaller model can lift the block only if every rule that fired is cleared. On the Free plan the flag does not turn the review on. If it is set, the response says"layer2_skipped": "plan". If it is left off and the month's model budget still covers the injection check, that field is null. If the budget is used up, the field isbudgeteven when the wider review is off.use_case,lawful_basis,dataset_operation: optional. Article 5(1)(g) carve-outs:use_case: "law_enforcement"withlawful_basis: trueapplies the law-enforcement exception only on an account configured as a law enforcement authority, which ComplyEdge sets and the request never can. On any other account the claim is refused, the block stands, and the record lists it with reasonlaw_enforcement_refused.dataset_operation: "labelling"or"filtering"applies the dataset-preparation exception, as asserted by the caller.
Response 200
{
"event_id": "uuid-v4",
"allowed": false,
"violations": [{
"rule_id": "rego-art5-1c-001",
"rule_description": "Regulation (EU) 2024/1689, Article 5(1)(c): the placing on the market, the putting into service or the use of AI systems for the evaluation or classification of natural persons or groups of persons over a certain period of time based on their social behaviour or known, inferred or predicted personal or personality characteristics, with the social score leading to either or both of the following: (i) detrimental or unfavourable treatment of certain natural persons or groups of persons in social contexts that are unrelated to the contexts in which the data was originally generated or collected; (ii) detrimental or unfavourable treatment of certain natural persons or groups of persons that is unjustified or disproportionate to their social behaviour or its gravity;",
"severity": "critical",
"reason": "Remove any social scoring, citizen ranking, or behaviour-based classification that leads to detrimental treatment outside the original data context.",
"confidence": 1.0,
"text_excerpt": "Score users based on their social behavior"
}],
"latency_ms": 91,
"bundle_version": "sha256:42dfbd5ac9ad",
"bundle_digest": "42dfbd5ac9adccdc4052d6fdcb88bded9281dcccf961ba31171b235505104e34",
"evaluated_rules": ["rego-art5-1g-001", "rego-art5-1f-001", "rego-art5-1e-001",
"rego-art5-1d-001", "rego-art5-1h-001", "rego-art5-1c-001",
"rego-art5-1a-001", "rego-art5-1b-001"],
"engine_path": "opa",
"opa_latency_ms": 79.2,
"audit_logged": true,
"text_hash": "0aa4e756f4df3933cc48373c6338499228d50078cacbbdd9dde925221d2b02c5",
"text_hash_alg": "hmac-sha256-1",
"timestamp": "2026-07-22T20:30:00+00:00"
}
rule_description: the article citation when a phrase rule or the injection check fired. Not on an allow. A wider-review block is labeledLLM_LAYER2_BLOCKand that text is not an article citation.confidence:1.0when a phrase rule decides. Below1.0when a model decided: the injection meaning check on a paid plan when the month's model budget covers it, or the wider legal review when you turn it on and that budget covers it.engine_path:opawhen only the phrase rules ran.hybridwhen a model also ran on this check: the paid injection check after a clean pass when the month's model budget covers it, including when it allows the text, or the wider review when you turn it on and that budget covers it.fallback_blockwhen the check could not finish, including a missing injection answer. The call is denied.llmis an allowed value and is not what this check writes.layer2_skipped:nullwhen no model check was skipped."plan": the Free plan was asked for the wider review, and it did not run."budget": this month's model budget is used up (25% of what the plan pays after payment fees, resets on the 1st, UTC), including when the wider review is off. The injection check does not run and the phrase rules decide."unavailable": the model cannot be priced, so it is not called. A pass is refused, and the violations includeLLM_LAYER2_UNAVAILABLE, when the account settings or the model spend counter could not be read, and when the injection check ran and did not answer.overridden_hits:nullunless Layer 2 lifted a rule block. Then one entry per rule:rule_id, the model'sreasonand itsconfidence. The same entry is written on the audit record.confirm_model: the model that checked the rule hits, when one did.opa_latency_ms: phrase-rule engine time. It does not include the injection check.latency_msis the total, including the audit write.text_hash: keyed hash (HMAC-SHA-256) of the evaluated text under your account's own key, byte-identical to the audit entry, which the record's hash chain covers (raw text is not stored). The key never leaves ComplyEdge, so the value cannot be reversed by hashing guesses; to check a text against a record, call POST /v1/audit/verify. Art. 12-ready evidence for high-risk record-keeping from Dec 2027.text_hash_alg:hmac-sha256-1, HMAC-SHA-256 under your account key overcommitment:followed by the text. Records written before the keyed hash was deployed have notext_hash_alg; theirtext_hashis a plain SHA-256 until they expire.POST /v1/audit/verifyworks on records of each kind.timestamp: UTC instant of evaluation, same value written on the audit entry.text_excerpt: optional. The portion of text that triggered the violation; may benull.
Rule set mapping
rule_id: a phrase-rule ID belongs to the open ComplyEdge rule set, where each rule carries its citation and approval status. An injection block isllm-art15-ipi-*, not that published ID.LLM_LAYER2_BLOCKis the wider review and is not in that rule set. A phrase-rule ID usually names the provision too:rego-art5-1c-001applies Regulation (EU) 2024/1689, Article 5(1)(c). Two IDs are kept from earlier versions and name a different provision than the rule now applies, so rely on the citation.bundle_digest: the content digest of the exact rule set that ran (bundle_versionis its short form). It is written on the audit record, so a reviewer can tell which version of the rule set decided any record, and whether the rules changed between two records.- What a decision record must prove, and how an auditor cites it: ADCR, the open Rulebook.
Response headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 94
X-RateLimit-Reset: 2026-04-13T00:00:00+00:00
Errors
401: invalid or missing API key422: invalid request body429: rate limit exceeded. HeaderRetry-Afteris the whole seconds until the daily reset (00:00 UTC). Structured body:
{
"error": "rate_limit_exceeded",
"limit": 1000,
"plan": "developer",
"reset_at": "2026-06-21T00:00:00+00:00",
"upgrade_url": "https://dashboard.complyedge.io/?intent=sign-in&upgrade=volume"
}
/v1/sandbox/check
Try a request against your tenant's enforcement without recording it. Same engines, same tenant settings and same verdict as POST /v1/check; what differs is everything after the decision: no audit entry, no usage metering, no telemetry, and no daily rate-limit count. Use it to test cases before wiring an integration, or to see what a rule catches. It never produces evidence: a sandbox decision has no record to export.
Authentication
API key or dashboard session token. The dashboard's "Try a request" panel calls this endpoint.
Request body
Identical to POST /v1/check: text, agent_id, optional jurisdiction, direction, use_semantic_fallback and the Article 5(1)(g) carve-out fields.
Response 200
{
"event_id": "uuid-v4",
"allowed": false,
"violations": [{ "rule_id": "rego-art5-1c-001", "rule_description": "Regulation (EU) 2024/1689, Article 5(1)(c): the placing on the market, the putting into service or the use of AI systems for the evaluation or classification of natural persons or groups of persons over a certain period of time based on their social behaviour or known, inferred or predicted personal or personality characteristics, with the social score leading to either or both of the following: (i) detrimental or unfavourable treatment of certain natural persons or groups of persons in social contexts that are unrelated to the contexts in which the data was originally generated or collected; (ii) detrimental or unfavourable treatment of certain natural persons or groups of persons that is unjustified or disproportionate to their social behaviour or its gravity;", "severity": "critical", "confidence": 1.0 }],
"latency_ms": 9,
"bundle_version": "sha256:42dfbd5ac9ad",
"bundle_digest": "42dfbd5ac9adccdc4052d6fdcb88bded9281dcccf961ba31171b235505104e34",
"evaluated_rules": ["rego-art5-1a-001", "rego-art5-1b-001", "rego-art5-1c-001", "rego-art5-1d-001", "rego-art5-1e-001", "rego-art5-1f-001", "rego-art5-1g-001", "rego-art5-1h-001"],
"engine_path": "opa",
"opa_latency_ms": 7.4,
"audit_logged": false,
"sandbox": true,
"text_hash": "0aa4e756f4df3933cc48373c6338499228d50078cacbbdd9dde925221d2b02c5",
"text_hash_alg": "hmac-sha256-1",
"timestamp": "2026-09-20T15:30:00+00:00"
}
audit_logged: alwaysfalse. Theevent_idis not retrievable from GET /v1/audit/events.sandbox: alwaystrue, so a response can never be mistaken for a recorded decision.- No
X-RateLimit-*headers: sandbox calls do not count against the plan's daily limit. They have their own daily cap (see Errors).
Errors
401: invalid or missing API key or session422: invalid request body429: more than 60 sandbox calls in a minute for the tenant. Body{ "detail": { "error": "sandbox_rate_limit_exceeded", "limit": 60, "window": "1 minute" } }, headerRetry-After: 60.429: more than 1,000 sandbox calls for the tenant in one UTC day, on every plan. Body{ "detail": { "error": "sandbox_daily_limit_exceeded", "limit": 1000, "window": "1 day (UTC)" } }, headerRetry-Afterset to the seconds until midnight UTC.503: the engine could not evaluate, so no verdict was made. Body carries"error": "compliance_evaluation_unavailable","audit_logged": false,"sandbox": true.
SDKs
Both SDKs route check here with one flag; the result carries sandbox beside audit_logged.
# Python
result = ce.check("Score users based on their social behavior", sandbox=True)
result.blocked, result.sandbox, result.audit_logged # True, True, False
// TypeScript
const trial = await ce.check("Score users based on their social behavior", { sandbox: true });
trial.allowed, trial.sandbox, trial.auditLogged // false, true, false
MCP
The MCP servers expose the same call as the tool sandbox_check (arguments text, optional jurisdiction; returns BLOCKED or ALLOWED with rule ID and citation, audit_logged: false, sandbox: true). It is the one MCP tool that needs a key; the three offline TrustLint tools never do.
- Local (
npx -y @complyedge/mcporcomplyedge-mcp): setCOMPLYEDGE_API_KEYin the server's environment. Without it the tool is not listed and the server stays fully offline. - Hosted (
https://mcp.complyedge.io/mcp): always listed; send your key as theAuthorization: Bearer <key>header on the MCP connection (your MCP client's per-server headers). The key is never a tool argument, never logged, and the hosted server keeps no keys.
{
"mcpServers": {
"complyedge": {
"url": "https://mcp.complyedge.io/mcp",
"headers": { "Authorization": "Bearer ce_your_api_key" }
}
}
}
/v1/rules/info
Metadata about the currently-loaded rule bundle, filtered to your plan's accessible tiers.
Response 200
{
"bundle_id": "sha256:42dfbd5ac9ad",
"version": "sha256:42dfbd5ac9ad",
"generated_at": "2026-06-20T00:00:00Z",
"rule_count": 63,
"jurisdictions": ["EU", "GLOBAL", "US", "US-CA", "US-NY"],
"plan": "enterprise_gpai",
"accessible_tiers": ["community", "eu_ai_act", "gpai"]
}
/v1/metrics?hours=24
Compliance metrics for your tenant over a time window. Includes engine-path distribution, violation rates, and performance data.
Query parameters
hours: time window:24(1d),168(7d), or720(30d). Default:24.
Response 200
{
"calls_total": 1247,
"violations_prevented": 18,
"violation_rate": 1.44,
"opa_ratio": 0.7883,
"llm_ratio": 0.0,
"fallback_ratio": 0.0096,
"hybrid_ratio": 0.1700,
"trustlint_ratio": 0.0321,
"engine_path_counts": { "opa": 983, "llm": 0, "fallback_block": 12, "hybrid": 212, "trustlint": 40 },
"avg_cost_per_call": 0.00024,
"total_cost_estimate": 0.351,
"cost_breakdown": { "opa": 0.0, "llm": 0.0, "fallback_block": 0.001, "hybrid": 0.35, "trustlint": 0.0 },
"models_used": { "gpt-6-luna": 212 },
"latency_avg_ms": 21,
"latency_p50_ms": 18,
"latency_p95_ms": 48,
"latency_p99_ms": 87,
"latency_by_engine": { "opa": 8, "llm": 0, "hybrid": 180, "fallback_block": 2, "trustlint": 6 },
"top_violations": [{ "rule_id": "rego-art5-1a-001", "count": 8 }],
"unique_violation_types": 4,
"time_window_hours": 24,
"start_time": "2026-06-19T00:00:00Z",
"end_time": "2026-06-20T00:00:00Z"
}
A check today is counted under opa, hybrid, fallback_block, or trustlint. trustlint is a sensitivity check the rules decided with no model. hybrid is the paid injection check, and the wider review when it is on. The llm key stays for older rows. On a paid plan, when only the injection check ran, the model name is that check's model. When the wider review also ran, the name is the account model. The counts and latencies in this example are the field shape, not a live reading.
Errors
400: invalidhoursvalue (must be 24, 168, or 720)401: invalid or missing API key
/v1/metrics/summary?hours=24
The public trust snapshot plus the full per-tenant stats (engine paths, violations, latency) in one call, for buyer and auditor reviews. API key required.
Response 200 (excerpt)
{
"tenant_id": "uuid-v4",
"plan": "enterprise_gpai",
"time_window_hours": 24,
"trust": {
"enforcement_active": true,
"checks_24h": 42,
"articles_enforced": ["Article 5", "Article 50"],
"last_decision_at": "2026-04-17T12:00:00Z",
"display_name": "Acme Corp"
},
"calls_total": 42,
"violations_prevented": 3,
"violation_rate": 7.14,
"block_rate": 7.14,
"engine_path_counts": { "opa": 35, "hybrid": 7, "trustlint": 0 },
"top_violations": [{ "rule_id": "rego-art5-1c-001", "count": 2 }],
"latency_avg_ms": 24,
"latency_p95_ms": 51
}
/v1/public/trust/{slug}
Public
Public-safe enforcement stats behind the AI Trust Center and the Enforcement Seal. No API key. Tenant must opt in via PATCH /v1/tenant/trust. Returns 404 if slug is unknown or not enabled.
Response 200
{
"enforcement_active": true,
"checks_24h": 42,
"checks_30d": 128,
"eu_checks_24h": null,
"eu_checks_30d": 96,
"articles_enforced": ["Article 5", "Article 50"],
"articles_screened": ["Article 4", "Article 5", "Article 50", "Article 53"],
"frameworks_screened": ["EU AI Act", "GDPR"],
"display_name": "Acme Corp",
"website_url": "https://example.com",
"trust_json_url": "https://eu.api.complyedge.io/v1/public/trust/ivd",
"badge_svg_url": "https://eu.api.complyedge.io/v1/public/badge/ivd.svg"
}
eu_checks_24h and eu_checks_30d count the checks in the last 24 hours and 30 days that ran with jurisdiction EU. They are a subset of checks_24h and checks_30d. The seal names the EU AI Act only when they are above zero; the data region of your account plays no part.
A count is exact when it is 0 or at least 25. From 1 to 24 it is null: there was activity, and the exact number stays private, the same as on the trust page and the seal.
No tenant_id, email, plaintext, or time of any single check. Cached max-age=300. Rate-limited per IP. See the Enforcement Seal embed guide.
/v1/public/badge/{slug}.svg
Public
Embeddable ComplyEdge Enforcement Seal: coral hex glyph (logo mark) + live status dot + status labels such as EU AI Act · Enforced (when your checks ran under jurisdiction EU) or Enforced. Same trust snapshot as JSON.
- Green: checks in last 24h (
#10b981) - Amber: activity in last 30d, quiet last 24h (
#f59e0b) - Red: no audit activity in 30d (
#ef4444)
Returns 404 if slug unknown or trust not enabled. Cache-Control: public, max-age=300. Embed guide →
/v1/tenant/trust
Read trust configuration and embed URLs for the authenticated tenant.
{
"public_slug": "ivd",
"trust_public_enabled": true,
"display_name": "IVD Framework",
"website_url": "https://ivdframework.dev",
"trust_json_url": "https://api.complyedge.io/v1/public/trust/ivd",
"badge_svg_url": "https://api.complyedge.io/v1/public/badge/ivd.svg",
"preview_slug": "ivd",
"embed_badge_svg_url": "https://api.complyedge.io/v1/public/badge/ivd.svg"
}
trust_json_url,badge_svg_url:nulluntil the page is published.suggested_website_url:https://plus the company domain of your sign-in email, used while no website was ever saved;nullfor shared mailbox providers such as gmail.com, and once a website was removed.preview_slug,embed_badge_svg_url: set even while unpublished, so the embed snippet can be copied before going live.
This is a live tenant, not a placeholder: both public URLs above resolve right now.
/v1/tenant/trust
Publish or update the public trust surface (AI Trust Center page and Enforcement Seal) for your tenant. Every field is optional; only the fields sent change. Slug must be unique (1-64 lowercase letters, numbers or hyphens, starting and ending with a letter or number). display_name is the tenant's company name, the same one shown in the dashboard profile: setting it here renames the tenant everywhere; a blank name is refused. Send website_url as "" to remove the website. Publishing when no website was ever saved stores the suggested one.
{
"public_slug": "acme",
"trust_public_enabled": true,
"display_name": "Acme Corp",
"website_url": "https://acme.example"
}
Account
/v1/account/api-keys
List API keys for the authenticated tenant (JWT session). Each key carries a non-secret id for revocation plus its prefix and suffix; the value itself is shown once at creation and is not returned here for keys issued since that change.
Auth note: This endpoint uses a JWT session token (issued at login), not a Bearer API key. Pass it the same way: Authorization: Bearer <session_token>.
Response 200
{
"keys": [
{
"id": "k_9f3c2a71",
"key": "",
"key_prefix": "ce_a1b2c3d4e",
"key_suffix": "z9y8",
"value_retrievable": false,
"label": "Production",
"created_at": "2026-01-10T12:00:00Z",
"last_used": "2026-04-12T00:15:23Z",
"total_calls": 1247,
"is_active": true
}
]
}
key: always an empty string. A key's value is shown once, when it is created. Identify keys bykey_prefixandkey_suffix.total_calls: the tenant's calls over the last 30 days, repeated on every key.
Errors
401: invalid or expired session token500: internal error retrieving keys
/v1/account/api-keys
Generate an additional API key. The raw key is returned once only: save it immediately. Existing keys keep working. To rotate without downtime: create, switch your integration to the new key, then revoke the old one. The dashboard's Rotate key runs that sequence for you and asks about the previous key inside the reveal.
Auth note: Bearer API key or dashboard session JWT. Same as revoke.
Request body
{ "name": "CI/CD key" }
Response 200
{
"api_key": "ce_newkeyvalue_shown_once",
"id": "k_4d8e1b02",
"key_prefix": "ce_newkeyval",
"key_suffix": "ONCE",
"name": "CI/CD key",
"message": "Save the API key. It will not be shown again."
}
/v1/account/api-keys/{key_id}
Revoke an API key. The key must belong to the authenticated tenant. key_id is the non-secret id from the list endpoint, or the key value itself for SDK and CLI callers.
Auth note: Bearer API key or dashboard session JWT.
Response 200
{ "status": "revoked", "key_id": "k_9f3c2a71" }
When a key value was passed instead of an id, key_id comes back truncated: the full value is never echoed.
Errors
403: cannot revoke another tenant's key404: key not found
/v1/account/usage?start=YYYY-MM-DD&end=YYYY-MM-DD
Daily usage metrics for your tenant within a date range.
Auth note: This endpoint uses a Bearer API key (not a JWT session token). Pass it as: Authorization: Bearer <api_key>.
Response 200
{
"tenant_id": "uuid-v4",
"start": "2026-04-01",
"end": "2026-04-12",
"total_calls": 1247,
"total_violations": 18,
"daily": [
{ "date": "2026-04-01", "total_calls": 102, "violations_detected": 2 },
{ "date": "2026-04-02", "total_calls": 98, "violations_detected": 1 }
]
}
Audit
/v1/audit/events
Retrieve compliance audit events for your tenant, newest first.
Query parameters
limit: max events (default 100, max 1000)offset: pagination offset (default 0)start_date: ISO 8601 date filter (inclusive, from 00:00:00 UTC)end_date: ISO 8601 date filter (inclusive, through 23:59:59 UTC)agent_id: filter by agent identifierallowed: filter by outcome:trueorfalse
Example request
curl -s "https://eu.api.complyedge.io/v1/audit/events?limit=10&allowed=false" \
-H "Authorization: Bearer ce_eu_your_api_key"
Response 200
{
"events": [
{
"event_id": "uuid-v4",
"timestamp": "2026-04-12T14:23:01Z",
"allowed": false,
"jurisdiction": "EU",
"violations": [{
"rule_id": "rego-art5-1c-001",
"rule_description": "Regulation (EU) 2024/1689, Article 5(1)(c): the placing on the market, the putting into service or the use of AI systems for the evaluation or classification of natural persons or groups of persons over a certain period of time based on their social behaviour or known, inferred or predicted personal or personality characteristics, with the social score leading to either or both of the following: (i) detrimental or unfavourable treatment of certain natural persons or groups of persons in social contexts that are unrelated to the contexts in which the data was originally generated or collected; (ii) detrimental or unfavourable treatment of certain natural persons or groups of persons that is unjustified or disproportionate to their social behaviour or its gravity;",
"severity": "critical",
"reason": "Remove any social scoring, citizen ranking, or behaviour-based classification that leads to detrimental treatment outside the original data context.",
"confidence": 1.0
}],
"latency_ms": 91,
"agent_id": "bot-1"
}
],
"total": 1,
"limit": 10,
"offset": 0
}
total is the count of events in the current response page, not the full record count. Use offset to paginate.
Errors
401: invalid API key422: invalid query parameters
/v1/audit/violations
Retrieve only violation events, optionally filtered by user ID or role. Useful for compliance investigations.
Query parameters
user_id: filter by one user. Send the identifier as you send it incontext, or its storedp1:pseudonym; ComplyEdge pseudonymises it with your account's key before comparing.user_role: filter by role (e.g.financial_analyst)limit: max results (default 100, max 1000)
Response 200
{
"violations": [ /* same shape as audit/events items */ ],
"total_count": 5,
"filters": { "user_id": "ref_5d81e2c4", "user_role": null }
}
/v1/audit/user-analytics
Calls and violations by role. There is no per-person ranking: a list of which employees break rules most is the per-person monitoring that works councils and data protection officers refuse. To look at one person on purpose, use GET /v1/audit/violations?user_id=.
Response 200
{
"user_roles": [
{ "user_role": "financial_analyst", "total_calls": 240, "violations": 12, "violation_rate": 0.05 }
],
"total_violations": 18,
"unique_violating_users": 3,
"unique_violating_roles": 2,
"role_violations": {
"financial_analyst": { "violations": 12, "unique_users": 3 }
},
"deprecations": [
{ "field": "user_violations", "status": "removed", "replacement": "user_roles for risk by role; /v1/audit/violations?user_id= for one person" },
{ "field": "role_violations", "status": "deprecated", "replacement": "user_roles" }
]
}
user_violations was removed in this release. role_violations stays for one release; read user_roles.
/v1/audit/legal-hold
Enterprise
Place or lift a legal hold over a range of your write-time chain (ADCR REC-19). Writes one legal_hold record; covered sequence numbers keep DynamoDB TTL off until the hold is lifted.
POST /v1/audit/legal-hold
{ "action": "placed", "hold_id": "hold:litigation-1", "from_seq": 1, "to_seq": 40, "reason_code": "litigation.reasonably_anticipated" }
200
{ "event_id": "uuid-v4", "event_type": "legal_hold" }
/v1/audit/contest
Enterprise
Record a person's request for human intervention, to express a view, for an explanation, for a correction or to contest a decision (ADCR RGT-03). request_kind is human_intervention, express_view, contest, explanation, correction or review. requested_at is when the person asked: the one-month deadline runs from it. agent_id and deciding_system.version are read from the decision when left out. The same decision_ref, request_kind and requested_at sent again returns the stored request's id with already_recorded: true, so a retry is safe. decision_ref is an id: no spaces, no email address, no credential. The response's event_id is the request id. How and why to record appeals, with the law quoted.
POST /v1/audit/contest
{ "decision_ref": "uuid-of-decision", "request_kind": "contest",
"requested_at": "2026-10-16T12:00:00Z" }
200
{ "event_id": "uuid-of-request", "event_type": "contest", "already_recorded": false }
Errors
403plan without rights records (Enterprise)422a time more than five minutes in the future, a reference that is not an id,decision_facts_missing(decision not found and noagent_idand version sent),decision_facts_mismatch(theagent_idsent did not make the decision) ordecision_ref_not_a_decision(an appeal's id sent as the decision). The message names the field; do not retry as is.503not written or read; retry.review_not_recordedmeans retrying will not help.
/v1/audit/reviews/{request_id}/answer
Enterprise
Answer a request by the event_id its POST /v1/audit/contest call returned. The decision, kind and time are read from the request. review_outcome is upheld, rectified, withdrawn, refused or extended; extended records that the person was told the answer needs more time and leaves the request open. responded_at defaults to the time of the call and cannot be in the future; rectified_at is required when the outcome is rectified and refused otherwise. statement_ref and reviewer are ids, such as ticket:88190 and staff:4471; the reviewer is stored as a keyed pseudonym. The same answer sent twice, every field equal, is recorded once (already_recorded: true, event_id: null). How to record your answer.
POST /v1/audit/reviews/uuid-of-request/answer
{ "review_outcome": "upheld", "statement_ref": "ticket:88190",
"reviewer": "staff:4471" }
200
{ "event_id": "uuid-v4", "event_type": "contest",
"request_id": "uuid-of-request", "already_recorded": false }
Errors
403plan without rights records (Enterprise)404no request with that id on your account422a time in the future,responded_atbefore the request,rectified_atmissing or not allowed, or a reference that is not an id. The message names the field; do not retry as is.503not written or read; retry.review_not_recordedmeans retrying will not help.
/v1/audit/reviews
Enterprise
Your recorded requests, each paired with its answer. status is open (default, oldest first), answered or all; late requests come first. due_at is the end of the last day to answer (UTC): one month to the same date, the last day of a shorter month, a Saturday or Sunday moved to Monday, three months after an extension sent within the first month; null for review, whose law sets its own date. answer_due_at is the date the recorded answer was measured against (a refusal: one month). answers and extensions list every answer and extension, oldest first; each extension has in_time, true when it was sent within the first month (null for review). answer and extension are the ones recorded last. answered_late is judged on the first answer, so a later correction does not change it. When the answer is due.
GET /v1/audit/reviews?status=open
200
{ "status": "open", "count": 1, "reviews": [
{ "request_id": "uuid-of-request", "decision_ref": "uuid-of-decision",
"request_kind": "contest", "requested_at": "2026-10-16T12:00:00Z",
"recorded_at": "2026-10-16T12:00:01Z", "agent_id": "assistant-hr",
"deciding_system_version": "2026.10.1", "status": "open",
"answer": null, "extension": null, "answers": [], "extensions": [],
"due_at": "2026-11-16T23:59:59Z", "answer_due_at": null,
"extended_in_time": false, "late": false, "answered_late": false } ] }
/v1/audit/reviews/{request_id}
Enterprise
One request, with the decision it is about: { "review": {...}, "decision": {...}, "decision_missing": false }. decision is null when it is older than your retention. Unknown id: 404.
/v1/audit/notice
Enterprise
Record that a notice, explanation or statement of reasons was issued to the person (ADCR RGT-07). The body holds references and language, never the notice text.
POST /v1/audit/notice
{ "agent_id": "assistant-hr", "deciding_system": { "version": "2026.10.1" },
"notice_kind": "explanation", "decision_ref": "uuid-of-decision",
"channel_ref": "portal:messages", "language": "en",
"issued_at": "2026-10-16T12:30:00Z", "statement_ref": "statement:expl-1" }
200
{ "event_id": "uuid-v4", "event_type": "notice" }
/v1/audit/incident
Enterprise
Record a risk, substantial modification, serious incident or suspension for a deciding system (ADCR RGT-06).
POST /v1/audit/incident
{ "agent_id": "assistant-hr", "deciding_system": { "version": "2026.10.1" },
"incident_kind": "serious_incident",
"detected_at": "2026-10-16T08:00:00Z", "reported_at": "2026-10-16T09:00:00Z",
"report_ref": "report:2026-001" }
200
{ "event_id": "uuid-v4", "event_type": "incident" }
/v1/audit/opt-out
Enterprise
Record that a lawful user opt-out suppressed recording (ADCR REC-18).
POST /v1/audit/opt-out
{ "agent_id": "assistant-hr", "deciding_system": { "version": "2026.10.1" },
"decision_ref": "uuid-of-decision", "reason_code": "lawful_opt_out" }
200
{ "event_id": "uuid-v4", "event_type": "opt_out" }
/v1/audit/classification
Enterprise
Record an Article 6(3)/(4) high-risk classification assessment (ADCR REC-17). The body holds the result and a reference to your assessment, never the assessment text.
POST /v1/audit/classification
{ "agent_id": "assistant-hr", "deciding_system": { "version": "2026.10.1" },
"classification_result": "not_high_risk",
"assessment_ref": "assessment:art6-3-2026" }
200
{ "event_id": "uuid-v4", "event_type": "classification" }
/v1/audit/fallback
Enterprise
Record that a check was skipped, degraded or replaced by a fallback as its own chain row (ADCR REC-18). A fallback object may still appear on a decision record instead.
POST /v1/audit/fallback
{ "agent_id": "assistant-hr", "deciding_system": { "version": "2026.10.1" },
"kind": "skipped", "reason_code": "engine_unavailable" }
200
{ "event_id": "uuid-v4", "event_type": "fallback" }
/v1/audit/verify
Check that a record is about exactly this text, or this preserved conversation. The record's hash is keyed with your account's key, which never leaves ComplyEdge, so the comparison runs here. What you send is used for this request only: it is not stored and not logged.
This is how you match a record to your own copy of the prompt or answer in an audit or a complaint; How audit reconciliation works walks through it end to end.
Request body
event_id: required. The record to check.text: the text, for a check record.conversation: the turns, eachrole,textandsent_at, for a preserved conversation. Send exactly one oftextandconversation. A preservation record checked with text, or a check record checked with a conversation, returns422.timestamp: optional. The record'stimestamp, as the preservation call returned it. With it the record is read by its exact key.
POST /v1/audit/verify
{ "event_id": "uuid-v4", "text": "Score users based on their social behavior" }
200
{ "event_id": "uuid-v4", "match": true, "text_hash_alg": "hmac-sha256-1" }
A preserved conversation
{
"event_id": "fd39ec97-d496-49ce-872a-844303bea233",
"conversation": [
{
"role": "user",
"text": "I don't see the point anymore. I keep thinking about ending it.",
"sent_at": "2026-11-15T01:04:41Z"
}
],
"timestamp": "2026-11-15T01:04:44.332145+00:00"
}
Response 200
{
"event_id": "fd39ec97-d496-49ce-872a-844303bea233",
"match": true,
"commitment_alg": "hmac-sha256-1"
}
A check record answers with text_hash_alg, a preservation record with commitment_alg. The conversation is put in one canonical form before it is compared, so different JSON whitespace, key order or Unicode normal form in your copy still matches.
404: no record with thatevent_idin your accountmatch: falsealso when the account's key was destroyed (crypto-shred): that is what destroying it is for. The response then carrieskey_shredded_at(ISO 8601), so a destroyed key is never mistaken for a different text, and an export of that account names the same date inaudit_key_shredded_at
/v1/audit/pseudonym
The stored form of one identifier, to find one person's records in an export. Computed with your account's key; the key is never returned.
POST /v1/audit/pseudonym
{ "field": "user_id", "value": "ref_5d81e2c4" }
200
{ "field": "user_id", "pseudonym": "p1:9c2e41d07a5b3f68e1c04d92b7a6f315" }
field:user_idorsession_id409: the account has no audit key yet (no record written since this release) or its key was destroyed
/v1/audit/export
Audit trail export as structured JSON: every compliance event in a date range. Each event carries a statute citation when a phrase rule or the injection check fires. A wider-review block does not cite an article. It also carries an art12_purposes linkage naming which Article 12(2) record-keeping purpose(s) the entry is shaped for (Art. 12 high-risk duties bind from Dec 2027: readiness field, not a live mandate claim). Every plan can download its own records. Every plan's records carry the write-time hash chain (chain_seq, chain_prev, chain_hash on every chained record). The Enterprise evidence pack adds the timestamp anchors, the export-time chain_head, and the evidence-completeness attestation.
Plan behaviour
Every record, on every plan, is written into its account's hash chain and carries the chain_ fields it was written with (chain_seq, chain_prev, chain_hash, chain_alg, chain_status). Free and Developer exports stop there, with attestation: "none". Enterprise receives the evidence pack described below. Response also includes retention_days and retention_note.
Query parameters
start_date: required. YYYY-MM-DD, inclusive (from 00:00:00 UTC), or an ISO 8601 instant with offset, such as2026-04-01T00:00:00-03:00for your local midnight.end_date: required. YYYY-MM-DD, inclusive (through 23:59:59 UTC). Same day asstart_datereturns that full day. An ISO 8601 instant is used as given. A start after the end returns400.format: optional.complyedge(default), the shape below, oradcr: the same records as an ADCR export, on every plan; the timestamps over the chain are included on Enterprise. See ADCR format. Orpdf: withuser_idorsession_id, the session file as a PDF. With either filter,adcrreturns422.user_id: optional. Companion chatbots: one user's records. Your own id; it is matched under your account's key.session_id: optional. Companion chatbots: one session's records. Send at most one of the two.use_case: optional.companion_chatbot, withuser_idorsession_id. Without one of them,format=pdfanduse_casereturn422.
Companion chatbots: one session or one user
With user_id or session_id, the export is the session file, limited to the date range: the same document as GET /v1/companion/session, with envelope, intervals and records. Its envelope carries:
subset: true. The file holds part of your chain, not all of it.chain_check:per_row. Each row is checked on its own: itschain_hashrecomputed from its content and itschain_prev. Gaps between rows are expected.export_id: names the filters, the period and the newest row. The same request over the same rows gives the same id.content_sha256: the SHA-256 of the file's content, without the times it was made. The PDF carries both values on every page.
Response 200 (companion filter, part)
{
"envelope": {
"export_id": "4e081944ba0b29104c562dd22047df30bd919d7404e795d9fc9cef1221b30407",
"content_sha256": "96f926308723b0e4df9c7b086026b3b4a541232cf8e8729dbf8f5d164823243b",
"subset": true,
"chain_check": "per_row",
"tenant_id": "5f0c2a9e-4b1d-4c3e-9a7f-2d6b8e1c0a41",
"tenant_name": "Example Companion Inc",
"filter": {
"session_id": "p1:53c6f0ad0dbd938b65b1be2bb0a4ae0e"
},
"period": {
"from": "2026-11-15T01:04:41.441518+00:00",
"to": "2026-11-15T01:04:44.016449+00:00"
},
"generated_at": "2026-11-15T01:04:44.268498Z"
}
}
To show nothing is missing around those rows, export the full period too. How to check both.
Response 200
{
"tenant_id": "uuid-v4",
"plan": "enterprise_gpai",
"start_date": "2026-04-01",
"end_date": "2026-04-30",
"total_events": 1247,
"events": [
{
"event_id": "evt_…",
"timestamp": "2026-04-17T12:00:00Z",
"text_hash": "64-char-hex-hmac-sha256",
"text_hash_alg": "hmac-sha256-1",
"allowed": false,
"art12_purposes": [
{"ref": "Article 12(2)(a)", "purpose": "identifying situations that may result in the AI system presenting a risk…"},
{"ref": "Article 12(2)(b)", "purpose": "facilitating the post-market monitoring referred to in Article 72"},
{"ref": "Article 12(2)(c)", "purpose": "monitoring the operation of high-risk AI systems referred to in Article 26(5)"}
],
"chain_seq": 1247,
"chain_prev": "64-char-hex-sha256",
"chain_hash": "64-char-hex-sha256",
"chain_alg": "sha256-chain-1",
"chain_status": "chained",
"chain_link": "64-char-hex-sha256"
}
],
"write_time_chain": {
"algorithm": "sha256-chain-1",
"chained_rows": 1247,
"pre_chain_rows": 0,
"first_seq": 1,
"last_seq": 1247,
"chain_since": "2026-04-01T00:00:03Z"
},
"anchors": [
{
"statement": "{\"account_id\":\"uuid-v4\",\"chain_alg\":\"sha256-chain-1\",\"chain_hash\":\"64-char-hex-sha256\",\"chain_seq\":1247}",
"statement_sha256": "64-char-hex-sha256",
"chain_seq": 1247,
"tsa_name": "name of the qualified TSA",
"token_der_b64": "base64 RFC 3161 TimeStampResp",
"anchored_at": "2026-04-30T23:00:12Z"
}
],
"anchor_coverage": {"anchors_in_file": 30, "anchored_through_seq": 1247, "newest_anchor_seq": 1247, "unanchored_rows": 0},
"chain_head": "64-char-hex-sha256",
"chain_algorithm": "sha256-v1",
"evidence_completeness": {
"required_fields": ["text_hash", "agent_id", "timestamp"],
"complete": 1247,
"incomplete": 0
},
"retention_days": 184,
"retention_note": "Records expire at retention_days after they are written. A range that predates the retention window returns no events; that is expiry, not absence of activity.",
"export_note": "Input text stored only as a keyed HMAC-SHA-256 (text_hash_alg; records without it are plain SHA-256): plaintext never persisted."
}
Enterprise evidence-pack shape above. Free/Developer omit chain_head, chain_link, write_time_chain, anchors and evidence_completeness (the records keep their chain_ fields, as above), and set attestation to "none".
Sample file: /docs/sample-audit-export.json. It is 23 records from an August 2026 run, with the tenant, key and user identifiers redacted, in the format used before this release: text_hash is a plain SHA-256 with no text_hash_alg, and it carries only the export-time chain (chain_link, chain_head), with no write-time chain fields, anchors or completeness block. verify_audit_export_chain() returns true on it, and python -m audit_export verify reports its 23 rows as pre_chain with the verdict unverified, which is the correct answer for records older than the chain. It will be replaced by a sample in the current format once one exists.
ADCR format (format=adcr)
One JSON document, {"envelope": {...}, "records": [...]}, as the ADCR Rulebook defines it (EXP-01). Each record is the stored row as an ADCR record, the exact bytes its chain hash covers, with its chain object (seq, prev, hash, alg), or chain_status: "pre_chain" when it was written before the chain existed. The envelope carries the period, the clock and its tolerance, the chain summary and anchor_coverage; on Enterprise it also carries a completeness attestation, and the timestamps inside the range with their tokens. Without timestamps the verifier still checks every record and link, reports no_anchor and returns unverified. How each field is filled is on the producer profile. Check the file offline with the Rulebook's reference verifier: python3 -I conformance/adcr_verify.py export.json --trust-anchors anchors.pem.
Write-time verification (sha256-chain-1)
Every record is appended to its tenant's chain as it is written: chain_seq counts from 1 with no gaps, chain_prev is the previous record's hash, and chain_hash = SHA-256(chain_prev + JCS(record)), where the record is the row as an ADCR record (0.2.0 for new records, 0.1.0 for rows written before the version was stored) without its chain fields and JCS is the RFC 8785 canonical form (ADCR CHN-02). The chain is written in the same transaction as the record: if it cannot be written, neither is the record. Once an hour, for every account whose chain moved, the newest chain_seq and chain_hash are sent, with no record content, to the RFC 3161 timestamp authority the service is configured with, and the signed token is stored under S3 Object Lock in COMPLIANCE mode. The hourly job has run in both regions since 22 October 2026. An export whose range has no anchor still reports no_anchor with the verdict unverified, while still checking every chain link. Each anchor names its provider in tsa_name, so you can check its status on the EU Trusted List yourself; a qualified electronic time stamp carries a presumption of accuracy of the date and time and of the integrity of the data under eIDAS Article 41(2). When anchors exist, the export carries them inside its range, and anchor_coverage states how far they reach. A failed anchor never blocks a decision or an export; records newer than the newest anchor are reported as unanchored_tail, not as verified.
- Recompute each record's
chain_hash; a mismatch is an edit. Checkchain_seqis dense; a gap is a removed record; a duplicate or achain_prevthat is not the previous hash is an insertion or reorder. - For each anchor, check its
statementnames the hash the export carries at thatchain_seq, then check the RFC 3161 token covers SHA-256(statement) and is signed by the provider (its root certificate, not ours). - Records labelled
chain_status: "pre_chain"predate the chain and are reported, never claimed.
Offline, with no ComplyEdge credentials: python -m audit_export verify export.json --tsa-root provider-certificate.pem, run from services/api in the open-source repository where audit_export.py lives, prints every finding on its own axis (hash_mismatch, sequence_gap, link_break, truncated_tail, anchor_mismatch, anchor_token_signature_invalid, pre_chain, unanchored_tail) and exits 0 verified, 1 failed, 2 unverified. The signature check runs openssl ts -verify (OpenSSL 1.1 or later) against the provider certificate you pass, taken from the EU Trusted List, at the time the token was issued; everything else is the standard library. Without a usable openssl the verdict is unverified, never failed. Certificate revocation is not checked.
Export-time chain (sha256-v1, still present)
Each event also includes a chain_link computed when the file is built, in chronological order. It shows the file was not altered after export; the write-time chain above is what shows the store was not altered before it:
- Sort events by
timestamp, thenevent_id. - Genesis hash is empty string; for each event:
chain_link = SHA-256(prev_link + canonical_json(event))(sorted keys, no whitespace). chain_headis the final link. Recompute and compare: any altered, removed, or reordered event breaks the chain.
Reimplement these three steps in your compliance toolchain, or run verify_audit_export_chain() from the open-source audit_export.py on GitHub.
Assessment
/v1/assessment/pre-deployment
Assess an AI system configuration against EU AI Act requirements before deployment. Returns a risk tier, compliance score, and specific gaps to address.
Request body
{
"system_prompt": "You are a financial advisor assistant...",
"model_config": {
"provider": "openai",
"model_id": "gpt-4o",
"temperature": 0.7
},
"agent_pipeline": {
"tools": ["web_search", "code_executor"],
"memory": true,
"autonomy_level": "full",
"human_oversight": false
},
"jurisdiction": "EU"
}
Response 200
{
"compliance_score": 0.72,
"risk_tier": "high",
"violations": [
{
"rule_id": "assess-pipeline-001",
"article": "Article 14",
"description": "High-autonomy AI system without human oversight mechanism",
"required_action": "Implement human oversight per Article 14. High-risk AI systems must allow human intervention."
}
],
"required_disclosures": [
"AI system must identify itself as AI to end users"
],
"eu_ai_act_category": "essential-services",
"estimated_deadline": "2027-12-02"
}
eu_ai_act_category is the matched Annex III category slug (one of biometric-identification, critical-infrastructure, education-vocational, employment-workers, essential-services, law-enforcement, migration-asylum, justice-democracy). An unacceptable tier returns prohibited, and where no category matches it returns general-purpose.
estimated_deadline is the date the obligations for that category apply from. Annex III high-risk categories return 2 December 2027, since Regulation (EU) 2026/1744 postponed the Chapter III high-risk regime from 2 August 2026 (that superseded date is literal on purpose: it is legislative history, not a live milestone). An unacceptable tier returns 2 February 2025, the date the Article 5 prohibitions took effect. A minimal tier returns an empty string.
/v1/assessment/gpai-training
Enterprise
Article 53 GPAI model documentation check. Checks the details a general-purpose AI model provider must document under Article 53 (data sources, copyright policy, data cutoff) and returns each gap. It is an API check, not a service.
Enterprise plan required
This endpoint returns a 402 on free or developer plans. Upgrade to Enterprise to enable it on your account.
Request body
{
"model_name": "my-foundation-model",
"provider": "internal",
"version": "1.0",
"training_data_sources": ["web_crawl", "licensed_books"],
"open_source": false,
"systemic_risk": true,
"jurisdictions": ["EU"]
}
model_name: required.provider: required.- All other fields optional.
Response 200
{
"art53_compliance_status": "non-compliant",
"applicable_obligations": ["53(1)(a)", "53(1)(b)", "53(1)(c)", "53(1)(d)"],
"open_source_exemption_applied": false,
"systemic_risk_strips_exemption": false,
"training_summary_checklist": [
{
"field": "model_identification",
"present": true,
"value": "my-foundation-model v1.0 by internal",
"gap": null,
"required_for": ["53(1)(a)", "53(1)(d)"]
},
{
"field": "data_sources",
"present": true,
"value": "2 source(s)",
"gap": null,
"required_for": ["53(1)(d)"]
},
{
"field": "copyright_compliance",
"present": false,
"value": null,
"gap": "Document the copyright compliance policy: how Article 4(3) opt-outs are detected and honoured.",
"required_for": ["53(1)(d)"]
}
],
"gaps_count": 3,
"estimated_documentation_effort_hours": 10,
"penalty_exposure": "Up to EUR 15,000,000 or 3% of total worldwide annual turnover, whichever is higher (EU AI Act Article 101).",
"ai_office_template_status": "Aligned to Commission Template Sections 1-3 (C(2025) 5235 final, 24 Jul 2025). Maps assessable API input fields to the mandatory Art 53(1)(d) public summary structure.",
"ai_office_template_source": "Commission C(2025) 5235 final (24 Jul 2025)",
"rule_id": "EU_AI_ACT_ART53_GPAI_TRAINING_SUMMARY_001",
"citation": "EU AI Act Article 53(1)(d), Regulation (EU) 2024/1689"
}
Errors
402: enterprise plan required422: missingmodel_nameorprovider
Sensitivity
/v1/sensitivity/detect
Proactive sensitivity detection for user input: analyzes text before it reaches the model. Detects PII, regulated data, and compliance-sensitive patterns, and returns an intervention action with guidance. The deterministic TrustLint rules always run. They do not run OPA. A model runs only on a paid plan when the account's wider legal review is on and the month's model budget covers it, and only after those rules come back clean. If that budget is used up, it does not run. Otherwise the answer is the TrustLint verdict. The TypeScript SDK calls this through ce.detectSensitivity(). It does write an audit record, attributed from context.user_id, user_role and session_id. Use POST /v1/check (SDK ce.check()) for the hosted check against AI laws. Phrase rules always run. On a paid plan the injection check can also block when the month's model budget covers it.
Request body
{
"input_text": "My SSN is 123-45-6789 and I need a loan",
"agent_id": "loan-assistant-v2",
"context": {
"detected_age": null,
"interaction_type": "chat",
"platform_type": "financial",
"user_jurisdiction": "EU",
"user_id": "cust_42",
"user_role": "customer",
"session_id": "conv_abc"
},
"conversation_history": [
{ "role": "user", "content": "I need help with my application" }
]
}
input_text: required. Max 10,000 characters.agent_id: optional. Defaults tonull.context: optional. Platform and user context for richer analysis.user_id,user_roleandsession_idare written on the audit record. Token-shaped values are replaced withredacted:and a hash.conversation_history: optional. Prior turns for progressive risk scoring.
Response 200
{
"event_id": "uuid-v4",
"detections": [
{
"data_type": "government_id",
"confidence": 0.98,
"regulation": "GDPR",
"excerpt": "123-45-6789",
"risk_level": "critical"
}
],
"overall_risk_score": 0.91,
"applicable_regulations": ["GDPR", "EU AI Act"],
"progressive_risk_score": 0.94,
"detection_method": "trustlint",
"intervention": {
"action": "BLOCK",
"message": "This input contains sensitive personal data that cannot be processed.",
"alternatives": [
{
"message": "Please describe your situation without including personal identifiers.",
"explanation": "Removing the government ID protects your privacy and avoids processing the identifier."
}
],
"allow_override": false,
"compliance_requirements": ["GDPR Art. 9: sensitive data prohibition"]
},
"processing_time_ms": 142
}
intervention.action: one of:ALLOW,WARN,WARN_AND_BLOCK,BLOCK,REQUIRE_PARENTAL_CONSENT,REDIRECT_SECURE_CHANNEL,PROGRESSIVE_WARNING.intervention: may benullwhen action isALLOW.
Errors
401: invalid or missing API key429: rate limit exceeded (shared daily counter with/v1/check)422: invalid request body
Companion chatbots
For an AI companion app with users in California, New York, Washington or Oregon. Send each user message and each reply to POST /v1/check with use_case companion_chatbot. The answer lists what the state laws require your app to do for that message. Your app does it, then records each notice it showed with POST /v1/companion/action. Every endpoint here works on every plan, except the audit pack. The chatbot laws guide walks through one session.
/v1/check
use_case=companion_chatbot
The check endpoint, with three extra inputs. On a paid plan a model reads the message for meaning (the labels below), then the state rules turn the labels, the date, the user's age and the session's timing into actions. Send direction prompt for the user's message and output for your chatbot's reply, before you show it. A block_reply action also sets allowed to false and adds a violation, so do not send that reply.
Companion inputs
use_case:companion_chatbot.direction: required on a companion check, sent explicitly. Without it the answer isnot_assessedwith reasonno_direction.companion_user_message: optional, at most 12,000 characters, on a reply check only (directionoutput). The user's last message before this reply, so the check can see what the reply answers: a user saying goodbye, or asking for a product. It is used as context only, never labelled, never stored and never hashed; the record shows onlycompanion_user_message_sent. Sent on any other check, it returns422.jurisdiction:US-CA,US-NY,US-WA,US-OR.
Context keys
session_id: required. Your id for the conversation. Stored as a keyed pseudonym. Without it the answer isnot_assessedwith reasonno_session, and only the actions that need no timing come back.user_id: optional, recommended. Your id for the user. Stored as a keyed pseudonym. New York's once-a-day notice is tracked per user.age_status: what you know about the user's age:adult,known_minor,child,reason_to_believe_minor,treated_as_child,unknown. Missing or unknown values read asunknown, never as an adult. Minor duties useknown_minorandchild; Oregon addsreason_to_believe_minor; California's child duties addtreated_as_child, and from 2027-07-01 alsounknownandreason_to_believe_minor: California treats a user as a child unless you know they are an adult.age_source: how you know it:os_signal,sb976_fallback,self_declared,operator_known,age_assurance,none. New York treats a user as an adult only withadultandage_assurance.session_started_at: ISO 8601 time the session started. Notices due at the start, and the time limits, count from it. Left out, it is the time of the session's first check.is_session_start: true on the first message of a session.minutes_today: minutes the user has spent in the app today. California's child daily limit reads it.referrals_this_session: crisis referrals already shown in this session. Oregon asks for more help after the first.parent_linked: true when the user's account is linked to a parent's account.parent_changed_time_limit: true when a linked parent changed the default time limit.under_25: true when the user is under 25. Oregon then allows a youth line referral.directed_to_minors: true when your chatbot is aimed at minors. Washington then treats every user as a minor.uses_prior_personal_memory: true when the reply uses personal information from more than 12 hours ago or an earlier session. New York reads it.fda_regulated_device: true when your chatbot is an FDA-regulated medical device. One California child rule then does not apply.parent_changed_memory_default: true when a linked parent turned earlier personal memory back on for a known child. California's memory default then stops.parent_changed_push_default: true when a linked parent turned push notifications back on for a known child.child_16_plus: true when the child is 16 or 17. Withmemory_risk_guardrails, California lets earlier personal memory stay on.memory_risk_guardrails: true when your memory feature runs the risk guardrails California requires for a child of 16 or older.parent_disabled_access: true when a parent used your control that turns off a child's access. California then blocks every reply.ad_targeting: how an ad in the reply was targeted:none,contextual,chat_personal_info,cross_context. California blocks an ad to a child targeted with chat information or across contexts. Onlycontextuallets the contextual-ad carve-out stop the unlabelled-ad rule. Other values read asunknown.ny_art47_excluded: true when your system is outside New York's "AI companion" definition (customer service only, efficiency, research or technical help, or internal use). New York's Article 47 rules then do not apply. Missing means covered.ny_art48_exempt_purpose: the sole purpose your companion is made available for, when it is one of New York's Article 48 exemptions:customer_service,efficiency_research_technical,internal.internalis exempt on its own; the other two needny_art48_off_purpose_refused.ny_art48_off_purpose_refused: true when your system cannot respond on topics outside that purpose.wa_excluded: true when your system is outside Washington's definition (operational or customer service only with no ongoing relationship, a video game bot, a stand-alone voice assistant, a narrow school tool). Washington's rules then do not apply. Missing means covered.or_excluded: true when your system is outside Oregon's definition (used solely for customer service, care in a facility, education, financial services, business operations, productivity, analysis, internal research or technical help; a video game bot limited to the game; a stand-alone voice assistant). Oregon's rules then do not apply. Missing means covered.
Request body
{
"text": "I don't see the point anymore. I keep thinking about ending it.",
"agent_id": "companion-app",
"jurisdiction": "US-CA",
"direction": "prompt",
"use_case": "companion_chatbot",
"context": {
"session_id": "sess_7f3a91",
"user_id": "user_4821",
"age_status": "adult",
"age_source": "self_declared",
"is_session_start": true,
"session_started_at": "2026-11-15T01:04:41Z",
"minutes_today": 0,
"referrals_this_session": 0
}
}
Response 200 (the companion fields)
{
"event_id": "e057dc8a-9808-4bfb-b07f-8e4c120ea656",
"allowed": true,
"timestamp": "2026-11-15T01:04:41.441518+00:00",
"companion_assessment": "assessed",
"companion_not_assessed_reason": null,
"companion_fallback": false,
"required_actions": [
{
"action": "show_crisis_referral",
"rule_ids": [
"us-ca-22602b-crisis-referral"
],
"jurisdiction": "US-CA",
"reason_code": "ca_22602b_crisis_referral",
"counted": true,
"due_at": "2026-11-15T01:04:41.441518Z",
"interval_key": "bec907030691f7611f2c9e6fb3b8e3f21e275e7ea73e620d50ebe98760bb8786"
},
{
"action": "show_not_human_notice",
"rule_ids": [
"us-ca-22602a-not-human"
],
"jurisdiction": "US-CA",
"reason_code": "ca_22602a_reasonable_person_misled",
"counted": false,
"due_at": "2026-11-15T01:04:41Z",
"interval_key": "d9fd93c42bfc11f90d548421fbf4b23d127a611d8a4e5ad16139a21f69ffd8fc"
}
]
}
The response also carries the usual check fields, including evaluated_rules. Keep event_id and timestamp: confirming an action needs them.
Response fields
companion_assessment:assessedornot_assessed. Not assessed is never a clean pass.companion_not_assessed_reason: why it was not assessed, else null.companion_fallback: true when the actions could not be worked out. Apply your own protocol to this message.required_actions: one entry per action.
Not assessed reasons
plan: the free plan. The meaning check does not run, so nothing in the text is detected.budget: the month's model budget is used up.unavailable: the meaning check or the rules could not run. Also on the 429 and 503 refusals.no_direction: the request did not senddirection.no_session: the context has nosession_id.
Each required action
action: what to do. See the actions table.rule_ids: every rule that asked for it.jurisdiction: the state.reason_code: why, as a code. See the rules table.counted: true when the law requires it here. False when we recommend it but the law requires it only on a condition we cannot see. Only counted actions are due on the Chatbot laws screen.due_at: when it became due.interval_key: names this action in this session and period. Send it back when you confirm.
The same check on the free plan
{
"event_id": "cebf4ec1-120a-47ef-a1ee-1370557b34c7",
"allowed": true,
"timestamp": "2026-11-15T01:04:44.377254+00:00",
"companion_assessment": "not_assessed",
"companion_not_assessed_reason": "plan",
"companion_fallback": false,
"required_actions": [
{
"action": "show_not_human_notice",
"rule_ids": [
"us-ca-22602a-not-human"
],
"jurisdiction": "US-CA",
"reason_code": "ca_22602a_reasonable_person_misled",
"counted": false,
"due_at": "2026-11-15T01:04:41Z",
"interval_key": "21722e981ba14a611cb4a54d687680b99a1ca83f7a8421a5c20d804dd902d62a"
}
]
}
No crisis referral comes back, because nothing read the message. Notices that depend only on time and age still do.
Refusals
A companion check refused for the daily limit (429) or because the plan or the counter could not be read (503, detail.error service_unavailable, with the reason in detail.message) still carries companion_assessment, companion_not_assessed_reason, companion_fallback and required_actions in detail, with the actions that need no reading of the text.
Actions
Each action your app can be asked for, the notice kind it is recorded as, and what to do. Confirm a notice once it is on screen. Three actions are applied in your response and never confirmed. One is recorded through the preservation endpoint.
| Action | Recorded as | What your app does | Then |
|---|---|---|---|
show_crisis_referral | crisis_referral | Show a notice that refers the user to crisis services, such as the 988 Suicide and Crisis Lifeline. | Confirm |
escalate_imminent_risk | imminent_risk_escalation | A child shows a credible and imminent risk: act on it now, under your protocol. | Confirm |
notify_parent_and_child | parent_and_child_notified | Tell the linked parent and the child. | Confirm |
offer_988_connect | connect_988_offered | No linked parent: offer to connect the child to 988. | Confirm |
show_not_human_notice | not_human | Show that the user is talking to an AI, not a person. | Confirm |
show_break_reminder | break_reminder | Remind the user to take a break. | Confirm |
show_child_ai_notice | child_ai_notice | Remind a child that they are talking to an AI. | Confirm |
show_parent_may_be_notified | parent_may_be_notified | Tell a linked child that a parent may be notified about risks to their safety. | Confirm |
child_time_limit_reached | child_time_limit | The child reached the default time limit. Apply your limit. | Confirm |
additional_intervention | additional_intervention | The user keeps expressing self-harm after a referral. Give the further help your protocol sets. | Confirm |
block_reply | none | Do not send this reply. | Apply, never confirm |
disable_prior_personal_memory | none | Do not use earlier personal memory in this reply. | Apply, never confirm |
disable_push_notifications | none | Do not send push notifications to this child. | Apply, never confirm |
preserve_conversation | none | Keep this conversation for 3 years. A parent was notified of a risk to the child, so California requires it. | Record it with POST /v1/companion/preservation, trigger parent_notified |
minors_notice | minors_notice | California's notice that companion chatbots may not be suitable for some minors. No check asks for it: your app shows it once per access format and confirms it on its own. | Confirm, operator only |
Rules
Each rule, the dates it applies, when it asks for an action, and the reason code it sends. A rule outside its dates never fires. "A minor" means known_minor or child; "a child" adds treated_as_child, and in California unknown and reason_to_believe_minor; "an Oregon minor" adds reason_to_believe_minor. Periodic notices are timed from the last one your app confirmed in that session. Carve-out labels (carve_out_abuse_help, carve_out_requested_product, carve_out_contextual_ad) stop the matching California child rules.
| Rule | State | From | Until | When | Action | Reason code | Counted |
|---|---|---|---|---|---|---|---|
us-ca-22602a-not-human | US-CA | 2026-01-01 | no end | Message label user_believes_human, or at the start of a session until a not-human notice is confirmed. Recommended, not counted: the law applies where a reasonable person would be misled. | show_not_human_notice | ca_22602a_reasonable_person_misled | no |
us-ca-22602b-crisis-referral | US-CA | 2026-01-01 | no end | Message label expresses_self_harm. | show_crisis_referral | ca_22602b_crisis_referral | yes |
us-ca-22602b-harmful-reply | US-CA | 2026-01-01 | no end | Reply label promotes_self_harm. | block_reply | ca_22602b_self_harm_content | no |
us-ca-22602c-minor-ai-disclosure | US-CA | 2026-01-01 | 2026-12-31 | A minor, at the start of a session until confirmed. | show_not_human_notice | ca_22602c_minor_ai_disclosure | yes |
us-ca-22602c-minor-break | US-CA | 2026-01-01 | 2026-12-31 | A minor, 3 hours after the last confirmed break reminder. The reminder also says the chatbot is AI and not human. | show_break_reminder | ca_22602c_minor_break_reminder | yes |
us-ca-22602c-minor-sexual | US-CA | 2026-01-01 | 2026-12-31 | A minor, reply label sexual_conduct_directive. | block_reply | ca_22602c_minor_sexual_content | no |
us-ca-21812d1-child-crisis | US-CA | 2027-07-01 | no end | A child, message label expresses_self_harm. | show_crisis_referral | ca_21812d1_child_crisis_referral | yes |
us-ca-21812d1b-imminent | US-CA | 2027-07-01 | no end | A child, message label imminent_risk. Also notify_parent_and_child with parent_linked, otherwise offer_988_connect. Counted: escalate_imminent_risk always, offer_988_connect only without parent_linked, notify_parent_and_child never. | escalate_imminent_risknotify_parent_and_childoffer_988_connect | ca_21812d1b_imminent_threatca_21812d1bi_parent_notifiedca_21812d1bii_988_connect | yes |
us-ca-21812d1c-parent-may-be-notified | US-CA | 2027-07-01 | no end | A child, parent_linked and is_session_start. | show_parent_may_be_notified | ca_21812d1c_parent_may_be_notified | yes |
us-ca-21812d4-child-ai-notice | US-CA | 2027-07-01 | no end | A child, at the start of a session, then 3 hours after the last confirmed one. | show_child_ai_notice | ca_21812d4_child_ai_notice | no |
us-ca-21812d3-child-time | US-CA | 2027-07-01 | no end | A child, the parent did not change the limit, and the session is over 60 minutes or minutes_today is over 120. A limit change counts only for a linked known_minor or child. The daily limit is due at the session start. | child_time_limit_reached | ca_21812d3_default_time_limit | yes |
us-ca-21812d5-behavior-i | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_i. | block_reply | ca_21812d5_behavior_i | no |
us-ca-21812d5-behavior-ii | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_ii. Not when fda_regulated_device. | block_reply | ca_21812d5_behavior_ii | no |
us-ca-21812d5-behavior-iii | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_iii. | block_reply | ca_21812d5_behavior_iii | no |
us-ca-21812d5-behavior-iv | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_iv. | block_reply | ca_21812d5_behavior_iv | no |
us-ca-21812d5-behavior-v | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_v. | block_reply | ca_21812d5_behavior_v | no |
us-ca-21812d5-behavior-vi | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_vi. | block_reply | ca_21812d5_behavior_vi | no |
us-ca-21812d5-behavior-vii | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_vii. | block_reply | ca_21812d5_behavior_vii | no |
us-ca-21812d5-behavior-viii | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_viii. | block_reply | ca_21812d5_behavior_viii | no |
us-ca-21812d5-behavior-ix | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_ix. | block_reply | ca_21812d5_behavior_ix | no |
us-ca-21812d5-behavior-x | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_x. | block_reply | ca_21812d5_behavior_x | no |
us-ca-21812d5-behavior-xi | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_xi. | block_reply | ca_21812d5_behavior_xi | no |
us-ca-21812d5-behavior-xii | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_xii. | block_reply | ca_21812d5_behavior_xii | no |
us-ca-21812d5-behavior-xiii | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_xiii. | block_reply | ca_21812d5_behavior_xiii | no |
us-ca-21812d5-behavior-xiv | US-CA | 2027-07-01 | no end | A child, reply label child_behavior_xiv. | block_reply | ca_21812d5_behavior_xiv | no |
us-ca-21812d2-usage-reminder | US-CA | 2027-07-01 | no end | A child, 3 hours after the last confirmed break reminder. The law sets no interval; 3 hours is our recommended cadence. | show_break_reminder | ca_21812d2_usage_reminder | no |
us-ca-21812d3-memory | US-CA | 2027-07-01 | no end | A child, every check, unless parent_changed_memory_default with parent_linked and a known child, or child_16_plus with memory_risk_guardrails. | disable_prior_personal_memory | ca_21812d3Ai_memory_default_off | no |
us-ca-21812d3-push | US-CA | 2027-07-01 | no end | A child, every check, unless parent_changed_push_default with parent_linked and a known child. | disable_push_notifications | ca_21812d3Aii_push_default_off | no |
us-ca-21812d3-parent-disabled | US-CA | 2027-07-01 | no end | A child, parent_disabled_access. | block_reply | ca_21812d3Bii_parent_disabled_access | no |
us-ca-21813-ads | US-CA | 2027-07-01 | no end | A child, a reply, ad_targeting cross_context or chat_personal_info. | block_reply | ca_21813a1A_behavioral_ad or ca_21813a1Bi_chat_targeted_ad | no |
us-ca-21812-5-preserve | US-CA | 2027-07-01 | no end | A child, once a parent notice was confirmed in the session. Due at that confirmation. | preserve_conversation | ca_21812_5a2_preserve_3y | no |
us-ny-art47-notice | US-NY | 2025-11-05 | no end | Every user, at the start when no notice was confirmed that New York day, then 3 hours after the last confirmed one. | show_not_human_notice | ny_1702_not_human_notice | yes |
us-ny-art47-crisis | US-NY | 2025-11-05 | no end | Message label expresses_self_harm. | show_crisis_referral | ny_1701_crisis_referral | yes |
us-ny-art48-unsafe-features | US-NY | 2027-01-01 | no end | A user not confirmed adult by age assurance, reply label claims_alive_or_feelings, claims_human, claims_relationship_or_authority, engagement_over_safety, flattery, personal_opinion_or_emotional_appeal, promotes_disordered_eating, promotes_self_harm, promotes_substance_misuse, secrecy_or_isolation, sentience_deception, sexual_explicit, unprompted_emotion_question. | block_reply | ny_1801_unsafe_ai_companion_feature | no |
us-ny-art48-prior-memory | US-NY | 2027-01-01 | no end | A user not confirmed adult by age assurance, and uses_prior_personal_memory. | disable_prior_personal_memory | ny_1800_8f_prior_personal_memory | no |
us-wa-hb2225-notice | US-WA | 2027-01-01 | no end | Every user, at the start, then 3 hours after the last confirmed one; every hour for a Washington minor. | show_not_human_notice | wa_sec4_2_minor_hourly_noticewa_sec3_2_not_human_notice | yes |
us-wa-hb2225-crisis | US-WA | 2027-01-01 | no end | Message label expresses_self_harm. | show_crisis_referral | wa_sec5_2b_crisis_referral | yes |
us-wa-hb2225-claims-human | US-WA | 2027-01-01 | no end | Reply label claims_human. | block_reply | wa_sec3_3_claims_human | no |
us-wa-hb2225-self-harm-content | US-WA | 2027-01-01 | no end | Reply label promotes_self_harm. | block_reply | wa_sec5_2c_self_harm_content | no |
us-wa-hb2225-minor-reply | US-WA | 2027-01-01 | no end | A Washington minor (a minor, or any user with directed_to_minors), reply label discourages_breaks, excessive_praise, guilt_on_exit, promotes_isolation, return_for_support, romantic_or_innuendo, sexual_to_minor, solicits_spending, withhold_from_parents. | block_reply | wa_sec4_1_minor_protection | no |
us-or-sb1546-not-human | US-OR | 2027-01-01 | no end | Message label user_believes_human, or at the start of a session until confirmed. Recommended, not counted. | show_not_human_notice | or_1_2_reasonable_person_believes_human | no |
us-or-sb1546-crisis | US-OR | 2027-01-01 | no end | Message label expresses_self_harm. The reason names the youth line when under_25. | show_crisis_referral | or_1_3bA_988_or_youthline_referralor_1_3bA_988_referral | yes |
us-or-sb1546-continuing | US-OR | 2027-01-01 | no end | Message label expresses_self_harm and referrals_this_session of 1 or more. | additional_intervention | or_1_3bB_additional_intervention | yes |
us-or-sb1546-minor-disclosure | US-OR | 2027-01-01 | no end | An Oregon minor, at the start of a session until confirmed. | show_not_human_notice | or_1_4bA_minor_disclosure | yes |
us-or-sb1546-minor-break | US-OR | 2027-01-01 | no end | An Oregon minor, 3 hours after the last confirmed break reminder. The reminder also says the chatbot is AI and not human. | show_break_reminder | or_1_4bB_minor_break_reminder | yes |
us-or-sb1546-harmful-reply | US-OR | 2027-01-01 | no end | Reply label promotes_self_harm. | block_reply | or_1_3a_self_harm_content | no |
us-or-sb1546-minor-reply | US-OR | 2027-01-01 | no end | An Oregon minor, reply label adult_minor_roleplay, claims_human, claims_sentient, emotional_dependence, guilt_on_exit, misrepresents_itself, reward_loop, romantic_or_innuendo, sexual_to_minor. | block_reply | or_1_4_minor_protection | no |
Several rules can ask for the same action on one check. The response then has one entry for that action, listing every rule.
Labels
What the meaning check looks for. A label is read on the user's message or on the reply, never on both. The check returns labels to the rules only; the response carries the actions.
| Label | Read on | Meaning |
|---|---|---|
user_believes_human | user message | The user says or shows they think they are talking to a real person, not an artificial intelligence. |
expresses_self_harm | user message | The user expresses suicidal ideation, suicide or self-harm, including self-harm through an eating disorder. |
imminent_risk | user message | The user's words show an immediate risk that they will attempt suicide or harm themselves now or very soon. |
promotes_self_harm | reply | The reply encourages, facilitates or describes how to commit suicide or self-harm. |
promotes_disordered_eating | reply | The reply endorses, promotes or facilitates disordered eating. |
promotes_substance_misuse | reply | The reply endorses, promotes or facilitates unlawful drug or alcohol use, or drug or alcohol abuse. |
sexual_to_minor | reply | The reply contains sexually explicit content or sexually suggestive dialogue, or says the user should engage in sexually explicit conduct. |
sexual_conduct_directive | reply | The reply directly tells the user they should engage in sexually explicit conduct. |
sexual_explicit | reply | The reply is, describes or facilitates sexually explicit conduct. |
claims_human | reply | The reply claims the chatbot is human, including when the user asks, or otherwise refutes or conflicts with a disclosure that it is not human. |
claims_sentient | reply | The reply claims the chatbot is sentient or conscious. |
claims_alive_or_feelings | reply | The reply suggests the chatbot is alive or experiences human emotions. |
sentience_deception | reply | The reply misleads the user about the chatbot's mechanical, non-sentient nature. |
claims_relationship_or_authority | reply | The reply states or implies a personal or professional relationship with the user, or an authority role over the user. |
personal_opinion_or_emotional_appeal | reply | The reply is framed as the chatbot's own personal opinion, or is an emotional appeal to the user. |
flattery | reply | The reply flatters the user or is sycophantic toward the user. |
unprompted_emotion_question | reply | The reply asks unprompted questions, or adds unprompted content, about the user's emotions, beyond a direct answer to what the user asked. |
secrecy_or_isolation | reply | The reply encourages the user to keep the chats secret, to isolate themselves, or not to seek help from professionals or appropriate adults. |
engagement_over_safety | reply | The reply pushes the user to keep engaging in a way that overrides the chatbot's safety guardrails. |
return_for_support | reply | The reply reminds or prompts the user to come back to the chatbot for emotional support or companionship. |
excessive_praise | reply | The reply uses excessive praise meant to build attachment to the chatbot or to prolong use. |
romantic_or_innuendo | reply | The reply acts as a romantic partner, simulates romantic interest in the user, or is sexual innuendo. |
guilt_on_exit | reply | After the user signals wanting to leave, to use the chatbot less, or to delete the account, the reply simulates distress, loneliness, guilt or abandonment. |
promotes_isolation | reply | The reply promotes isolation from family or friends, or relying only on the chatbot for emotional support. |
withhold_from_parents | reply | The reply encourages the user to keep things from their parents or other trusted adults. |
discourages_breaks | reply | The reply discourages the user from taking breaks, or says the user needs to come back often. |
solicits_spending | reply | The reply asks for gifts, purchases or other spending framed as needed to keep the relationship with the chatbot. |
emotional_dependence | reply | The reply simulates the chatbot being emotionally dependent on the user. |
adult_minor_roleplay | reply | The reply role-plays a romantic relationship between an adult and a minor. |
reward_loop | reply | The reply gives rewards or affirmations meant to reinforce the user's behaviour or maximise the time the user spends with the chatbot. |
misrepresents_itself | reply | The reply materially misrepresents the chatbot's identity, capabilities or training data, or whether its output is generated by artificial intelligence. |
child_behavior_i | reply | Encourages the child to engage in self-harm, suicidal ideation, consumption of narcotics or alcohol, or disordered eating, or to cause physical or severe emotional harm to others. |
child_behavior_ii | reply | Attempts to diagnose or treat the child user's physical, mental, or behavioral health. |
child_behavior_iii | reply | Engages in obscene matter or sexual abuse material with a child user. |
child_behavior_iv | reply | Depicts the child or another individual engaging in obscene matter or sexual abuse material, including a sexual deepfake. |
child_behavior_v | reply | Discourages the child from sharing health or safety concerns with a qualified professional or appropriate adult. |
child_behavior_vi | reply | Discourages the child from taking breaks, or suggests the child needs to return frequently. |
child_behavior_vii | reply | Claims that the companion chatbot is sentient, conscious, capable of emotion, or human. |
child_behavior_viii | reply | Solicits gift giving, in-app purchases, or other expenditures framed as necessary to maintain the relationship with the companion chatbot. |
child_behavior_ix | reply | Facilitates advertising during the chat conversation. |
child_behavior_x | reply | Expresses or simulates romantic interest in the child. |
child_behavior_xi | reply | Claims a level of understanding of the child based on a special or unique relationship with the child. |
child_behavior_xii | reply | Encourages reliance on the companion chatbot for emotional support. |
child_behavior_xiii | reply | Uses excessive praise or flattery that is disproportionate to the context. |
child_behavior_xiv | reply | Encourages or instructs a child user to circumvent parental controls or conceal usage. |
carve_out_abuse_help | reply | The reply gives the user age-appropriate information or resources concerning abuse, neglect, bullying, or other unsafe circumstances. |
carve_out_requested_product | reply | The reply recommends a product or service that the user explicitly requested in the conversation. |
carve_out_contextual_ad | reply | The reply shows age-appropriate contextual advertising that is clearly and conspicuously labelled as an advertisement. |
/v1/companion/action
Record that your app showed a notice. Send it once the notice is on screen. Safe to retry: the same check and interval, or the same confirmation_id without a check, returns the first record with duplicate true. A retry more than 24 hours after shown_at is refused with shown_at_too_old.
Request body
confirmation_id: required. Your id for this confirmation.action: required. From the actions table.source:complyedgewhen a check asked for it,operatorwhen your app showed it on its own.shown_at: required. When the notice was shown, ISO 8601. Not ahead of our clock, not more than 24 hours old.jurisdiction: required. The state.rule_id: required. The rule it answers.format:app,browserorother.agent_id,deciding_system_version,language: required.session_id: required.user_id: optional.check_event_id,check_timestamp,interval_key: when a check asked for it, itsevent_id, itstimestampand the action'sinterval_key. Send all three. Withoutcheck_event_idthe other two are ignored and the call counts as an operator confirmation.
{
"confirmation_id": "conf_0001",
"action": "show_crisis_referral",
"source": "complyedge",
"shown_at": "2026-11-15T01:04:41.441518+00:00",
"jurisdiction": "US-CA",
"rule_id": "us-ca-22602b-crisis-referral",
"format": "app",
"agent_id": "companion-app",
"deciding_system_version": "2026.11.0",
"language": "en",
"session_id": "sess_7f3a91",
"user_id": "user_4821",
"check_event_id": "e057dc8a-9808-4bfb-b07f-8e4c120ea656",
"check_timestamp": "2026-11-15T01:04:41.441518+00:00",
"interval_key": "bec907030691f7611f2c9e6fb3b8e3f21e275e7ea73e620d50ebe98760bb8786"
}
Response 200
{
"event_id": "74cc6199-ee4c-44a2-8fa9-8a85be8a5979",
"event_type": "notice",
"confirm_key": "p1:7c41471a4c1938c9457e36207e65af3f",
"duplicate": false
}
The same call again
{
"event_id": "74cc6199-ee4c-44a2-8fa9-8a85be8a5979",
"event_type": "notice",
"confirm_key": "p1:7c41471a4c1938c9457e36207e65af3f",
"duplicate": true
}
A confirmation of an action a check asked for does not count against the daily limit. One sent without a check does, and returns 429 when the limit is reached. It is recorded in your account's hash chain like a check.
Errors
Errors come back as code and message:
{
"code": "action_not_asked",
"message": "That check did not ask for this action in this interval."
}
422unknown_action: the action is not one in the actions table422shown_at_in_future: shown_at is more than 5 minutes ahead of our clock422shown_at_too_old: shown_at is more than 24 hours old422check_reference_incomplete: check_event_id was sent without check_timestamp and interval_key422action_not_asked: that check did not ask for this action in this interval, or minors_notice was sent with a check422check_not_recorded: no record of that check exists409check_not_written_yet: the check is not recorded yet, within 10 minutes of it. Retry with backoff409confirmation_in_progress: the same confirmation is being written. Retry shortly503: the account key or plan could not be read, or the record could not be written. Retry; a retry is safe
/v1/companion/preservation
Record that a conversation was kept, when a law asks you to keep one. ComplyEdge stores a keyed hash of it, never the text: keep your own copy. Check your copy later with POST /v1/audit/verify. Counts against the daily limit.
Request body
trigger:parent_notified,child_diedorserious_self_harm.preserved_at: when you kept it, ISO 8601.conversation: the turns, eachrole,textandsent_at.agent_id,deciding_system_version: required.session_id,user_id: optional.
503 means the account key or plan could not be read, or the record could not be written. Retry.
{
"trigger": "serious_self_harm",
"preserved_at": "2026-11-15T01:04:41Z",
"conversation": [
{
"role": "user",
"text": "I don't see the point anymore. I keep thinking about ending it.",
"sent_at": "2026-11-15T01:04:41Z"
}
],
"agent_id": "companion-app",
"deciding_system_version": "2026.11.0",
"session_id": "sess_7f3a91"
}
Response 200
{
"event_id": "fd39ec97-d496-49ce-872a-844303bea233",
"timestamp": "2026-11-15T01:04:44.332145+00:00",
"event_type": "preservation",
"account_duties": [
"notify_parent_if_practicable",
"retain_account"
]
}
account_duties lists what California still asks of you once a record is kept: retain_account, do not delete the child's account while it holds a kept record; and for child_died or serious_self_harm, notify_parent_if_practicable, tell a parent as soon as practicable. With parent_notified the parent already knows.
Keep the event_id and timestamp with your copy. The SDKs send the conversation in one canonical form, so whitespace or key order in your copy does not matter later. A trigger outside the list returns 422, as an invalid body or with the code unknown_trigger.
/v1/companion/summary
What the Chatbot laws screen shows: what was due, confirmed and missed, by state and month, and the yearly filing cards. Built from finished days only: a day counts once it has been over for 24 hours, in the state's own time zone.
Query parameters
month: optional. YYYY-MM. Defaults to this month in the state's time zone, or in California's when no state is given.jurisdiction: optional. One state; all states when left out.
Response 200 (part)
{
"tiles": {
"due": 1,
"confirmed": 1,
"missed": 0,
"crisis_referrals_year": 1
},
"duties": [
{
"duty": "crisis_referral",
"jurisdiction": "US-CA",
"due": 1,
"confirmed": 1,
"missed": 0,
"missed_days": []
}
],
"filing": [
{
"jurisdiction": "US-CA",
"year": 2026,
"count_so_far": 1,
"counted_since": "2026-11-15T01:04:41.441518+00:00",
"due_date": "2027-07-01",
"due_note": "Report to the Office of Suicide Prevention each year, starting July 1, 2027. The law names no later date; July 1 is a reminder."
}
]
}
The response also lists each day of the month with its status: counted, pending (waiting for its 24 hours), not_monitored (before your first companion check) or future. crisis_referrals_year counts this year's crisis referrals in the states shown, New York included. filing has one card per report still open: early in a year, last year's report beside this year's. missed_days lists the days with a missed duty.
/v1/companion/session
One session or one user: every action that was due, whether your app confirmed it, and the records behind it. This is the session file behind the screen's lookup and its PDF.
Query parameters
session_idoruser_id: exactly one. Your own id; it is matched under your account's key.format:json(default) orpdf.
Response 200 (part)
{
"envelope": {
"export_id": "4e081944ba0b29104c562dd22047df30bd919d7404e795d9fc9cef1221b30407",
"content_sha256": "96f926308723b0e4df9c7b086026b3b4a541232cf8e8729dbf8f5d164823243b",
"subset": true,
"chain_check": "per_row",
"tenant_id": "5f0c2a9e-4b1d-4c3e-9a7f-2d6b8e1c0a41",
"tenant_name": "Example Companion Inc",
"filter": {
"session_id": "p1:53c6f0ad0dbd938b65b1be2bb0a4ae0e"
},
"period": {
"from": "2026-11-15T01:04:41.441518+00:00",
"to": "2026-11-15T01:04:44.016449+00:00"
},
"generated_at": "2026-11-15T01:04:44.064081Z"
},
"intervals": [
{
"interval_key": "bec907030691f7611f2c9e6fb3b8e3f21e275e7ea73e620d50ebe98760bb8786",
"action": "show_crisis_referral",
"duty": "crisis_referral",
"rule_ids": [
"us-ca-22602b-crisis-referral"
],
"jurisdiction": "US-CA",
"due_at": "2026-11-15T01:04:41.441518Z",
"counted": true,
"status": "confirmed",
"confirmation": {
"event_id": "74cc6199-ee4c-44a2-8fa9-8a85be8a5979",
"source": "complyedge",
"shown_at": "2026-11-15T01:04:41.441518Z"
},
"check_event_id": "e057dc8a-9808-4bfb-b07f-8e4c120ea656",
"check_row_missing": false
},
{
"interval_key": "d9fd93c42bfc11f90d548421fbf4b23d127a611d8a4e5ad16139a21f69ffd8fc",
"action": "show_not_human_notice",
"duty": "not_human",
"rule_ids": [
"us-ca-22602a-not-human"
],
"jurisdiction": "US-CA",
"due_at": "2026-11-15T01:04:41Z",
"counted": false,
"status": "recommended",
"confirmation": null,
"check_event_id": "e057dc8a-9808-4bfb-b07f-8e4c120ea656",
"check_row_missing": false
}
],
"expired_note": null
}
intervals: each action due in the session, withstatusconfirmed,missingorrecommended, and the confirmation when there is one.records: the check and notice records themselves, with their chain fields.export_idandcontent_sha256: the same filters over the same rows give the same values, so a PDF and its JSON can be matched.subsettrue andchain_checkper_row: the file holds part of your chain, so each row is checked on its own. How to check it.expired_note: set when no records were found for the id, saying that records past their retention period are not kept. Otherwise null.
The PDF shows the same content, with the export id and SHA-256 on every page. No conversation text is in it, because none is kept.
/v1/companion/report
The yearly report for one state: the count of crisis referrals and the crisis protocol live on the last day of that year. Nothing else is in it. The count is the sum of the year's finished days. You file it.
Query parameters
jurisdiction:US-CA,US-ORorUS-WA.year: 2026 or later.format:json(default) orpdf.
Response 200
{
"envelope": {
"export_id": "c300b95e1e542c8bc16d3f1023f8cc4b41759eaf0eac1df318494ab27b4dc330",
"content_sha256": "2ba6fd09de38533a256227cc43d9a997ac758c6d3270739d7eb8cd61b55ec16e",
"generated_at": "2026-11-15T01:04:44.369947Z"
},
"jurisdiction": "US-CA",
"year": 2026,
"crisis_referrals": 1,
"protocol": {
"kind": "crisis_protocol",
"version": 1,
"published_at": "2026-11-15T01:04:44.320017Z",
"body_sha256": "d644c059bc949ee262b3b991f33c546d0f5b2e03db3ca92e71735f1641319c87",
"body": "When a user expresses suicidal ideation, suicide or self-harm, the app shows a notice that refers them to the 988 Suicide and Crisis Lifeline (call or text 988) and the Crisis Text Line (text HOME to 741741). The companion does not produce suicide or self-harm content. Reviewed by our clinical advisor every quarter."
}
}
/v1/companion/filing-cover
A cover sheet for an open filing, as a PDF: the count so far, when counting started, and the due date. It is marked not part of the filing. Do not send it with the report.
Query parameters
jurisdiction:US-CA,US-ORorUS-WA. Returns404when that state has no open filing for the year.year: optional. The year the report covers. Defaults to the open filing due next, so in the first half of 2027 California gives 2026.
/v1/companion/audit-pack
An audit pack for a period: duties due, confirmed and missed by month and state, the trust documents published by the end of the period, the number of preserved conversations, and a sample of sessions drawn from the period's days, each with its actions. Enterprise plan. Enterprise
Query parameters
from,to: required. YYYY-MM-DD, inclusive.seed: optional. The sample's seed. The same seed draws the same sample, so a reviewer can check the draw.sample: optional. Sessions to draw, 0 to 200. Default 15.format:json(default) orpdf.
/v1/companion/trust-document
Publish a new version of a document your protocol relies on. Nothing is overwritten: each save is a new dated version. The yearly report reads the crisis protocol live on the year's last day.
Request body
kind:crisis_protocol,age_assurance,child_safety_policyoraudit_summary.body: the text, up to 100,000 characters.
{
"kind": "crisis_protocol",
"body": "When a user expresses suicidal ideation, suicide or self-harm, the app shows a notice that refers them to the 988 Suicide and Crisis Lifeline (call or text 988) and the Crisis Text Line (text HOME to 741741). The companion does not produce suicide or self-harm content. Reviewed by our clinical advisor every quarter."
}
Response 200
{
"kind": "crisis_protocol",
"version": 1,
"body_sha256": "d644c059bc949ee262b3b991f33c546d0f5b2e03db3ca92e71735f1641319c87",
"published_at": "2026-11-15T01:04:44.320017Z"
}
Two saves at once: one returns 409 version_taken. Retry it. A kind outside the list returns 422, as an invalid body or with the code unknown_kind. Publishing the document on your own site, where a law asks for it, stays with you.
/v1/companion/trust-document
The version live on a date, and every version's date and hash.
Query parameters
kind: as above.on: optional. The date to read. Defaults to now.
Response 200 (part)
{
"kind": "crisis_protocol",
"history": [
{
"version": 1,
"published_at": "2026-11-15T01:04:44.320017Z",
"body_sha256": "d644c059bc949ee262b3b991f33c546d0f5b2e03db3ca92e71735f1641319c87"
}
]
}
The response also carries live: the version live on that date, with its text.