📦 Step 1 — Install the SDK
Pick your language:
TypeScript / Node.js
npm install @ai-cost-guard/sdk
Python
pip install ai-cost-guard-sdk
🔑 Step 2 — Get Your API Key
💻 Step 3 — Add It to Your Code
TypeScript
import { createClient } from '@ai-cost-guard/sdk';
import OpenAI from 'openai';
const guard = createClient({ apiKey: 'acg_live_your_key_here' });
const openai = guard.wrap(new OpenAI());
// Use openai exactly as before — costs are tracked automatically
const chat = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello!' }],
});
Python
from ai_cost_guard import AICostGuard
from openai import OpenAI
guard = AICostGuard(api_key="acg_live_your_key_here")
client = guard.wrap(OpenAI())
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
🎉 Step 4 — See Your Costs
Open aicostguard.com/dashboard to see your costs in real time.