SDKs
SDKs & Libraries
Official SDKs and client libraries for AssistantRouter.
SDKs & Libraries
AssistantRouter is fully compatible with OpenAI SDKs. You can use the official OpenAI libraries in any language by simply changing the base URL.
No special SDK required! Use the standard OpenAI SDK with a custom base URL.
Official SDKs
TypeScript / JavaScript
Use the OpenAI Node.js SDK with AssistantRouter.
Python
Use the OpenAI Python SDK with AssistantRouter.
REST API
Direct HTTP requests for any language.
Quick Setup
TypeScript
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.assistantrouter.com/v1',
apiKey: process.env.ASSISTANTROUTER_API_KEY,
});Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.assistantrouter.com/v1",
api_key=os.environ["ASSISTANTROUTER_API_KEY"],
)cURL
curl https://api.assistantrouter.com/v1/chat/completions \
-H "Authorization: Bearer $ASSISTANTROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "anthropic/claude-haiku-4.5", "messages": [{"role": "user", "content": "Hello!"}]}'