Official SDKs
ARouter provides first-class SDKs for common languages:Python SDK
pip install arouter
Node.js / TypeScript SDK
npm install arouter
Go SDK
go get github.com/arouter-ai/arouter-go
cURL
Direct HTTP examples
OpenAI SDK (Any Language)
Because ARouter is OpenAI-compatible, the official OpenAI SDK works out of the box. Just changebase_url and api_key:
- Python
- Node.js
LangChain
ARouter works with LangChain’sChatOpenAI class:
- Python
- Node.js
Vercel AI SDK
Use ARouter as the backend for Vercel AI SDK applications:PydanticAI
Anthropic SDK (Native)
ARouter also provides a native Anthropic-compatible endpoint. Use the official Anthropic SDK without any OpenAI wrapper:Google Gemini SDK (Native)
ARouter provides a Gemini-compatible endpoint for the official Google Generative AI SDK:Other Frameworks
Any framework with an OpenAI-compatible adapter will work with ARouter. Common examples:
For any framework not listed here, check if it supports a
base_url / api_base configuration — if it does, ARouter will work.