/Docs
Back to dashboard

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:

  1. Log in to your LLMsRelay dashboard
  2. Navigate to API Keys
  3. Click Create Key
  4. Set an optional name and per-key credit limit
  5. Copy and securely store your key — it starts with sk-cs4-
API keys are only shown once at creation. Store them securely — they cannot be retrieved later.

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 (.env files), never in source code
  • Add .env to your .gitignore to 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, set ANTHROPIC_BASE_URL=https://api.llmsrelay.com and ANTHROPIC_API_KEY (not ANTHROPIC_AUTH_TOKEN)
  • VS Code — Configure in extension settings with custom endpoint
  • OpenAI SDK — Use the /v1/chat/completions endpoint 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.

Ready to start?

Create a key and configure a compatible API route in under 2 minutes.

View Plans