API Documentation

Reference for the Liv Hana Strategic Intelligence API. Base URL: https://livhana.ai/api/v1

Authentication: All API requests require a Bearer token. Include Authorization: Bearer YOUR_API_KEY in every request header. Get your key at livhana.ai/contact.

RALPH Compliance-as-a-Service

Multi-industry compliance engine. Validate products, check shipping eligibility, and generate audit-ready logs.

POST /compliance/check

Check product compliance for interstate shipping. Returns eligibility, classification, restrictions, and an immutable audit ID.

# Example: compliance check
curl -X POST https://livhana.ai/api/v1/compliance/check \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "product_type": "hemp_flower",
  "origin_state": "OR",
  "destination_state": "TX",
  "thc_percentage": 0.28
}'

# Response (200 OK)
{
  "eligible": true,
  "classification": "compliant_hemp",
  "restrictions": [],
  "audit_id": "aud_9f8k2m3...",
  "checked_at": "2026-04-05T12:00:00Z"
}
GET /compliance/states

List all 50 states with current regulatory status, restrictions, and last-updated timestamp.

GET /compliance/audit/{audit_id}

Retrieve a specific compliance audit record by ID. Immutable, timestamped, suitable for regulatory review.

LLM Council

5-model deliberation and verification engine. Consensus-based AI output validation.

POST /council/agent-review

Submit a payload for multi-model council review. Returns consensus verdict, individual votes, confidence score, and chairman synthesis.

# Example: council review
curl -X POST https://livhana.ai/api/v1/council/agent-review \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "payload": "Verify: THC content 0.28% qualifies as compliant hemp under 2018 Farm Bill",
  "classification": "STANDARD"
}'

# Response (200 OK)
{
  "verdict": "APPROVED",
  "confidence": 0.96,
  "votes": { "seat1": "approve", "seat2": "approve", ... },
  "synthesis": "Unanimous approval. 0.28% THC is below the 0.3% federal threshold.",
  "council_id": "cncl_3k9f..."
}

Voice AI

Real-time voice synthesis via WebSocket with automatic model failover.

GET /voice/connect

Upgrade to WebSocket for real-time voice streaming. Supports barge-in detection, sentiment analysis, and session transcripts.

GET /voice/sessions/{session_id}

Retrieve transcript and analytics for a completed voice session.

Billing

POST /billing/checkout

Create a Stripe Checkout session for Pro or Enterprise subscription. Requires tier, successUrl, cancelUrl.

POST /billing/portal

Create a Stripe Customer Portal session to manage subscription, update payment method, or cancel.

GET /billing/subscription?customerId={id}

Get current subscription tier, rate limits, and billing period for a customer.

Rate Limits

TierPriceRequests/MinRequests/Day
Free$0/mo601,000
Starter$49/mo1205,000
Pro$149/mo30050,000
Business$499/mo600100,000
EnterpriseCustom1,000+Unlimited

Health & Status

GET /health

Platform health check. Returns service status, version, and uptime.

GET /commerce/heartbeat

Revenue path health. Verifies Stripe, LightSpeed, and payment pipeline connectivity.

Error Codes

CodeMeaning
401Missing or invalid API key
403Tier does not permit this endpoint
429Rate limit exceeded. Retry after cooldown.
500Internal error. Includes request ID for support.
503Service temporarily unavailable