How do I add my RelayKit key as a secret?
Your RelayKit key goes in your project’s secrets: a place your code can read and your AI tool’s chat never sees. Anyone with your key can send texts as your brand, so treat it like a password.
Never paste your key into an AI chat.
Cursor, Claude Code, Copilot, Windsurf, Cline or Codex
-
In your workspace, open Connect your product and click Copy test key. It copies the whole line:
RELAYKIT_API_KEY=rk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -
Paste it into the
.envfile at your project’s root. No.envyet? Ask your AI tool to make one; it keeps the file out of your code history.
Can’t find .env? Files that start with a dot are hidden on your computer. Ask your AI tool to open it for you.
Replit
Open Secrets (the padlock in the left bar) and add RELAYKIT_API_KEY. For the value, paste your key: the part of the copied line after the =.
Vercel
In Project Settings, open Environment Variables and add RELAYKIT_API_KEY, with your key as the value, for every environment that sends texts.
Test key vs live key
You build and test with your test key (rk_test_…). It only sends to your verified test phones. When your registration is approved, you’ll get a live key (rk_live_…). It goes in the same place, and your code doesn’t change.
If a key ever leaks
Rotate it in Settings, under API keys: open the three-dot menu beside your key and choose Rotate. Your old key keeps working for 24 hours while you swap in the new one, then stops. If someone else has it, choose Revoke from the same menu instead: it stops at once.