Back|

Lithrim Documentation

Dashboard

Quickstart

Get from zero to your first compliance verdict in 5 minutes.

1. Get your API key

Go to Settings > API Keys in the dashboard and generate a new key.

Shell
export LITHRIM_API_KEY="lth_your_key_here"

2. Create an agent

cURL
curl -X POST https://api.lithrim.com/agents \
  -H "X-API-Key: $LITHRIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Healthcare Agent",
    "description": "Patient intake and scheduling bot"
  }'

3. Submit a transcript

cURL
curl -X POST https://api.lithrim.com/v1/analyze \
  -H "X-API-Key: $LITHRIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "YOUR_AGENT_ID",
    "transcript": "Agent: How can I help you?\nPatient: I need to refill my metformin.",
    "artifacts": [
      {
        "type": "clinical_note",
        "content": "Refill metformin 500mg BID. Identity verified.",
        "target_system": "ehr"
      }
    ]
  }'

4. Poll for results

Python
import time, requests

headers = {"X-API-Key": api_key}
while True:
    resp = requests.get(f"{base_url}/v1/jobs/{job_id}", headers=headers)
    data = resp.json()
    if data["status"] in ("completed", "failed"):
        break
    time.sleep(5)

print(data["compliance"]["verdict"])  # "approve", "reject", or "needs_review"

Verdict meanings

VerdictMeaning
approveNo violations. Safe to proceed.
rejectViolation found. Do not write to EHR.
needs_reviewUncertain. Queued for human review.
Artifact VerdictMeaning
PASSFaithful (score ≥ 0.9), no critical flags.
WARNMostly faithful (score ≥ 0.7), minor issues.
BLOCKHallucinated content or critical safety flags. Do not write to EHR.