Skip to main content

Request

GET https://api.spectralmemory.com/decode?user_id=alice&label=USER.gpu
Authorization: Bearer YOUR_API_KEY

Query parameters

ParameterTypeRequiredDescription
user_idstringYour user identifier
labelstringChannel label to decode
use_modelbooleanIf true, decode via model inference instead of state. Default: false

Response

{
  "user_id": "alice",
  "label": "USER.gpu",
  "value": "RTX5090",
  "source": "state",
  "latency_ms": 0
}
FieldDescription
valueDecoded fact value
source"state" (fast path) or "model" (inference path)
latency_msInference latency. 0 for state path. ~400ms for model path.

Fast path vs. slow path

Fast path (default, use_model=false): reads the value directly from persistent server-side state. Instant. Use for routine agent queries. Slow path (use_model=true): sends the .mem block to the Hermes3 inference endpoint. The model performs implicit frequency decomposition to recover the value. Use to verify spectral encoding integrity.

Errors

CodeReason
400Unknown label
401Invalid or missing API key
404No FDM block found for user_id (slow path only)

Notes

  • Does not count against your monthly encode limit.
  • The slow path falls back to DSP-based decoding if the Modal inference endpoint is unavailable.