Sign up now for $10 free budget - Get an extra $40 when you get in touch

Privacy Modes

Keep your data secure by using private models and the full privacy mode

Usage Modes Overview

The AI Router offers three distinct operating modes to accommodate various privacy requirements and integration scenarios. The Model Routing mode provides the most streamlined experience, directly handling model calls and returning responses. For organizations with private models or specific security needs, Model Selection mode returns only the best model which can then be called manually. The Full Privacy mode offers maximum data protection by accepting pre-computed embeddings for the model selection.

Available Modes
  • Model Routing - Direct model execution through AI Router with automatic response handling
  • Model Selection - Returns the recommended model for manual execution in your environment
  • Full Privacy - Accepts only pre-computed embeddings to determine the best model while keeping your input data private

Using Private Models

Model Selection mode enables you to leverage AI Router's smart model selection while maintaining complete control over model execution. This mode is particularly valuable for organizations that:

  • Operate private models
  • Have strict data handling requirements regarding model providers
  • Need to maintain specific API or prompt configurations

Instead of routing your requests through the AI Router, you receive the model recommendation and handle the execution within your environment. This provides the flexibility to integrate with private deployments while benefiting from AI Router's model selection capabilities.

from airouter import AiRouter
 
client = AiRouter(
    api_key="<THE-API-KEY-YOU-GENERATED>"
)
 
model_name = client.get_best_model(
    messages=[
		{"role": "system", "content": "You are a helpful assistant."},
		{"role": "user", "content": "What is the meaning of life?"}
    ]
)

Full Privacy Mode

Full Privacy mode represents the highest level of data protection, ensuring your input content never leaves your environment. In this mode:

  • You generate embeddings for your input query locally using our SDK or using existing embeddings
  • Only these embeddings are sent to the AI Router
  • You receive the best model based on the embedding analysis
  • All model execution happens in your environment
from airouter import AiRouter
 
client = AiRouter(
    api_key="<THE-API-KEY-YOU-GENERATED>"
)
 
model_name = client.get_best_model(
    messages=[
		{"role": "system", "content": "You are a helpful assistant."},
		{"role": "user", "content": "What is the meaning of life?"}
    ],
    full_privacy=True
)

By default, the AI Router SDK uses FastEmbed with the paraphrase-multilingual-mpnet-base-v2 model to generate embeddings. If you already have existing text-embedding-3-small embeddings or prefer these, you can use them by handing them in and setting the embedding type:

from airouter import AiRouter, EmbeddingType
 
client = AiRouter(
    api_key="<THE-API-KEY-YOU-GENERATED>"
)
 
model_name = client.get_best_model(
    full_privacy=True,
    embedding=<YOUR-EMBEDDING>,
    embedding_type=EmbeddingType.TEXT_EMBEDDING_3_SMALL
)

If you already have different embeddings you'd like to use, we'll integrate them for you - please contact us at support@airouter.io to discuss compatibility options.

This approach is ideal for organizations handling sensitive data or those subject to strict privacy regulations, as it maintains complete control over raw input data.