Audit
Query audit logs and inference execution traces.
Every action in Ctrl AI is logged in an append-only audit log. Every AI inference query is logged with a full execution trace.
Query Audit Logs
GET /api/v1/auditQuery Parameters
| Parameter | Type | Description |
|---|---|---|
action | string | Filter by action (e.g., unit.created, member.invited) |
resourceType | string | Filter by resource type |
resourceId | string | Filter by specific resource |
userId | string | Filter by user |
startDate | string | ISO 8601 start date |
endDate | string | ISO 8601 end date |
limit | number | Items per page (1-200, default: 50) |
offset | number | Pagination offset |
format | string | json (default) or csv (admin only) |
Example
curl "https://app.ctrlai.com/api/v1/audit?action=unit.verified&startDate=2026-01-01" \
-H "Authorization: Bearer ctrlai_pk_..."Response
{
"data": [
{
"id": "01HX...",
"action": "unit.verified",
"userId": "01HW...",
"resourceType": "unit",
"resourceId": "01HV...",
"details": {
"verificationAction": "approve",
"approvalRate": 100
},
"ipAddress": "192.168.1.1",
"createdAt": "2026-04-10T14:30:00Z"
}
],
"meta": { "total": 156, "limit": 50, "offset": 0 }
}Inference Logs
GET /api/v1/audit/inferenceReturns inference execution logs with full traces including:
- Query text (encrypted at rest)
- Units fired and their verification status
- Parsed variables and runtime values
- Trust summary and coverage percentage
- Model provenance (provider + model per role)
- Audit warnings (ungrounded claims flagged by model auditor)
- Duration and execution mode
CSV Export
Admins can export audit logs as CSV:
curl "https://app.ctrlai.com/api/v1/audit?format=csv" \
-H "Authorization: Bearer ctrlai_pk_..." \
-o audit-export.csv