Ctrl AI

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/audit

Query Parameters

ParameterTypeDescription
actionstringFilter by action (e.g., unit.created, member.invited)
resourceTypestringFilter by resource type
resourceIdstringFilter by specific resource
userIdstringFilter by user
startDatestringISO 8601 start date
endDatestringISO 8601 end date
limitnumberItems per page (1-200, default: 50)
offsetnumberPagination offset
formatstringjson (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/inference

Returns 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

On this page