Lumen API documentation

Audit log verification

Every chat completion writes an entry to a hash-chained append-only log on disk. Each entry's hash is:

SHA256(prev_hash | canonical_payload | shared_secret)

You receive lumen.audit_hash in the response and can fetch it any time.

Lookup

curl https://lumen-api.eliteaiempire.com/v1/audit/abcdef123456 \
  -H "Authorization: Bearer lumen_sk_..."

Returns:

{
  "position": 14729,
  "prev_hash": "...",
  "hash": "abcdef123456...",
  "payload": {
    "endpoint": "/v1/chat/completions",
    "tier": "small",
    "model": "gpt-4o-mini",
    "difficulty_score": 0.42,
    "approx_tokens_in": 380,
    "elapsed_sec": 0.84,
    "tokens_used": {...}
  },
  "ts": 1748459183
}

Verifying

Given two adjacent entries, you can recompute the chain hash and confirm tampering hasn't occurred. The shared secret is held by Lumen — for full third-party verification, request a notarized snapshot under your Enterprise SLA.

Use cases

  • SOC2 / compliance evidence
  • Internal "which model answered this critical user question?" debugging
  • Disputed-billing reconciliation (audit hash maps to usage_log row)