SDKs

Anthropic SDK

The Anthropic SDKs call the Messages API, which currently serves Claude Code.

The official Anthropic SDKs send their requests to the Messages API. That endpoint currently serves Claude Code only, so a request from an Anthropic SDK gets 403.

To call Claude from your own code, use the OpenAI SDK with a claude-* model:

from openai import OpenAI

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

response = client.chat.completions.create(
  model="claude-sonnet-4-6",
  messages=[{"role": "user", "content": "Hello, Roteo!"}],
)
print(response.choices[0].message.content)
python · 12 lines

Streaming and tools work on the same call; see Chat Completions.

Anthropic SDK | Roteo