Skip to main content

Endpoints

LLMEasy now uses two different endpoints by protocol:
ScenarioBase URLProtocol
Claude Code / ANTHROPIC_BASE_URLhttps://www.llmeasy.ruAnthropic
Codex / OPENAI_BASE_URL / external toolshttps://www.llmeasy.ru/v1OpenAI-style / OpenAI Responses
Do not keep using one shared endpoint for every protocol.

Authentication and examples

Pass your LLMEasy API Key with the request:
import anthropic

client = anthropic.Anthropic(
    base_url="https://www.llmeasy.ru",
    api_key="YOUR_API_KEY",
)

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
curl https://www.llmeasy.ru/messages       -H "x-api-key: YOUR_API_KEY"       -H "anthropic-version: 2023-06-01"       -H "content-type: application/json"       -d '{ ... }'

Model selection rules

  • Claude Code + Claude Key group: do not set model variables manually; only configure ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN
  • Claude Code + GPT Key group: add model mappings through ANTHROPIC_DEFAULT_HAIKU_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, and ANTHROPIC_DEFAULT_OPUS_MODEL
  • Codex: use a model ID copied from the GPT Key group in the model plaza
  • External tools: also use GPT Key group model IDs instead of fixed Claude model names
For external tools, you usually only need the Base URL, API key, and model specified by that tool’s official docs. Only add extra headers when the tool itself or your upstream gateway explicitly requires them.

Environment variable reference

VariableValueUsage
ANTHROPIC_BASE_URLhttps://www.llmeasy.ruClaude Code
ANTHROPIC_AUTH_TOKENYour API KeyClaude Code auth
OPENAI_BASE_URLhttps://www.llmeasy.ru/v1Codex and other OpenAI-style tools
OPENAI_API_KEYYour API KeyOpenAI-style tool auth
API_TIMEOUT_MS3000000Recommended for long tasks
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC1Claude Code only