Skip to main content

Request

POST https://api.spectralmemory.com/encode
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Body

FieldTypeRequiredDescription
user_idstringYour user identifier
labelstringChannel label (e.g. USER.gpu)
valuestringValue to encode (max 4 chars effective)
session_idstringOptional session identifier for research logging

Example

{
  "user_id": "alice",
  "label": "USER.gpu",
  "value": "RTX5090",
  "session_id": "sess_001"
}

Response

{
  "status": "ok",
  "label": "USER.gpu",
  "value": "RTX5090",
  "channel": 3,
  "channel_count": 1
}
FieldDescription
status"ok" on success
labelThe label that was encoded
valueThe value as provided
channelCarrier channel index (0–39)
channel_countTotal number of facts currently encoded for this user

Errors

CodeReason
400Unknown label — see available channels
401Invalid or missing API key
429Monthly encode limit reached

Notes

  • Each call re-encodes the full composite signal. All previously stored facts are preserved.
  • Values longer than 4 characters are silently truncated to 4 bytes.
  • This call increments your monthly usage counter.