SDKs & Libraries

Anthropic SDK

Use the official anthropic package with Prismma's root base URL.

Install

shell
pip install anthropic
shell
npm install @anthropic-ai/sdk

Configure

Set base_url to Prismma's root URL (not /v1) and api_key to your sk-eu-... key — the SDK appends /v1/messages itself, same as it would for api.anthropic.com.

messages.py
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.prismma.ai",  # root — the SDK appends /v1/messages itself
    api_key="sk-eu-YOUR-KEY",
)

message = client.messages.create(
    model="claude-opus-4-7",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Prismma"}],
)
print(message.content[0].text)
Root base URL, not /v1 — this is the opposite convention from the OpenAI SDK, which does take /v1 in its base_url.