QUANTSULTANT.DEV / DOCS Canonical Crawler Surface · 19 Verified Nodes 18.5% → 0.08% Medical Floor

Stream 02 · Universal Semantic & Domain Router API (/v1/reason/universal)

/docs/api/semantic Stream 02 · GRMA Single-GPU Router

Plain-English translation: Routes any incoming clinical, financial, legal, or operational query to the exact verified domain subspace in 2.5ms local / 8ms cloud using a compact index that fits on a single GPU.

1. Purpose & Architectural Role

Eliminates multi-node vector database sprawl by routing queries through our compact proprietary Geodesic Retrieval Manifold Architecture (GRMA) index. In the Native Rust shell, the multi-domain routing index resides in 15.88 MB of L3-cache-friendly RAM across 175 verified execution pods, classifying domain intent, required C1–C7 gates, and optimal execution shell in 2.5ms.

Cross-references: System Architecture · GRAMS™ Manifold & GRMA · 3 Runtime Shells (FastAPI, Go, Rust).

2. Request Schema (POST /v1/reason/universal)

All requests require Content-Type: application/json and an Argon2id-scoped bearer header (Authorization: Bearer tw_live_...) issued via /v1/auth/argon2-verify.

Field Type Requirement Specification
querystringRequiredIncoming natural-language or structured query to classify and route.
domain_hintstringOptionalOptional vertical hint (clinical, finance_sec, defense_scif, legal, auto).
pod_cohort_idstringOptionalTarget execution pod cohort (supports 1 Lead SME → 175 Verified Pods routing).

3. Response Schema

Responses are deterministic JSON payloads returned with X-Powered-By: Quantsultant-GRAMS-Engine/2.5ms-Edge and zero customer payload retention at rest.

Field Type Deterministic Guarantee
statusstringStream execution status (STREAM_ACTIVE).
routestringCanonical gateway route (/v1/reason/universal).
auth_schemestringActive authentication scheme (Argon2id + Bearer tw_live_...).
execution_msnumberDeterministic routing latency in milliseconds (2.5 ms bare-metal target).
payload_echoobjectNormalized routing parameters and assigned domain manifold.

4. Deterministic Examples & Live Edge Sandbox

Switch between cURL, Python (FastAPI), Go 1.22, and Native Rust below, or click Run Live Edge Test to execute a real verification call against the Cloudflare Edge Gateway.

curl -X POST https://quantsultant.dev/v1/reason/universal \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer tw_live_9f4a8c2e1b7d6035a4c8e2f1" \
  -d '{
  "query": "Reconcile longitudinal GAAP revenue recognition against amended Q4 10-K footnote 12.",
  "domain_hint": "finance_sec",
  "pod_cohort_id": "pod-quant-042"
}'
import requests

# 02 · Universal Semantic & Domain Router (POST /v1/reason/universal) — FastAPI / Python 3.11+ SDK Client
resp = requests.request(
    "POST",
    "https://quantsultant.dev/v1/reason/universal",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer tw_live_9f4a8c2e1b7d6035a4c8e2f1",
    },
    json={
  "query": "Reconcile longitudinal GAAP revenue recognition against amended Q4 10-K footnote 12.",
  "domain_hint": "finance_sec",
  "pod_cohort_id": "pod-quant-042"
}
)
print(resp.status_code, resp.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	// 02 · Universal Semantic & Domain Router (POST /v1/reason/universal) — Go 1.22+ Stream Mesh Client
	payload := []byte(`{"query": "Reconcile longitudinal GAAP revenue recognition against amended Q4 10-K footnote 12.", "domain_hint": "finance_sec", "pod_cohort_id": "pod-quant-042"}`)
	req, _ := http.NewRequest("POST", "https://quantsultant.dev/v1/reason/universal", bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer tw_live_9f4a8c2e1b7d6035a4c8e2f1")

	res, err := http.DefaultClient.Do(req)
	if err == nil {
		defer res.Body.Close()
		body, _ := io.ReadAll(res.Body)
		fmt.Println(string(body))
	}
}
// 02 · Universal Semantic & Domain Router (POST /v1/reason/universal) — Native Rust 2.5ms Bare-Metal Invocation
use std::time::Instant;

fn main() {
    let t0 = Instant::now();
    let request_json = r#"{"query": "Reconcile longitudinal GAAP revenue recognition against amended Q4 10-K footnote 12.", "domain_hint": "finance_sec", "pod_cohort_id": "pod-quant-042"}"#;
    // Executes in-memory against the 15.88 MB single-GPU / bare-metal index with zero GC pauses
    println!("Dispatched POST /v1/reason/universal ({} bytes) in {:?}", request_json.len(), t0.elapsed());
}
{
  "status": "STREAM_ACTIVE",
  "route": "/v1/reason/universal",
  "auth_scheme": "Argon2id + Bearer tw_live_...",
  "execution_ms": 2.5,
  "payload_echo": {
    "query": "Reconcile longitudinal GAAP revenue recognition against amended Q4 10-K footnote 12.",
    "domain_hint": "finance_sec",
    "pod_cohort_id": "pod-quant-042"
  }
}

5. Versioning, Error Codes & Rate Limits

Parameter / HTTP Code Status / Value Operational Behavior & Recovery
API Version v1 (Engine 2.5.0) Pinned schema contract across FastAPI, Go 1.22, Native Rust, and Cloudflare Edge. Provisional-patent charter waitlist active.
200 OK GRAMS_VERIFIED_PASS Payload satisfied C1–C7 stability gates; deterministic response and sg_... hash returned.
401 Unauthorized ARGON2ID_AUTH_REQUIRED Missing or invalid tw_live_... token. Re-authenticate via POST /v1/auth/argon2-verify.
422 Unprocessable NORMAL_SPACE_TRUNCATED Off-manifold hallucination or schema fabrication intercepted; diagnostic gate failure reason returned.
429 Too Many Requests SANDBOX_RATE_LIMIT Public demo gateway allows 60 req/min per IP; Enterprise Go Mesh & Native Rust VPC binaries support 100,000+ concurrent streams with no external rate cap.

One Verification Core · Two Direct Paths

API access is gated while we complete utility patent filings and IP legal structuring. Investors can start a direct SAFE & data-room conversation with Garrick Piñón; technical evaluators can reserve a gated tw_live_... API slot or 48-hour blind dataset proof of value.