Scenario: Audit Trail

Every request through the gateway produces an execution record. See the table below for the full list of recorded fields.

Privacy note: The gateway records metadata about each request: provider, model, token counts, cost, attribution, and policy decision. The contents of prompts and AI responses are never recorded or stored by Axemere. Your data stays between your application and the AI provider.

What gets recorded

FieldDescription
record_idUnique identifier for this request
org_idYour organization ID
workload_idWorkload that submitted the request
project_idProject attribution
action_typeAction type (e.g. ai.infer, etc.)
providerAI provider used (e.g. openai, anthropic, etc.)
modelModel name from the request
credential_idCredential used to authenticate to the provider
api_key_idManaged gateway API key; absent for self-hosted gateway records
node_idGateway node that handled the request
decisionallow, deny, rate_limit, quarantine, or require_approval
decision_reasonPlain-text explanation from the policy engine
input_tokensInput tokens consumed; absent for denied requests
output_tokensOutput tokens produced; absent for denied requests
cost_usdEstimated cost based on token usage; absent if unknown
request_bytesRaw bytes sent to the provider
response_bytesRaw bytes received from the provider
record_tierverified (full inspection) or observed (cert-pinned, passthrough only)
record_hash_hexSHA-256 hash of the record; required for cryptographic verification
stream_outcomeFor streaming requests: complete, client_disconnected, provider_error, etc.
stream_errorPopulated when stream_outcome is provider_error
connection_typeHow the request reached the gateway: direct_api, sdk_redirect, or connect_proxy
traffic_classdeveloper (deliberate SDK/CLI/proxy config) or ambient (background app traffic via install or PAC file)
labelsCustom attribution labels applied at request time
created_atUTC timestamp of the request

Verified vs. Observed: A verified record means the gateway performed full TLS inspection and has accurate token counts and cost. An observed record means the provider used certificate pinning; the gateway routed the traffic without inspection, so token counts and cost are estimates only.

Querying the audit trail in the console

Go to Records in the left nav. Use the filter controls to narrow by:

  • Workload, project, or API key
  • Date range
  • Decision (allow, deny, rate_limit, etc.)
  • Model or provider
  • Record tier (verified / observed)
  • Attribution label key/value

Click any record to see the full detail: attribution labels, policy decision, token counts, byte counts, cost, and the cryptographic hash.

Exporting for auditors

From the Records page, click Export CSV in the top-right corner. The export respects all active filters; set your date range, workload, and decision filter before exporting to scope the output to what auditors need.

The export includes all fields in the table above. Up to 50,000 records can be exported in a single request. For larger date ranges, narrow the filter scope and export in multiple batches.

Proving a specific request was denied

To confirm that a policy was enforced for a specific period:

  1. Go to Records
  2. Set the date range to the period in question
  3. Set the Decision filter to deny
  4. Optionally filter by workload or project to scope further

Each denied record includes the decision_reason field showing exactly which policy rule triggered the denial.

Cryptographic verification

Records with a record_hash_hex can be cryptographically verified to confirm they have not been tampered with. Use the Verify button on any record in the console, or see the Merkle Proofs guide for programmatic verification.

Data retention

Where records are stored depends on your deployment type:

  • Managed and Control Plane (CP)-connected self-hosted gateways: the CP stores a metadata record (hash, model, cost, policy decision, attribution) in a cloud-hosted database managed by Axemere. This is what the console and governance APIs surface.
  • Free Gateway: the gateway writes a full execution record (including request/response details) to your local PostgreSQL instance. Your local records are your responsibility; Axemere's systems do not have access to them.

A formal data retention policy with defined windows is in development. If you have specific compliance retention requirements, contact support.