Skip to main content
Every request needs one piece: an API key. The key is the sole identity — your organization is derived server-side from it, and every row is scoped to the calling org.

Get your credentials

  1. Sign in at app.xtrace.ai
  2. Open Settings → API Keys
  3. Create a new API key (xtk_…)
Treat the API key like a password — anyone with it can read and write memories under your org. Store it in a secrets manager or environment variable, never in source control.

Headers

Required on every request. Missing or invalid values:
Upgrading from an older integration? The X-Org-Id header is no longer needed and is deprecated. It’s still accepted during a compatibility window — if sent, it must match the key’s org (a mismatch returns 403 org_mismatch) — but it will be removed in a future release. New integrations must not send it.

Using the SDK

The SDK builds the header from a single constructor option:
That’s it — every method call on the client carries the right headers.

Storing credentials

Never commit API keys to source control. Use environment variables, a secrets manager (AWS Secrets Manager, GCP Secret Manager, 1Password CLI), or a .env file that’s in .gitignore.
A typical setup:
.env

Rotating a key

If a key leaks, treat it like any other credential incident:
  1. Issue a new key from your org admin tool
  2. Roll the new key into your environment / secrets manager
  3. Revoke the old key
Keys are long-lived; there is no automatic expiry in v1.

Browser vs server

The SDK works in both Node 18+ and modern browsers (it uses native fetch). Don’t ship API keys to a browser — proxy memory-API calls through your own backend so the key never leaves the server.