Client SDKs
Choose the right client format for LLMsRelay: native Anthropic Messages API, OpenAI-compatible SDKs, cURL, or IDE clients like Cursor and Claude Code.
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.
Anthropic format: https://api.llmsrelay.com. OpenAI-compatible format: https://api.llmsrelay.com/v1. Same API key: Yes. Best for IDE setup: Cursor or Claude Code guides.
Choose Your Client
| Client | Use when | Base URL | Start here |
|---|---|---|---|
| Anthropic SDK | New Claude integrations, native tool use, native streaming events, direct Messages API | https://api.llmsrelay.com | Python / TypeScript |
| OpenAI SDK | Existing chat-completions codebase, provider switching, OpenAI ecosystem tools | https://api.llmsrelay.com/v1 | OpenAI Compatibility |
| cURL | Quick smoke tests, CI checks, debugging request payloads, shell scripts | Depends on format | cURL examples |
| IDE clients | Interactive coding in Cursor, Claude Code, VS Code extensions | Guide-specific | Cursor / Claude Code |
Quick Setup Rules
- Use the Anthropic SDK with
https://api.llmsrelay.comand the native Messages API. - Use the OpenAI SDK with
https://api.llmsrelay.com/v1and Chat Completions. - Keep the same Claude model IDs across both formats. Use the current list from
GET /v1/models, for exampleclaude-opus-5,claude-sonnet-5, orclaude-haiku-4.5. - Use the same LLMsRelay API key across SDKs, scripts, and supported IDEs.
If you are starting from scratch, prefer the native Anthropic format. If you already have OpenAI-compatible tooling in production, prefer the OpenAI-compatible route for lower migration effort.
Common Mistakes
- Using
/v1with the Anthropic SDK. The native client should point tohttps://api.llmsrelay.comwithout the suffix. - Using the bare domain with the OpenAI SDK. OpenAI-compatible clients should point to
https://api.llmsrelay.com/v1. - Copying the wrong endpoint style for the wrong client.
/v1/messagesis native Anthropic format;/v1/chat/completionsis OpenAI-compatible format. - Putting API keys in frontend browser code. Keep LLMsRelay keys on the server side, in edge functions, or in local developer tooling.
- Using stale model IDs copied from old examples. Prefer the current stable model names shown in the docs and models endpoint.
Recommended Paths
- Python SDK for backend services, scripts, and async workflows.
- TypeScript SDK for Node.js apps, workers, and serverless runtimes.
- cURL for copy-paste verification and shell automation.
- Cursor and Claude Code for interactive coding clients.
- OpenAI Compatibility if your stack already depends on the OpenAI SDK or Chat Completions payloads.