SDKs

Anthropic SDK

Use the official Anthropic SDKs by pointing them at Roteo.

Because the Messages API is Anthropic-compatible, the official Anthropic SDKs work with Roteo. Set the base URL to https://api.roteo.ai and use your sk_ key as the API key.

from anthropic import Anthropic

client = Anthropic(
  base_url="https://api.roteo.ai",
  api_key="sk_your_key",
)

message = client.messages.create(
  model="claude-sonnet-4-6",
  max_tokens=1024,
  messages=[{"role": "user", "content": "Hello, Roteo!"}],
)
print(message.content[0].text)
python · 13 lines

Everything else works as documented by the SDK, including streaming, tool use, and token counting. For images, use any OpenAI-compatible client pointed at the same base URL.

Anthropic SDK | Roteo