API Reference
API Reference
Complete API documentation for AssistantRouter's OpenAI-compatible API.
API Reference
AssistantRouter provides an OpenAI-compatible REST API that works with existing OpenAI SDKs and tools.
Base URL
All API requests should be made to:
https://api.assistantrouter.com/v1Authentication
All requests require an API key in the Authorization header:
Authorization: Bearer sk-xxxxxxxx...See Authentication for details on obtaining and managing API keys.
Endpoints
Chat Completions
Create chat completions with streaming support. OpenAI-compatible.
Conversations
View and manage conversation history.
Models
List available AI models and their capabilities.
Wallet
Check wallet balance and transaction history.
Response Format
All responses are returned as JSON with the following structure:
Success Response
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1704067200,
// ... resource-specific fields
}Error Response
{
"error": {
"message": "Invalid API key provided",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}See Errors for a complete list of error codes.
Rate Limiting
API requests are subject to rate limits based on your workspace configuration. See Rate Limits for details.