Anthropic SDK

The official Anthropic client, pointed at LuxeChain.

Steps

01
Install
pip install anthropic
02
Set the base
base_url is the LuxeChain root, without /v1.
03
Call messages
The standard messages endpoint works as-is.
python
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.luxechain.si",
    api_key="lxc_live_YOUR_KEY",
)

msg = client.messages.create(
    model="YOUR_MODEL_ID",       # any model id from /models
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello"}],
)
print(msg.content[0].text)
LuxeChain accepts the x-api-key header as well as Authorization: Bearer, so no shim is needed.

← All guides Get tokens