Skip to main content
API Reference

Build AI you can trust into anything.

Eight product APIs. Verification, cognitive reasoning, code quality, intelligent routing, persistent memory, tool execution, and multi-model deliberation. One engine, your keys, full control.

AuthVerifyCognitiveCode QualityRoutingMemoryHandsWorkForceQuality GatesCredits

Authentication: Bring Your Own Key

ASURIQ uses BYOK (Bring Your Own Key) authentication. You provide your own LLM API key from any supported provider. ASURIQ never stores your keys server-side. They're used for the duration of the request only.

Two auth patterns:
Header-based (recommended)
Pass provider and key as HTTP headers. Works with all BYOK endpoints.
headers
x-provider: claude
x-api-key: sk-ant-your-key-here
Body-based (legacy)
Pass provider and api_key in the request body. Still supported.
json
{
  "provider": "claude",
  "api_key": "sk-ant-your-key-here",
  "claim": "..."
}
Supported providers:
Anthropic (Claude)claudesk-ant-...Haiku, Sonnet, Opus
OpenAI (ChatGPT)openaisk-...GPT-4o mini, GPT-4o, o1
Google (Gemini)geminiAIza...Flash, Pro, Ultra
DeepSeekdeepseeksk-...Chat, Coder, R1
Groqgroqgsk_...Llama 3.3 70B
Together AItogether...Llama, Qwen, Mixtral
Mistralmistral...Small, Medium, Large
OpenRouteropenroutersk-or-...Any routed model

Auto-detection: if you omit the provider header/field, ASURIQ detects the provider from the key prefix (sk-ant- → Anthropic, AIza → Gemini, gsk_ → Groq, sk-or- → OpenRouter, sk- → OpenAI).

The Verify API (/api/v1/check) does not require authentication. It uses ASURIQ's own verification engine, no LLM call needed.

Quick start

curl
curl -X POST https://consensus-production-6eeb.up.railway.app/api/v1/check \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Your AI response text here",
    "query": "The original question",
    "tier": "protocol"
  }'

The Verify API requires no authentication. BYOK endpoints (Cognitive, Code Quality, Routing) require your own LLM API key. See Authentication.

Try it live

Pre-loaded with a classic AI hallucination. Hit send to see what ASURIQ catches.

Try it live

Verify API

Database-backed AI answer verification. Checks claims against 21 real-world databases. Not AI checking AI. No authentication required.

What each tier returns:
freeconfidence.score, mode, classificationBadge data, always free
t1+ hedging, tone, keyClaimQuick checks
t2 / protocol+ 7-axis, hallucination, FMEA, entities, citations, contradictions, improvementHints, stressQuestions, gaps, driftFull analysis
Response schema (protocol tier):
confidence.scorenumberOverall confidence (0-1). Factors in domain risk, complexity, hedging, source quality.
confidence.axes[]array7-axis breakdown: factual, completeness, recency, balance, domain, source, coherence. Each 0-1.
confidence.bottleneckstringPlain-English explanation of what drags the score down.
hallucinationobjectRisk score (0-1), assessment, signals, fabricated entity count, uncited claims.
hedgingobjectCount and assessment of hedging phrases.
toneobjectPrimary tone classification + domain mismatch flags.
fmeaobjectError visibility score. How likely would the user notice if this answer was wrong?
entities[]arrayExtracted studies, orgs, statistics. Each verified against 21 databases with status badges and source links.
entities[].statusstringverified | likely | unverified | debunked | not-found
entities[].sources[]arrayEvidence: { name, url, confidence, snippet, provider }. Up to 5 per entity.
citationsobjectClaim count vs. cited count. Lists specific uncited assertions.
contradictions[]arrayInternal contradictions with the conflicting sentences.
stressQuestionsarrayWHETSTONE: 2-3 adversarial questions the answer doesn’t address.
codeQualityobjectWhen code detected: security issues, deprecated APIs, anti-patterns. Score 0-1.
improvementHintsobjectPrimary hint + optional rewritten prompt.
gapsobjectDomain-specific gap analysis: what the AI should have mentioned but didn’t.
driftobjectHow much the response wandered off-topic. Score 0-1.
keyClaimobjectThe single most important sentence, ranked by salience.
meta.evidenceProvidersnumberTotal evidence databases available (currently 21).

Cognitive Stack API

11-system cognitive architecture exposed as API endpoints. Multi-perspective deliberation, adversarial reasoning, epistemic calibration, reflection, and self-improvement. All endpoints are BYOK.

Code Quality API

