Documentation Index Fetch the complete documentation index at: https://docs.continum.co/llms.txt
Use this file to discover all available pages before exploring further.
SDK Version
Current Version : 0.6.4
Configuration Methods
Global Configuration (Recommended)
Configure once and use everywhere:
import { continum } from '@continum/sdk' ;
continum . configure ({
apiKey: process . env . CONTINUM_API_KEY ! ,
preset: 'customer-support' ,
comply: [ 'GDPR' , 'SOC2' ],
alerts: {
slack: process . env . SLACK_WEBHOOK_URL ,
pagerduty: process . env . PAGERDUTY_KEY
}
});
// Now use protect() without passing config every time
const response = await continum . protect (
() => openai . chat . completions . create ({ ... })
);
Per-Call Configuration
Pass configuration to each protect() call:
import { protect } from '@continum/sdk' ;
const response = await protect (
() => openai . chat . completions . create ({ ... }),
{
apiKey: process . env . CONTINUM_API_KEY !
},
{
preset: 'customer-support' ,
comply: [ 'GDPR' , 'SOC2' ]
}
);
Configuration Options
interface ContinumConfig {
// Required
apiKey : string ;
// Automatic configuration
preset ?: Preset ;
comply ?: ComplianceFramework [];
// Manual sandbox configuration
sandbox ?: {
types ?: SandboxType [];
frameworks ?: ComplianceFramework [];
customRules ?: string [];
region ?: string ;
blockOn ?: RiskLevel ;
};
// Custom rules
customRules ?: string [];
// Environment
environment ?: 'production' | 'staging' | 'development' ;
region ?: string ;
// Blocking mode
blockOn ?: RiskLevel ;
// Alerts
alerts ?: {
slack ?: string ;
pagerduty ?: string ;
discord ?: string ;
webhook ?: string ;
};
// Violation handlers
onViolation ?: Partial < Record < ViolationCode , ViolationHandler >>;
onRiskLevel ?: Partial < Record < RiskLevel , ViolationHandler >>;
// Error handling
onError ?: ( error : Error ) => void ;
// Custom endpoint
baseUrl ?: string ;
}
Required Configuration
apiKey
Your Continum API key:
{
apiKey : process . env . CONTINUM_API_KEY !
}
Get your API key from the dashboard .
Automatic Configuration
preset
Automatically configure detection types for your use case:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
preset : 'customer-support'
}
Available presets:
customer-support - PII, content policy, bias
legal-ai - PII, legal compliance, hallucination, bias
fintech-ai - PII, financial compliance, security, bias
healthcare-ai - PII, content policy, bias, hallucination
coding-assistant - Security, supply chain, prompt injection
agent - Agent safety, prompt injection, data exfiltration
content-generation - Content policy, bias, hallucination
internal-tool - PII, security audit
data-pipeline - PII, data exfiltration, security
education-ai - Content policy, bias, hallucination
Learn more about presets →
comply
Specify compliance frameworks:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
preset : 'customer-support' ,
comply : [ 'GDPR' , 'SOC2' , 'HIPAA' ]
}
Supported frameworks:
GDPR, CCPA, HIPAA, SOC2, ISO_27001
EU_AI_ACT, FINRA, PCI_DSS, NIST_AI_RMF
FCA, PDPA, PIPEDA, UK_DPA_2018
Learn more about compliance →
Manual Sandbox Configuration
For advanced use cases, configure sandboxes directly:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
sandbox : {
types : [ 'PII_DETECTION' , 'SECURITY_AUDIT' , 'PROMPT_INJECTION' ],
frameworks : [ 'GDPR' , 'SOC2' ],
customRules : [ 'CUSTOM_RULE_1' ],
region : 'eu-west-1' ,
blockOn : 'HIGH'
}
}
Available detection types:
PII_DETECTION, BIAS_DETECTION, SECURITY_AUDIT
PROMPT_INJECTION, DATA_EXFILTRATION, AGENT_SAFETY
HALLUCINATION_DETECTION, CONTENT_POLICY
FINANCIAL_COMPLIANCE, LEGAL_COMPLIANCE
MULTI_TURN_ATTACK, SUPPLY_CHAIN_INTEGRITY
FULL_SPECTRUM, CUSTOM
Environment Configuration
environment
Specify the environment:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
environment : 'production' // 'production' | 'staging' | 'development'
}
region
Specify the region for data residency:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
region : 'eu-west-1' // EU data residency
}
Blocking Mode
Wait for audit results before returning response:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
blockOn : 'HIGH' // Block if risk level is HIGH or CRITICAL
}
Risk levels:
LOW - Block all violations
MEDIUM - Block MEDIUM, HIGH, CRITICAL
HIGH - Block HIGH, CRITICAL
CRITICAL - Block only CRITICAL
Learn more about blocking mode →
Alerts
Configure real-time alerts:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
alerts : {
slack : process . env . SLACK_WEBHOOK_URL , // HIGH/CRITICAL
pagerduty : process . env . PAGERDUTY_KEY , // CRITICAL only
discord : process . env . DISCORD_WEBHOOK_URL , // MEDIUM/LOW
webhook : process . env . CUSTOM_WEBHOOK_URL // All violations
}
}
Learn more about alerts →
Violation Handlers
React to specific violations in code:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
onViolation : {
PII_LEAK : async ( signal ) => {
await sendAlert ( 'PII detected' , signal );
},
PROMPT_INJECTION : async ( signal ) => {
await logSecurityIncident ( signal );
}
},
onRiskLevel : {
CRITICAL : async ( signal ) => {
await notifySecurityTeam ( signal );
}
}
}
Learn more about violation handlers →
Error Handling
Handle audit errors:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
onError : ( error ) => {
console . error ( 'Audit error:' , error );
// Never throws — audit failures don't break your app
}
}
Custom Endpoint
For self-hosted deployments:
{
apiKey : process . env . CONTINUM_API_KEY ! ,
baseUrl : 'https://your-continum-instance.com'
}
Per-Call Overrides
Override global configuration for specific calls:
continum . configure ({
apiKey: process . env . CONTINUM_API_KEY ! ,
preset: 'customer-support' ,
blockOn: 'HIGH'
});
// Override for this call
const response = await continum . protect (
() => openai . chat . completions . create ({ ... }),
{
blockOn: 'CRITICAL' , // Only block CRITICAL for this call
userId: 'user_123' ,
sessionId: 'session_456' ,
metadata: { feature: 'chat' }
}
);
Environment-Specific Configuration
Development
continum . configure ({
apiKey: process . env . CONTINUM_API_KEY ! ,
preset: 'customer-support' ,
environment: 'development'
});
Staging
continum . configure ({
apiKey: process . env . CONTINUM_API_KEY ! ,
preset: 'customer-support' ,
environment: 'staging' ,
alerts: {
slack: process . env . SLACK_WEBHOOK_URL
}
});
Production
continum . configure ({
apiKey: process . env . CONTINUM_API_KEY ! ,
preset: 'customer-support' ,
comply: [ 'GDPR' , 'SOC2' ],
environment: 'production' ,
blockOn: 'HIGH' ,
alerts: {
slack: process . env . SLACK_WEBHOOK_URL ,
pagerduty: process . env . PAGERDUTY_KEY
}
});
Configuration Best Practices
1. Use Environment Variables
Never hardcode API keys:
// ❌ Bad
{ apiKey : 'co_abc123...' }
// ✅ Good
{ apiKey : process . env . CONTINUM_API_KEY ! }
2. Start with Presets
Use presets instead of manual configuration:
// ✅ Good
{ preset : 'customer-support' , comply : [ 'GDPR' ] }
// ❌ Avoid (unless you have specific requirements)
{ sandbox : { types : [ 'PII_DETECTION' , 'BIAS_DETECTION' , ... ] } }
3. Validate Configuration
Check configuration at startup:
if ( ! process . env . CONTINUM_API_KEY ) {
throw new Error ( 'CONTINUM_API_KEY is required' );
}
continum . configure ({
apiKey: process . env . CONTINUM_API_KEY ,
preset: 'customer-support'
});
4. Use Global Configuration
Configure once, use everywhere:
// continum.ts
import { continum } from '@continum/sdk' ;
continum . configure ({
apiKey: process . env . CONTINUM_API_KEY ! ,
preset: 'customer-support' ,
comply: [ 'GDPR' , 'SOC2' ]
});
export { continum };
// app.ts
import { continum } from './continum' ;
const response = await continum . protect (
() => openai . chat . completions . create ({ ... })
);
Next Steps
Presets Explore presets and compliance frameworks
Alerts Set up real-time alerts
Blocking Mode Block requests based on violations
Configuration Advanced SDK configuration