The Challenge

In today’s AI landscape, organizations face a critical trade-off between innovation and security. Traditional encryption breaks AI functionality, forcing teams to choose between protecting sensitive data and maintaining AI performance. This creates significant risks in regulatory compliance, data privacy, and intellectual property protection.

Mirror Vectax SDK enables privacy-preserving AI by providing specialized encryption designed for machine learning operations.

Our Solution

Organizations can now perform AI operations on encrypted data without sacrificing model accuracy or performance. Here are our key features:

Secure Vector Operations

Enterprise-grade security for vector operations with similarity-preserving encryption. Protect your embeddings while maintaining searchability.

Fine-Grained Access Control

Built-in RBAC with multi-dimensional policies. Control access at role, group, and department levels with comprehensive audit trails.

Format-Preserving Encryption

Encrypt sensitive data while maintaining format and searchability. Perfect for securing metadata, PII, and structured data.

Secure Agents Pipeline

End-to-end security for machine learning workflows. From data ingestion to model serving, protect every step of your ML pipeline.

Vector Search

Encrypted similarity search with ChromaDB integration. Search through millions of vectors while maintaining data confidentiality.

Encrypted Inference

Run secure model inference with encrypted inputs and outputs. Perfect for sensitive applications and regulated industries.

Industry Solutions

Financial institutions must comply with strict data protection regulations while processing sensitive transaction data.

Process sensitive transaction data, detect fraud patterns, and protect trading algorithms while maintaining regulatory compliance.

Getting Started

This guide will help you get started with Mirror Vectax SDK in 15 minutes.

Requirements

Python 3.9+
Mirror Vectax API key
OpenAI API key (optional - for examples)

Installation

1

Install Core SDK

# Install core SDK
pip install mirror-sdk

# For examples with OpenAI and ChromaDB
pip install mirror-sdk[examples]
2

Configure Environment

export MIRROR_API_KEY="your-api-key"
export OPENAI_API_KEY="your-openai-key"  # if using examples
3

Initialize SDK

from mirror_sdk.core.mirror_core import MirrorSDK, MirrorConfig

config = MirrorConfig.from_env()
sdk = MirrorSDK(config)

Basic Usage

Secure Vector Operations

from mirror_sdk.core.models import VectorData

# Encrypt model embeddings
embeddings = [1.0, 2.0, 3.0, 4.0, 5.0]
vector = VectorData(vector=embeddings, id="customer_vector")
encrypted = sdk.vectax.encrypt(vector)

# Decrypt when needed
decrypted = sdk.vectax.decrypt(encrypted)

Access Control

# Set up access policies
policy = {
    "roles": ["data_scientist", "analyst"],
    "groups": ["research"],
    "departments": ["ai"]
}
sdk.set_policy(policy)

# Generate user access key
user_key = sdk.rbac.generate_user_secret_key({
    "roles": ["data_scientist"],
    "groups": ["research"],
    "departments": ["ai"]
})

Real-World Example

Here’s a complete example of securing an AI workflow:

import openai
from mirror_sdk.core.models import VectorData

# 1. Get document embedding
doc = "Customer feedback analysis"
embedding = openai.embeddings.create(
    model="text-embedding-3-small",
    input=doc
).data[0].embedding

# 2. Encrypt embedding
vector = VectorData(
    vector=embedding,
    id="feedback_1"
)
encrypted = sdk.vectax.encrypt(vector)

# 3. Set access controls
policy = {
    "roles": ["analyst"],
    "groups": ["customer_success"]
}
user_key = sdk.rbac.generate_user_secret_key(policy)

# 4. Secure metadata
metadata = {
    "source": "feedback_survey",
    "date": "2024-03-01"
}
key = sdk.metadata.generate_key()
tweak = sdk.metadata.generate_tweak_from_data(metadata)
encrypted_metadata = sdk.metadata.encrypt(metadata, key, tweak)

For detailed examples and best practices, check out our complete documentation.

Ready to Get Started?

Questions? Contact us at hello@mirrorsecurity.io