@lazymac/sdk
v0.1.0
Published
Type-safe JavaScript/TypeScript SDK for api.lazy-mac.com — 42 developer tools + K-MCP
Maintainers
Readme
@lazymac/sdk
Type-safe JavaScript/TypeScript SDK for api.lazy-mac.com — 42 developer tools + Korean wedge (K-MCP), backed by Cloudflare Workers (sub-200ms p95).
Install
npm install @lazymac/sdk
# or pnpm add @lazymac/sdk / yarn add @lazymac/sdkUsage
import { LazymacClient } from '@lazymac/sdk';
// Free tier (100 req/day/IP)
const client = new LazymacClient();
// Or with Pro key (unlimited)
const pro = new LazymacClient({ apiKey: process.env.LAZYMAC_API_KEY });
// QR code
const qr = await client.qr.generate({ text: 'https://example.com', format: 'svg' });
// IP geolocation
const geo = await client.ip.lookup({ ip: '8.8.8.8' });
// AI cost estimation
const cost = await client.ai.estimate({ tokens: 1000, model: 'gpt-4o' });
// LLM router — pick cheapest model that hits quality bar
const pick = await client.llm.route({ prompt: 'Hello world', min_quality: 80 });
// Korean wedge — PIPA compliance scan
const pipa = await client.k.privacyScan({ url: 'https://notion.so' });
// KRW exchange rate + BOK base rate
const rates = await client.k.exchangeRate();Included APIs (10 core clients, 42 total tools)
| Client | Methods |
|--------|---------|
| client.qr | generate |
| client.url | shorten |
| client.ip | lookup |
| client.tech | detect (BuiltWith alt) |
| client.ai | estimate |
| client.llm | route |
| client.k | privacyScan, exchangeRate, companyLookup, addressGeocode |
| client.email | validate |
| client.seo | analyze |
| client.regex | test |
Raw client.request() is always available for any endpoint:
const result = await client.request('GET', '/fake-data/generate', { schema: 'person', count: 5 });Error handling
import { LazymacClient, LazymacError } from '@lazymac/sdk';
try {
await client.qr.generate({ text: 'hello' });
} catch (err) {
if (err instanceof LazymacError) {
console.log('Status:', err.status); // 402 = free tier exceeded
console.log('Usage:', err.usage); // { used, limit, plan, resetAt }
console.log('Upgrade URL:', err.upgrade); // → Pro tier
}
}Pricing
- Free — 100 req / IP / day, all 42 tools
- Pro — $29/mo, unlimited calls, premium key
- Annual — $290/year (2 months free)
- Team — $99/mo, 5 seats
Full pricing: api.lazy-mac.com/pricing
Also install
- 🧰 @lazymac/mcp — unified MCP server (42 tools) for Claude Code, Cursor, Windsurf
- 🇰🇷 @lazymac/k-mcp — Korean wedge MCP (9 tools)
License
MIT
💡 Host your own stack? Get $200 DigitalOcean credit.
