SparkientDocs

Welcome to Sparkient

Sub-100ms Decision Intelligence API — smarter than rules, cheaper than LLMs.

What is Sparkient?

Sparkient is a decision intelligence API that delivers structured decisions in under 100 milliseconds. It sits between hard-coded rules and full LLM calls, giving you the reasoning quality of a large language model at the speed and cost of a rules engine.

The Decision Pipeline

Every decision flows through a three-stage pipeline:

  1. Hard Rules — Deterministic business rules evaluated in sub-millisecond time. If a rule matches, the decision is instant.
  2. ML Classifier — A compiled model trained from LLM-generated examples. Handles nuance and edge cases that rules miss, in under 100ms.
  3. LLM Escalation — Fallback for low-confidence decisions. Only triggered when the classifier isn't sure enough.

Every response is structured and consistent:

{
  "decision": "approve",
  "confidence": 0.94,
  "reason_codes": ["safe_content", "verified_user"],
  "latency_ms": 8.3,
  "stage": "classifier",
  "escalate": false
}

Why Not Just Use an LLM?

ApproachLatencyCost per DecisionIntelligence
Rules Engine< 1ms~$0Low
Sparkient< 100ms~$0Near-LLM
Fast LLM (Groq)150–300ms$0.001–0.005High
Standard LLM1–3s$0.001–0.01Highest

Sparkient compiles LLM intelligence into a fast model at training time, so you get near-LLM quality at near-zero runtime cost.

Authentication at a Glance

MethodUse Case
API Key (Bearer sk_...)Programmatic access — /decide, decision types, examples, training
Firebase JWT (Bearer <id_token>)Dashboard — account, billing, API key management

See Authentication for full details.

Training Example Field Names

When adding training examples, use the canonical field names: input_payload, expected_decision, and reason_codes (a list). The shorter aliases input, decision, and reason_code (singular string) are also accepted for convenience.

Programmatic Access

Building an integration or using an AI agent? These machine-readable resources are available:

Next Steps

On this page