base_url, api_key, and optionally your app attribution headers.
1. Get Your API Key
Sign up at the ARouter Dashboard and create an API key. Your key will look likelr_live_xxxxxxxxxxxx.
2. Install the ARouter SDK
The first-party@arouter/sdk works in any Node.js or TypeScript project and supports npm, yarn, and pnpm.
- npm
- yarn
- pnpm
3. Use Your Existing SDK
Already using OpenAI, Anthropic, or Go? The only changes arebase_url and api_key.
- Python (OpenAI)
- Node.js (OpenAI)
- Python (Anthropic)
- Go
- cURL
- fetch
HTTP-Referer and X-Title are optional. Include them if you want ARouter Dashboard analytics to attribute requests to a specific app or workflow.4. Use the API Directly
If you prefer not to install an SDK, you can call ARouter with any HTTP client:5. Try Different Providers
With ARouter, switching providers is just changing themodel string:
What’s Next?
Authentication
Learn about the three auth methods
Model Routing
Understand the provider/model format and multi-model routing
Billing & Credits
Review pricing, balance, and credit rules
Request Attribution
Attribute traffic to your app in Dashboard analytics
Streaming
Enable real-time streaming responses
Tool Calling
Give models access to your functions
Structured Outputs
Force models to return valid JSON schema
Prompt Caching
Reduce cost and latency for repeated prompts
Key Management
Create scoped keys for your team
FAQ
Common questions answered