Claude API Key Configuration — Create, Manage & Secure
How to create a Claude API key, set usage limits, rotate keys, and store them securely. Works with Cursor, VS Code, Claude Code, and OpenAI-compatible endpoints.
What Is a Claude API Key?
A Claude API key is a secret token that authenticates your requests to Anthropic's Claude models — including Claude Opus 4, Claude Sonnet 4, and Claude Haiku 3.5. ClaudeStore acts as an API gateway, providing instant key provisioning without the Anthropic waitlist.
Each key works with both the Anthropic Messages API and the OpenAI Chat Completions API, making it compatible with virtually every AI-powered tool — Cursor IDE, Claude Code, VS Code extensions, and custom applications.
Creating Your First API Key
Getting a Claude API key from ClaudeStore takes under two minutes:
- Log in to your ClaudeStore dashboard
- Navigate to API Keys
- Click Create Key
- Set an optional name and per-key credit limit
- Copy and securely store your key — it starts with
sk-cs2-
Per-Key Controls & Usage Tracking
ClaudeStore gives you fine-grained control over every API key:
- Credit limit — Cap the maximum spend per key to prevent runaway costs
- Usage tracking — Monitor token consumption, request counts, and cost per model in real time
- Instant revocation — Disable a compromised or unused key without affecting others
- Multiple keys — Create separate keys for development, staging, and production environments
Storing API Keys Securely
Follow these best practices to keep your Claude API credentials safe:
- Store keys in environment variables (
.envfiles), never in source code - Add
.envto your.gitignoreto prevent accidental commits - Use a secrets manager (Vault, AWS Secrets Manager, Doppler) in production
- Set per-key credit limits to cap exposure if a key leaks
- Rotate keys periodically — create a new key, update configs, then revoke the old one
- Never expose API keys in client-side JavaScript or public repositories
Using Your Key with IDEs and Tools
ClaudeStore API keys are drop-in replacements for Anthropic keys. Just set the base URL to https://api2.claudestore.store and use your sk-cs2- key:
- Cursor — Set the API key in Cursor Settings → Models → Anthropic
- Claude Code — Use a
sk-cs2-*key, setANTHROPIC_BASE_URL=https://api2.claudestore.storeandANTHROPIC_API_KEY(notANTHROPIC_AUTH_TOKEN) - VS Code — Configure in extension settings with custom endpoint
- OpenAI SDK — Use the
/v1/chat/completionsendpoint for tools expecting OpenAI format
Ready to get started? Buy Claude API credits and create your first key in under 2 minutes. See our Quickstart guide for a complete walkthrough.