Optimization
Configure caching, compression, and routing to reduce API costs.
Admin Only — Only organization administrators can modify optimization settings. Members benefit from the applied optimizations.
Optimization Methods
Reuse responses for identical or similar requests
Reduce token count while preserving meaning
Route simple queries to cost-effective models
Detect sensitive data before sending
Smart Caching
When a request is made, iri saves the response. Subsequent identical or semantically similar requests return the cached response instantly without an API call.
Example
Settings
Enable Caching
Turn response caching on or off
Cache TTL
Duration to keep cached responses (default: 24 hours)
Semantic Matching
Match similar questions, not just exact text
Prompt Compression
Compression reduces token count by removing redundant content while preserving semantic meaning. Less tokens means lower cost.
Compression Levels
Removes whitespace and filler words. Minimal quality impact.
Summarizes verbose sections. Good for most use cases.
Maximum compression. May affect complex task quality.
Start with Balanced for general use. Only use Aggressive for simple, repetitive tasks.
Smart Routing
Analyzes request complexity and routes simple queries to less expensive models while preserving quality for complex tasks.
Example Rules
Monitor response quality after enabling routing. Adjust thresholds if needed.
Security Scanning
Scans requests for sensitive data before sending to prevent accidental exposure.
Detection Types
- API keys and tokens
- Passwords and secrets
- Credit card numbers
- Social Security numbers
- Personal email addresses and phone numbers
Response Options
Warn Only
Log the finding but allow the request
Block Request
Reject requests containing sensitive data
Redact
Replace sensitive data with [REDACTED] and continue
Configuration
- Navigate to your organization
- Click the Optimization tab
- Configure each feature according to your needs
- Click Save Changes
Changes apply immediately to all API calls through your organization.