Overview
Base URL
Authentication
Integration with existing tools
Integration with Anthropic SDK
import anthropic
client = anthropic.Anthropic(
base_url="https://llm.onerouter.pro",
api_key="<<Your API Key>>"
)
message = client.messages.create(
model="anthropic/claude-sonnet-4.5",
max_tokens=1000,
temperature=1,
system=[
{
"type": "text",
"text": "You are a world-class poet. Respond only with short poems."
}
],
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Why is the ocean salty?"
}
]
}
]
)
print(message.content)Configuring Claude Code
Claude Code Integration GuideError handling
Common error codes
Error response format
Last updated