Anthropic SDK

Call Claude models through Essevin with the Anthropic SDK.

Keep the Anthropic Messages API structure and replace only the Base URL, Claude plan key, and model ID.

ItemValue
Base URLhttps://api.essevin.com without /v1
Key environment variableESSEVIN_CLAUDE_API_KEY
ProtocolAnthropic Messages: POST /v1/messages
Model IDUse an ID returned by GET /v1/models for the Claude plan key

Do not configure a Claude plan key as OpenAI Compatible. Keep the SDK's native Anthropic authentication and Messages API request structure.

Install and send a minimal request

python -m pip install anthropic
import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.essevin.com",
    api_key=os.environ["ESSEVIN_CLAUDE_API_KEY"],
)

msg = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)

On this page