(org_id, api_key_hash) and can’t reverse-lookup the org from the key without scanning.
Get your credentials
Both values come from the XTrace web app:- Sign in at app.xtrace.ai
- Open Settings → API Keys (or your organization page)
- Copy your Org id and create a new API key (
xtk_…)
Headers
Using the SDK
The SDK builds both headers from constructor options: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.