SDKs and protocols

Anthropic SDK

Call Claude models through HopBase with the Anthropic SDK.

To call Claude models, change the base_url.

from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.hop-base.com",
    api_key="sk-your-key",
)

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