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 ar_live_xxxxxxxxSee Authentication for details on obtaining and managing API keys.
OpenAPI Specification
The full OpenAPI specification is available at:
https://api.assistantrouter.com/docs/openapi.jsonYou can import this into tools like Postman, Insomnia, or use it with code generators.
Endpoints
Chat Completions
Create chat completions with streaming support. OpenAI-compatible.
Assistants
Create and manage AI assistants with custom configurations.
Documents
Upload and manage documents for RAG retrieval.
Conversations
View and manage conversation 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.