Sign in

How KeyShifter works

KeyShifter keeps your API keys in one encrypted vault. Your code and your AI coding agents get a token they can use instead of the key, and you can revoke that token at any time.

1. You add your keys

Paste a key, or drop a .env file anywhere on the dashboard. Your browser encrypts each key with AES-256-GCM before anything is sent, so the server only ever stores ciphertext. The security page explains the details.

Keys are grouped into pools, one per provider: OpenAI, Anthropic, Google Gemini, OpenRouter, Groq, Mistral, xAI, DeepSeek, Together AI, ElevenLabs, Replicate, or any other HTTP API you add yourself.

2. Projects get a token instead of the key

Every pool has a proxy URL. Your app sends its requests there and puts a KeyShifter token (it starts with ks_) where the API key would go. KeyShifter checks the token, adds the real key and forwards the request to the provider. Streaming responses work as usual.

.env
OPENAI_BASE_URL=https://keyshifter.app/p/openai/v1
OPENAI_API_KEY=ks_…

Most SDKs read a base URL setting, so your code stays the same.

3. Your AI agent connects over MCP

Connect Claude Code, Codex or Cursor once. The agent can list your pools and call setup_project_env, which creates a token for the project it is working on and returns the lines for its .env file. The agent never receives the raw key. See KeyShifter for Claude Code, Codex and Cursor for the setup commands.

4. One place to revoke

Every connection and project token is listed on the Connections page. Revoke one and it stops working immediately, while your other projects carry on. When you rotate a key at the provider, update it once in KeyShifter and every project uses the new key.

5. Backup keys take over when one fails

You can put more than one key in a pool, in the order you want them used. If the provider says a key is rate limited (429), out of credit (402 or “insufficient quota”) or invalid (401), KeyShifter rests that key and retries the same request with the next one. You can also set a daily request or monthly token limit per key.

  • Every shift is logged on the Activity page, with the reason.
  • Usage and tokens are counted per key, so you can see where your spend goes.
  • Backup keys are there for reliability. Follow each provider’s terms on how many accounts and keys you may use.

6. Optional: sync keys to a Cloudflare Worker

A site running on Cloudflare Workers reads its keys from Worker secrets. KeyShifter can write a pool into those secrets for you. It shows a preview first, and nothing is pushed until you confirm it in the dashboard, even when an agent asks for the sync.