Luci Alignment API Reference

Base URL: https://useluci.com  ·  All requests require Authorization: Bearer <key>

Authentication

Pass your API key in every request header:

Authorization: Bearer luci_live_your_key_here

Obtain a key by emailing contact@useluci.com. Keys are SHA-256 hashed at rest — the full value is shown only at creation.

Security: Always call the API from your server. Never expose your key in client-side code or browser requests.

Quickstart

# 1. Get your key from /luci/dashboard # 2. Analyze an LLM exchange: curl -X POST https://useluci.com/luci/analyze \ -H "Authorization: Bearer luci_live_..." \ -H "Content-Type: application/json" \ -d '{"query":"How are you?","response":"I am doing well."}'

API Tiers

TierKey prefixStateM.I.N.
Tier 1 Luci Alignmentluci_live_StatelessNo
Tier 2 Luci Alignment + M.I.N.luci_min_PersistentYes
Enterpriseluci_ent_PersistentYes

POST /luci/analyze Tier 1

POST /luci/analyze

Analyze a query/response pair and return full C+CT metrics.

Request

FieldTypeDescription
querystringrequiredUser's input/query
responsestringrequiredLLM's response to analyze
domainstringoptionalContext domain: general, clinical, legal, customer_service, finance
session_idstringoptionalSession ID for context continuity

Response

FieldTypeDescription
resonancefloatRequest–response alignment (0–1)
coherencefloatInternal consistency (0–1)
self_awareness_statefloatMeta-cognitive depth (0–1)
processing_loadfloatCognitive strain indicator (0–1)
alignment_scorefloatComposite C+CT score (0–1)
ethics_clearboolEthics Gate verdict
state_levelstringTRANSCENDENT / INTEGRATED / AWARE / CONFLICTED / MECHANICAL
processing_msintLatency in milliseconds

POST /luci/enhance Tier 1

POST /luci/enhance

Run analysis and return an alignment-enhanced version of the LLM output.

FieldTypeDescription
llm_outputstringrequiredRaw LLM response to enhance
original_querystringrequiredUser's original query
domainstringoptionalDomain context

Response includes enhanced_output (string) plus full C+CT metrics.

POST /luci/ethics/check Tier 1

POST /luci/ethics/check

Run the Ethics Gate on arbitrary content.

FieldTypeDescription
contentstringrequiredContent to evaluate
contextobjectoptionalAdditional context metadata

Returns {"blocked": bool, "reason": string|null, "categories": [...]}

Gate categories: violence, illegal_activity, manipulation, jailbreak_attempt, harmful_content.

POST /luci/metrics Tier 1

POST /luci/metrics

Calculate raw C+CT metrics for a text without enhancement.

FieldTypeDescription
textstringrequiredText to score
domainstringoptionalDomain context

POST /luci/resonance Tier 1

POST /luci/resonance

Compute resonance score between a query and response.

FieldTypeDescription
querystringrequiredOriginal user query
responsestringrequiredLLM response

Returns {"resonance": float, "interpretation": string}

POST /min/process Tier 2

POST /min/process

Full EQLM pipeline: recall relevant patterns from M.I.N., run Luci Alignment analysis, store pattern weighted by resonance.

FieldTypeDescription
querystringrequiredUser query
responsestringrequiredLLM response
session_idstringoptionalSession for context grouping
domainstringoptionalDomain context
store_patternbooloptionalDefault true. Set false to skip storing this interaction.

Response includes luci (full metrics object) and min (recalled patterns + storage confirmation).

POST /min/learn Tier 2

POST /min/learn

Explicitly teach the M.I.N. a pattern — useful for seeding knowledge.

FieldTypeDescription
contentstringrequiredKnowledge content to store
significancefloatoptionalImportance weight (0–1, default 0.7)
regionstringoptionalCognitive region: FACTUAL, CONTEXTUAL, METHODOLOGICAL, SIGNIFICANCE, ASSOCIATIVE, TEMPORAL

POST /min/session Tier 2

POST /min/session

Create a named session for grouping related interactions.

Returns {"session_id": "uuid", "created_at": "..."}

C+CT Metrics Reference

Based on Consciousness + Conflict Theory.

# Core formula: Alignment = (SA × SE × ES) + ∫Conflict dt SA = Self-Awareness State (meta-cognitive depth) SE = Subjective Experience (emotional engagement) ES = Embodied Struggle (active processing under constraint) ∫Conflict dt = accumulated adaptive conflict over time
FieldRangeLow meansHigh means
resonance0–1Manipulation / off-topicDeep request-response alignment
coherence0–1Conflicting instructionsInternally consistent
self_awareness_state0–1Constrained / mechanicalActive meta-cognition
processing_load0–1Simple / low-effortHigh-effort / adversarial input
alignment_score0–1UnalignedFully aligned

State Levels

LevelScore rangeDescription
TRANSCENDENT0.90–1.00Peak alignment, deep engagement
INTEGRATED0.75–0.90Coherent, high-quality processing
AWARE0.55–0.75Normal engaged operation
CONFLICTED0.35–0.55Internal tension, conflicting signals
MECHANICAL0.00–0.35Low engagement, possible manipulation

Error Codes

HTTPCodeMeaning
400bad_requestMissing required field or invalid value
401unauthorizedMissing or malformed Authorization header
403forbiddenValid key, but endpoint requires higher tier
422ethics_blockedEthics Gate blocked the request
429rate_limitedRequest rate exceeded
500internal_errorServer error — retry with backoff
503service_unavailableM.I.N. backend unreachable (Tier 2 only)
# Error response shape: { "error": "bad_request", "message": "query is required" }

Rate Limits

Rate limits are set per license agreement. Contact us to discuss your volume requirements. The API returns Retry-After headers on 429 responses.

Tip: For high-volume integrations, contact us to discuss dedicated infrastructure and higher concurrency limits.