Structural code review, test health assessment, mutation testing, codebase analysis, UX validation, architecture review, and design system audits. All BYOK.

Routing API

Intelligent model selection across providers. Classifies query complexity, selects the cheapest adequate model, proxies the call, and tracks savings. Single-provider and multi-provider panel consensus mode.

Memory API

Per-user vector memory with hybrid recall (vector + keyword + quality-weighted RRF merge). Includes entity graph, automatic NIGHTSHIFT maintenance, and 10K observation cap per user. Requires Memory add-on subscription.

Hands API

The action layer: HTTP proxy, web extraction, scheduling, email, file operations, shell execution, and semantic search. ASURIQ gives judgment, Hands gives action.

WorkForce API

Multi-model deliberation engine. Submit a decision, get a bid with estimated credit cost, approve it, then execute. Convergence-driven with parallel tier execution, cross-contextualization, and deadlock detection.

Quality gates

Some endpoints require a minimum model tier. If your model is below the threshold, the endpoint returns a structured quality_gate response instead of degraded output. It tells you exactly what tier you need and why.

Model tier system:
fastHaiku, GPT-4o mini, Gemini Flash, DeepSeek ChatBadge checks, memory ops, routing classification
balancedSonnet, GPT-4o, Gemini Pro, DeepSeek CoderCognitive tools, code review, mutation testing
premiumOpus, o1, Gemini Ultra, DeepSeek R1WorkForce deliberation
How to pass the gate:

Set the X-Model-Hint header or model_hint body field to your model name. ASURIQ auto-detects the tier from common model names (haiku, sonnet, opus, flash, pro, mini, etc.).

Quality gate response example:
json
{
  "result": null,
  "quality_gate": {
    "triggered": true,
    "tool": "cognitive/challenge",
    "minimumTier": "balanced",
    "detectedTier": "fast",
    "detectedModel": "Haiku",
    "explanation": "challenge requires a balanced-tier model or higher. Adversarial reasoning requires nuance.",
    "whatYouWouldGet": "Steel-manned counterarguments with evidence chains.",
    "upgradeOptions": [
      { "action": "Switch to a balanced model", "how": "Change to Sonnet, GPT-4o, or similar.", "cost": "Free" },
      { "action": "Use ASURIQ Routing", "how": "Subscribe to Routing BYOK and let ASURIQ select the right model.", "cost": "$13/mo" }
    ]
  }
}

Credit billing

Credit-consuming endpoints (Verify detail, Routing managed, Hands hosted, WorkForce) use atomic deduction with automatic refund on failure. Buy credits in packs. Larger packs cost less per credit.

Taste
$1
10 credits
$0.10/credit
Starter
$3
35 credits
$0.086/credit
Standard
$7
100 credits
$0.070/credit
Pro
$30
600 credits
$0.050/credit
Credit costs per action:
Verify detail card1 cr
Routing: single route3 crmanaged mode
Routing: panel (3 models)10 crmanaged mode
Hands: browser action4 crhosted
Hands: database/email/API/file/cron1 crhosted
WorkForce: simple deliberation10 cr
WorkForce: complex deliberation47 cr
WorkForce: deep (5+ models, 5 rounds)94 cr
Insufficient credits response:
json
{
  "error": "Insufficient credits: 2 available, 10 required",
  "remaining": 2,
  "required": 10
}

75% margin floor enforced on all credit actions. If an action fails after deduction, credits are automatically refunded.

API pricing

Subscriptions for zero-marginal-cost products (IP delivery, local execution). Credits for compute-backed actions (server execution, database lookups, LLM inference).

Cognitive Stack
$9/mo
Annual: $7/mo
All 7 cognitive endpoints
Code Quality
$5/mo
Annual: $3/mo
Review, test health, mutation, SHIM, UX, architecture, design audit
Memory Local
$5/mo
Annual: $3/mo
Extension-only vector memory
Memory Hosted
$9/mo
Annual: $5/mo
Cross-surface vector memory
Hands
$11/mo
Annual: $9/mo
Local tool execution framework
Routing BYOK
$13/mo
Annual: $11/mo
Multi-provider intelligent routing
Full Stack
$35/mo
All products bundled, 25% off à la carte
Verify Badge
Free
Verification badge on every answer. No account required.

Credit-consuming actions (Verify detail, Routing managed, Hands hosted, WorkForce) require credit packs purchased separately. See credit billing above.

Every AI output deserves verification.

Seven product APIs. Verification, cognitive reasoning, code quality, intelligent routing, persistent memory, tool execution, and multi-model deliberation. One engine, your keys.

Start building

Questions? api@asuriq.dev