Introduction
Welcome to AssistantRouter - a provider-agnostic AI assistant platform with OpenAI-compatible API.
Introduction
AssistantRouter is a provider-agnostic AI assistant platform that gives you full control over models, costs, and rate limiting while maintaining compatibility with the OpenAI API.
AssistantRouter is currently in v1.0. We're actively developing new features and would love your feedback!
Why AssistantRouter?
Building AI-powered applications often means:
- Being locked into a single provider
- Losing control over costs
- Managing complex rate limiting yourself
- Building RAG pipelines from scratch
AssistantRouter solves these problems by providing a unified platform that works with any LLM provider.
Key Features
OpenAI Compatible
Drop-in replacement for OpenAI SDK. Use your existing code with any model provider.
RAG Support
Upload documents, automatic chunking and embeddings. Built-in knowledge retrieval.
Tools & Functions
Built-in web search, custom function calling, and extensible tool system.
Wallet System
Pre-paid balance with streaming reservations. Full cost control and transparency.
How It Works
- Create assistants in the dashboard with system prompts, model settings, and tools
- Generate an API key to authenticate your requests
- Call the API using your assistant ID - we handle the rest
Quick Example
Use the OpenAI SDK with AssistantRouter by changing the base URL and using your assistant ID:
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.assistantrouter.com/v1',
apiKey: process.env.ASSISTANTROUTER_API_KEY, // sk-xxx...
});
const response = await client.chat.completions.create({
// @ts-ignore - assistant_id is our extension
assistant_id: 'your-assistant-uuid', // Created in dashboard
messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(response.choices[0].message.content);The assistant's system prompt, model, and tools are automatically applied. You can optionally override settings per-request.