Anthropic-Compatible API Gateway
Use the LLMsRelay developer gateway with Anthropic-compatible Messages API and OpenAI-compatible API 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.
TL;DR
LLMsRelay provides Anthropic-compatible Messages API and OpenAI-compatible endpoints. Use the key group required by the model IDs returned through
GET /v1/models.What Is an Anthropic-Compatible Gateway?
An Anthropic-compatible gateway accepts Messages API requests at a custom base URL. LLMsRelay also provides an OpenAI-compatible endpoint for clients that use Chat Completions. The platform account has one usage balance and can issue separate API keys with limits and model controls.
The key group determines which model families are eligible. Confirm the available IDs and capabilities with GET /v1/models.
Two Endpoints, Matching Key Groups
| Endpoint | Base URL | Format | Best For |
|---|---|---|---|
| Anthropic Messages | https://api.llmsrelay.com/v1/messages | Anthropic SDK | Python/TS Anthropic SDK, Claude Code |
| OpenAI Compatible | https://api.llmsrelay.com/v1 | OpenAI SDK | Cursor, VS Code, any OpenAI-compatible tool |
Quick Examples
Anthropic Format
Anthropic-compatible requestbash
curl https://api.llmsrelay.com/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4.6",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Hello!"}]
}'OpenAI Format
OpenAI-compatible requestbash
curl https://api.llmsrelay.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4.6",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Hello!"}]
}'Why Use a Gateway?
- Two request formats: Anthropic-compatible Messages and OpenAI-compatible Chat Completions
- Usage controls: per-key limits, request history, and token-level reporting
- One-time usage packs: add balance without recurring billing
- Checkout options: available card and cryptocurrency methods are shown before payment
- Configurable tools: connect clients that allow a custom base URL
LLMsRelay API Formats
| Area | LLMsRelay behavior |
|---|---|
| Messages API | Use POST /v1/messages with x-api-key authentication |
| Chat Completions | Use POST /v1/chat/completions with Bearer authentication |
| Model discovery | Use GET /v1/models for the authenticated key |
| Billing | Platform usage is deducted from the account balance |
| Tool support | Works with clients that allow a compatible custom base URL |
Supported Tools & Integrations
- Cursor IDE — AI-powered code editor
- VS Code Extensions — Continue, Cline, Roo Code
- Claude Code CLI — terminal AI assistant
- Python SDK — Anthropic & OpenAI libraries
- TypeScript SDK — Node.js integration
- Any OpenAI-compatible tool — LangChain, LlamaIndex, etc.