/Docs
Back to dashboard

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

ClientUse whenBase URLStart here
Anthropic SDKNew Claude integrations, native tool use, native streaming events, direct Messages APIhttps://api.llmsrelay.comPython / TypeScript
OpenAI SDKExisting chat-completions codebase, provider switching, OpenAI ecosystem toolshttps://api.llmsrelay.com/v1OpenAI Compatibility
cURLQuick smoke tests, CI checks, debugging request payloads, shell scriptsDepends on formatcURL examples
IDE clientsInteractive coding in Cursor, Claude Code, VS Code extensionsGuide-specificCursor / Claude Code

Quick Setup Rules

  • Use the Anthropic SDK with https://api.llmsrelay.com and the native Messages API.
  • Use the OpenAI SDK with https://api.llmsrelay.com/v1 and Chat Completions.
  • Keep the same Claude model IDs across both formats. Use the current list from GET /v1/models, for example claude-opus-5, claude-sonnet-5, or claude-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 /v1 with the Anthropic SDK. The native client should point to https://api.llmsrelay.com without 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/messages is native Anthropic format; /v1/chat/completions is 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.

Ready to start?

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

View Plans