LLMsRelay API Key Configuration
Create a LLMsRelay API key, set usage limits, rotate it, and store it securely. Works with tools that support Anthropic-compatible or OpenAI-compatible endpoints.
LLMsRelay is an independently operated API gateway. It is not affiliated with or endorsed by Anthropic, PBC. Product and model names are used only to describe compatibility.
What Is a LLMsRelay API Key?
A LLMsRelay API key is a secret token that authenticates requests to the LLMsRelay developer gateway. It works with supported Anthropic-compatible and OpenAI-compatible request formats. Use GET /v1/models to check which model IDs the key can use.
Use the key with tools that support a custom base URL, including Cursor IDE, Claude Code, VS Code extensions, and custom applications.
Creating Your First API Key
Creating a LLMsRelay API key takes a few steps:
- Log in to your LLMsRelay 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-cs4-
Per-Key Controls & Usage Tracking
LLMsRelay 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 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
Configure your client to use the compatible base URL and your sk-cs4- key. The exact option names depend on the tool:
- Cursor — Set the API key in Cursor Settings → Models → Anthropic
- Claude Code — Use a
sk-cs4-*key, setANTHROPIC_BASE_URL=https://api.llmsrelay.comandANTHROPIC_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 platform usage and create your first key. See the Quickstart guide for a complete walkthrough.