PureRouter Quickstart
PureRouter is a completely independent product from PureCPP. You can use PureRouter without needing PureCPP and vice versa.
Installation
Install PureRouter using pip:Note: For detailed installation instructions and requirements, see the installation page.
Basic Configuration
Import and configure PureRouter in your Python application:Note: You need to obtain a valid API key from the PureAI platform. This key allows access to the different routing profiles and deployments configured in your account.
Query Routing
There are two main ways to use PureRouter:1. Routing via /v1/infer
You can automatically route queries to the most suitable model using different profiles:2. Direct call to a specific deployment
You can also directly call a specific model using its deployment ID:Workflow
- Sign up for the PureAI platform - Register and configure your LLM provider API keys
- Get your router API key - Generate an API key on the platform to use the service
- Install the Python library - Add the purerouter package to your project
- Choose the routing profile - Select between economy, balanced, or quality according to your needs
- Implement routing - Integrate PureRouter into your application flow
- Optional: Deploy models - Deploy open source models and use them directly by ID