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:
- Hard Rules — Deterministic business rules evaluated in sub-millisecond time. If a rule matches, the decision is instant.
- ML Classifier — A compiled model trained from LLM-generated examples. Handles nuance and edge cases that rules miss, in under 100ms.
- 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?
| Approach | Latency | Cost per Decision | Intelligence |
|---|---|---|---|
| Rules Engine | < 1ms | ~$0 | Low |
| Sparkient | < 100ms | ~$0 | Near-LLM |
| Fast LLM (Groq) | 150–300ms | $0.001–0.005 | High |
| Standard LLM | 1–3s | $0.001–0.01 | Highest |
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
| Method | Use 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:
- API Base URL:
https://api.sparkient.ai - OpenAPI Spec: api.sparkient.ai/openapi.json — full API schema
- Plain text docs: docs.sparkient.ai/llms-full.txt — complete documentation in markdown
- LLM summary: docs.sparkient.ai/llms.txt — concise overview for AI agents
