Introducing Instant Mode: Zero-Setup AI Cost Optimization
Setting up cost optimization shouldn't require API keys, account creation, or complex configuration. That's why we built Instant Mode - start saving money on AI costs in 30 seconds.
The Problem: Setup Friction Kills Adoption
We heard from developers:
"I just want to test cost savings, why do I need to create another account?"
"Our CI/CD can't handle API key management for every SDK"
"I'm prototyping - I don't want to set up billing yet"
The old way:
- Create CostLens account
- Generate API key
- Configure environment variables
- Set up billing
- Finally start testing
The new way:
npm install costlens
Done.
What is Instant Mode?
Instant Mode lets you use CostLens SDK immediately without any setup. No API keys, no accounts, no configuration files.
Quick Comparison
| Feature | Instant Mode | Cloud Mode |
|---|---|---|
| Setup time | 30 seconds | 5 minutes |
| API key required | ❌ No | ✅ Yes |
| Account needed | ❌ No | ✅ Yes |
| Cost savings | Up to 70% | Up to 95% |
| Analytics | Basic | Advanced |
| Custom routing | ❌ No | ✅ Yes |
How It Works
Before: Complex Setup
// 1. Sign up at costlens.dev
// 2. Generate API key
// 3. Set environment variables
// 4. Configure routing rules
import { CostLens } from 'costlens';
const costlens = new CostLens({
apiKey: process.env.COSTLENS_API_KEY, // Required
routing: { /* complex config */ }
});
After: Instant Mode
import { CostLens } from 'costlens';
import OpenAI from 'openai';
// No setup needed!
const costlens = new CostLens();
const openai = new OpenAI({ apiKey: 'your-openai-key' });
// Start saving immediately
const resp costlens.optimize(openai).chat.completions.create({
model: "gpt-4",
messages: [{ role: "user", content: "Hello world" }]
});
// Automatically routes gpt-4 → gpt-3.5-turbo when appropriate
// Saves ~70% on costs
Real Cost Savings
Example: Customer Support Bot
// Before: Pure GPT-4
const openai = new OpenAI({ apiKey: 'your-key' });
const resp openai.chat.completions.create({
model: "gpt-4",
messages: [{ role: "user", content: "How do I reset my password?" }]
});
// Cost: $0.06 per request
// After: Instant Mode
const costlens = new CostLens();
const openai = new OpenAI({ apiKey: 'your-key' });
const resp costlens.optimize(openai).chat.completions.create({
model: "gpt-4", // You still request gpt-4
messages: [{ role: "user", content: "How do I reset my password?" }]
});
// Cost: $0.018 per request (70% savings)
// Quality: Same - simple questions don't need GPT-4
Monthly savings for 10K requests:
- Before: $600/month
- After: $180/month
- Saved: $420/month
Perfect Use Cases
1. Development & Testing
// Perfect for local development
const costlens = new CostLens(); // No keys in .env files
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
// Test cost optimization without setup
const result = await costlens.optimize(openai).chat.completions.create({
model: "gpt-4",
messages: [{ role: "user", content: "Test message" }]
});
2. CI/CD Pipelines
# GitHub Actions - no secret management needed
- name: Test with cost optimization
run: |
npm install costlens
npm test # Uses instant mode automatically
3. Quick Prototypes
// Hackathon? Conference demo? Just install and go
import { CostLens } from 'costlens';
const costlens = new CostLens();
// Start building, worry about advanced features later
4. Educational Projects
// Students learning AI development
// No credit cards or billing setup required
const costlens = new CostLens();
const openai = new OpenAI({ apiKey: 'provided-key' });
// Learn cost optimization without barriers
What You Get in Instant Mode
✅ Smart Model Routing
- GPT-4 → GPT-3.5 Turbo for simple tasks
- Claude Opus → Claude Haiku for basic queries
- Automatic quality detection
✅ Cost Tracking
const resp costlens.optimize(openai).chat.completions.create({
model: "gpt-4",
messages: [{ role: "user", content: "Hello" }]
});
console.log(response.costlens.savings); // "Saved $0.042 (70%)"
console.log(response.costlens.originalModel); // "gpt-4"
console.log(response.costlens.routedModel); // "gpt-3.5-turbo"
✅ Quality Protection
- Won't route complex tasks to cheaper models
- Maintains response quality
- Transparent routing decisions
✅ Zero Configuration
- Works out of the box
- Sensible defaults
- No config files needed
Limitations (And When to Upgrade)
Instant Mode gives you 80% of the value with 0% of the setup. But there are limits:
| Feature | Instant Mode | Cloud Mode |
|---|---|---|
| Max savings | 70% | 95% |
| Custom routing | ❌ | ✅ |
| Advanced analytics | ❌ | ✅ |
| Team features | ❌ | ✅ |
| Priority support | ❌ | ✅ |
When to upgrade to Cloud Mode:
- You need >70% cost savings
- You want custom routing rules
- You need detailed analytics
- You're running in production at scale
Migration Path
Start with Instant Mode, upgrade when ready:
// Phase 1: Instant Mode (30 seconds)
const costlens = new CostLens();
// Phase 2: Cloud Mode (when you need more)
const costlens = new CostLens({
apiKey: process.env.COSTLENS_API_KEY,
routing: {
aggressive: true, // 95% savings
customRules: { /* your rules */ }
}
});
Zero breaking changes - same API, more features.
Anthropic Support
Works with Anthropic too:
import { CostLens } from 'costlens';
import Anthropic from '@anthropic-ai/sdk';
const costlens = new CostLens();
const anthropic = new Anthropic({ apiKey: 'your-anthropic-key' });
const resp costlens.optimize(anthropic).messages.create({
model: "claude-3-opus-20240229",
messages: [{ role: "user", content: "Simple question" }]
});
// Automatically routes to claude-3-haiku for simple tasks
// Saves 95% on costs
Real Developer Feedback
"Finally! I can test cost optimization without creating yet another account. Instant Mode saved me 2 hours of setup." - Sarah, Frontend Developer
"Perfect for our CI/CD. No more managing API keys for cost optimization." - Mike, DevOps Engineer
"I'm teaching a course on AI development. Instant Mode removes all barriers for students." - Dr. Chen, Computer Science Professor
Getting Started
1. Install
npm install costlens
2. Use
import { CostLens } from 'costlens';
import OpenAI from 'openai';
const costlens = new CostLens(); // That's it!
const openai = new OpenAI({ apiKey: 'your-openai-key' });
const resp costlens.optimize(openai).chat.completions.create({
model: "gpt-4",
messages: [{ role: "user", content: "Your prompt" }]
});
3. Save Money
Watch your costs drop by 70% automatically.
Comparison with Alternatives
| Solution | Setup Time | API Key | Cost Savings | Quality |
|---|---|---|---|---|
| CostLens Instant | 30 seconds | ❌ | 70% | ✅ Same |
| CostLens Cloud | 5 minutes | ✅ | 95% | ✅ Same |
| Custom routing | 2-4 hours | ❌ | Variable | ⚠️ Risky |
| Manual switching | Ongoing | ❌ | High | ⚠️ Manual |
Technical Details
How Routing Works
- Request Analysis: Examines prompt complexity
- Model Selection: Chooses optimal cheaper model
- Quality Check: Ensures response quality
- Fallback: Uses original model if needed
Supported Models
- OpenAI: GPT-4 → GPT-3.5 Turbo
- Anthropic: Claude Opus → Claude Haiku
- More providers: Coming soon
Performance Impact
- Latency: +50ms average (routing decision)
- Reliability: 99.9% uptime
- Quality: 98% maintained vs original models
Conclusion
Instant Mode removes every barrier to AI cost optimization:
- ✅ 30-second setup (just npm install)
- ✅ No API keys or account creation
- ✅ 70% cost savings automatically
- ✅ Same quality responses
- ✅ Zero configuration required
Perfect for development, testing, prototyping, and getting started.
Ready to save money?
npm install costlens
Start optimizing costs in 30 seconds.
Need more advanced features? Upgrade to Cloud Mode for 95% savings and custom routing.