Anthropic SDK

How to connect Anthropic-oriented workflows to Aramm where supported.

Aramm supports Anthropic-style message routing, so Anthropic SDK apps usually only need a base URL swap and a model id.

What you need

  • An Aramm API key
  • The Anthropic SDK installed
  • A model id such as anthropic/claude-sonnet-4-6

Quick setup

import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://router.aramm.ai",
    api_key=os.environ["ARAMM_API_KEY"],
)

message = client.messages.create(
    model="anthropic/claude-sonnet-4-6",
    max_tokens=64,
    messages=[{"role": "user", "content": "Say hi"}],
)

print(message.content[0].text)

Model naming

Anthropic models keep the provider/model pattern.

  • anthropic/claude-sonnet-4-6
  • anthropic/claude-haiku-4-5

Verify it works

Run one messages request and confirm the SDK receives a normal Anthropic response object.

Troubleshooting

  • 401 usually means the API key is wrong or missing.
  • model not found usually means the model id is not available in Aramm.
  • Use https://router.aramm.ai as the base URL, not the /v1 path.

On this page