Quickstart
Send your first LLMsRelay API request with Anthropic-compatible or OpenAI-compatible formats.
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.
Base URL: https://api.llmsrelay.com. Endpoint: POST /v1/messages. Auth header: x-api-key: YOUR_KEY. Default model: claude-opus-5-5. Time to first call: ~2 minutes.
Create a key
From your LLMsRelay dashboard
Send a request
Use Messages or Chat Completions
Connect your tools
Cursor, Claude Code, or your SDK
1. Get Your API Key
Sign up at llmsrelay.com and create an API key from your dashboard. Your key will look like sk-cs4-....
Validate gateway access
Before sending real requests, run two cheap checks: a health probe and a models list. They confirm the base URL, your network, and (for /v1/models) your API key — without spending any credits.
1. Liveness probe — /healthz
Public, unauthenticated. Returns 200 and a JSON status payload when the gateway is up. Use it from CI, monitoring, or any shell.
curl -sS -o /dev/null -w "HTTP %{http_code}\n" \
https://api.llmsrelay.com/healthz2. Auth + catalogue — /v1/models
Returns the list of model IDs you can use with the messages API. Requires a valid x-api-key. If this works, your key, base URL, and headers are all correct.
curl -sS https://api.llmsrelay.com/v1/models \
-H "x-api-key: $ANTHROPIC_API_KEY" | jq '.data[].id'2. Send Your First Request
curl https://api.llmsrelay.com/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-5-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "What is the capital of France?"}
]
}'3. Set Up IDE Integration
Cursor
In Cursor Settings → Models → Add Provider:
- Base URL:
https://api.llmsrelay.com/v1 - API Key: your LLMsRelay API key
- Add a model ID returned by
GET /v1/models, for exampleclaude-opus-5-5
Claude Code
Claude Code CLI uses api.llmsrelay.com with sk-cs4-* keys. Use ANTHROPIC_API_KEY only — never ANTHROPIC_AUTH_TOKEN.
Linux / macOS:
export ANTHROPIC_BASE_URL="https://api.llmsrelay.com"
export ANTHROPIC_API_KEY="YOUR_SK_CS4_KEY"
export ANTHROPIC_MODEL="claude-opus-5-5"
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4.5"Windows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://api.llmsrelay.com"
$env:ANTHROPIC_API_KEY = "YOUR_SK_CS4_KEY"
$env:ANTHROPIC_MODEL = "claude-opus-5-5"
$env:ANTHROPIC_SMALL_FAST_MODEL = "claude-haiku-4.5"4. List Available Models
List the model IDs currently available to your key:
curl https://api.llmsrelay.com/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"Free model API offers
See the current free API offer pages for supported model IDs and setup examples:
5. Billing Basics
- Choose a one-time platform usage pack. Current prices and credited usage are shown on the Plans page.
- You are billed per token (input + output) based on the model used
- Check your balance anytime in the dashboard
- Purchased usage remains available until it is consumed
Next Steps
- Explore the API Reference
- Set up Streaming
- Learn about Pricing
- Configure IDE Integrations