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.
| Item | Value |
|---|---|
| Base URL | https://api.essevin.com without /v1 |
| Key environment variable | ESSEVIN_CLAUDE_API_KEY |
| Protocol | Anthropic Messages: POST /v1/messages |
| Model ID | Use 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 anthropicimport 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)