Prerequisites
- An Auriko API key
- Python 3.10+ with
aurikoSDK installed (pip install auriko)- OR Node.js 18+ with
@auriko/sdkinstalled (npm install @auriko/sdk)
- OR Node.js 18+ with
- Active usage to see cost comparisons
How It Works
When you setoptimize: "cost", Auriko:
- Identifies all providers that can serve your model
- Compares real-time pricing across providers
- Routes to the cheapest available option
- Falls back to alternatives if the cheapest is unavailable
Enable Cost Optimization
Cost with Latency Constraints
Optimize for cost while maintaining latency requirements:Restrict key source
If you have negotiated provider rates through your own API keys, force requests to use only BYOK keys for cost control:View Your Costs
Every response includes detailed cost information:Cost Comparison Example
Without Auriko (single provider):Cost Breakdown
Track costs by model and provider in your dashboard:| Model | OpenAI | Anthropic | Fireworks AI | Auriko (optimized) |
|---|---|---|---|---|
| GPT-4o | $0.005/1K | - | - | $0.005/1K |
| Claude Sonnet | - | $0.003/1K | $0.003/1K | $0.003/1K |
Best Practices
Batch Similar Requests
Group similar requests to maximize cache hits and reduce costs
Use Appropriate Models
Use smaller models for simple tasks, reserve large models for complex ones
Monitor Usage
Track costs in your dashboard to identify optimization opportunities
Set Budgets
Configure spending limits in your dashboard settings
Use Cases
Background Processing
For batch jobs where latency doesn’t matter:With Latency Budget
For user-facing features with cost consciousness:A/B test providers
Compare costs across providers:Dashboard
Track your cost savings in the Auriko dashboard:- Total spend by day/week/month
- Cost per model
- Cost per provider
- Savings vs. single-provider baseline
View Dashboard
Monitor your usage and costs in real-time