Get your credentials
- Sign in at app.xtrace.ai
- Open Settings → API Keys
- Create a new API key (
xtk_…)
Headers
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: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..env
Rotating a key
If a key leaks, treat it like any other credential incident:- Issue a new key from your org admin tool
- Roll the new key into your environment / secrets manager
- Revoke the old key
Browser vs server
The SDK works in both Node 18+ and modern browsers (it uses nativefetch). Don’t ship API keys to a browser — proxy memory-API calls through your own backend so the key never leaves the server.