SDKs & agents
SDKs & agents
Anything that speaks the OpenAI chat-completions API works unchanged. Point the base URL at https://atmorouter.dev/v1 and use your ar- key.
Python
python
pip install openai from openai import OpenAI client = OpenAI(base_url="https://atmorouter.dev/v1", api_key="ar-xxxxxxxxxxxx")
Node.js
javascript
npm install openai
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://atmorouter.dev/v1",
apiKey: process.env.ATMOROUTER_API_KEY,
});
const res = await client.chat.completions.create({
model: "cbcn/glm-5.3",
messages: [{ role: "user", content: "Explain PKCE." }],
});Environment variables
Most tools read the standard OpenAI variables, so exporting these two is often the whole integration:
bash
export OPENAI_BASE_URL="https://atmorouter.dev/v1" export OPENAI_API_KEY="ar-xxxxxxxxxxxx"
Frameworks
| Tool | How to point it here |
|---|---|
| LangChain | Pass base_url and api_key to ChatOpenAI. |
| LlamaIndex | Same two arguments on the OpenAI LLM class. |
| LiteLLM | Use the openai/ provider prefix with api_base set. |
| Coding agents | Anything reading OPENAI_BASE_URL works. Set the two variables above. |
Anthropic SDK
The Anthropic Messages API is supported natively. Note the base URL has no /v1 suffix, because the Anthropic SDK appends it itself. Any model in the catalogue can be called this way, not only Claude.
python
from anthropic import Anthropic
client = Anthropic(
base_url="https://atmorouter.dev",
api_key="ar-xxxxxxxxxxxx",
)
msg = client.messages.create(
model="cb/claude-opus-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Write a haiku."}],
)
print(msg.content[0].text)bash
curl https://atmorouter.dev/v1/messages \
-H "x-api-key: ar-xxxxxxxxxxxx" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "cb/claude-opus-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello"}]
}'Errors on this surface use the Anthropic error envelope (
{"type":"error","error":{...}}), so Anthropic SDKs parse them correctly. Streaming follows the Anthropic event protocol (message_start, content_block_delta, message_delta).