🔄 Migration from OpenAI
Seamlessly migrate from OpenAI to QuantmLayer in under 10 minutes. Maintain compatibility while adding quantum-safe encryption.
✅ What You'll Gain
Quantum-safe encryption
Zero data retention
HIPAA-aligned infrastructure
Full audit trails
Same API interface
Enterprise support
Important Notes
While our API is OpenAI-compatible, some advanced features may have slight differences. Test thoroughly in our playground before deploying to production.
1
Update Your API Endpoint
Change from api.openai.com to api.quantmlayer.com
# Before
import openai
openai.api_base = "https://api.openai.com/v1"
# After
import quantmlayer
client = quantmlayer.SecureGPT(
api_key="ql_your_api_key",
base_url="https://api.quantmlayer.com/v1"
)2
Add Encryption Parameters
Include encryption settings in your requests
# Enhanced with encryption
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello"}],
encryption="kyber512", # New parameter
compliance_mode="hipaa" # Optional
)3
Update Error Handling
Handle QuantmLayer-specific response format
try:
response = client.chat.completions.create(...)
# Access standard OpenAI response
content = response.choices[0].message.content
# Access QuantmLayer metadata
encryption_info = response.encryption
compliance_info = response.compliance
except quantmlayer.exceptions.QuantmLayerError as e:
print(f"QuantmLayer error: {e}")Feature Comparison
| Feature | OpenAI | QuantmLayer |
|---|---|---|
| API Compatibility | ✅ Native | ✅ 100% Compatible |
| End-to-End Encryption | ❌ Transport only | ✅ Quantum-safe |
| Data Retention | ❌ 30+ days | ✅ Zero retention |
| HIPAA Alignment | ⚠️ With BAA | ✅ By design |
| Audit Logging | ❌ Limited | ✅ Comprehensive |
Migration Testing Checklist
Test basic chat completions with your existing prompts
Verify response format matches your current parsing logic
Test error handling with invalid requests
Validate encryption metadata in responses
Check latency impact (expect <50ms overhead)
Test with your authentication/API key management
Verify audit logs are captured correctly