Start saving up to 95% on OpenAI and Anthropic costs instantly. No API keys, no setup, no friction. Just npm install and go.

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.
Get AI pricing updates when models launch
Join 50+ engineering leaders. No spam.
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:
The new way:
npm install costlens
Done.
Instant Mode lets you use CostLens SDK immediately without any setup. No API keys, no accounts, no configuration files.
| 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 |
// 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 */ }
});
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
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:
// 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" }]
});
# GitHub Actions - no secret management needed
- name: Test with cost optimization
run: |
npm install costlens
npm test # Uses instant mode automatically
// Hackathon? Conference demo? Just install and go
import { CostLens } from 'costlens';
const costlens = new CostLens();
// Start building, worry about advanced features later
// 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
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"
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:
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.
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
"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
npm install costlens
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" }]
});
Watch your costs drop by 70% automatically.
| 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 |
Instant Mode removes every barrier to AI cost optimization:
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.
Liked this analysis? We publish one deep-dive per week.
AI pricing, model benchmarks, and real cost data.
See what AI is actually costing your team
Real data from a real engineering team. No sign-up required.