AI Budget Planner API

LLM spend tracking for teams — allocate budgets, monitor utilisation, get threshold alerts, pull weekly reports. No database setup required.

Endpoints

MethodPathDescription
GET/healthService status (no auth)
GET/providersSupported LLM providers + cost estimates (no auth)
POST/budgetsCreate a monthly budget allocation
GET/budgets/:idGet budget utilisation + provider breakdown
GET/budgets/:id/alertsThreshold alerts triggered (50/75/90/100%)
GET/reports/weekly7-day spend digest by department + provider
GET/reports/departmentMonth-to-date spend per department
POST/mcpMCP JSON-RPC 2.0 tool interface

Quick start

# Create a budget curl -X POST https://api.lazy-mac.com/ai-budget-planner/budgets \ -H "X-API-Key: your-key" \ -H "Content-Type: application/json" \ -d '{"name":"Engineering AI","department":"engineering","monthly_limit_usd":500,"providers":["openai","anthropic"]}' # Check alerts curl https://api.lazy-mac.com/ai-budget-planner/budgets/bgt_<id>/alerts \ -H "X-API-Key: your-key" # Weekly report (filter by department) curl "https://api.lazy-mac.com/ai-budget-planner/reports/weekly?department=engineering" \ -H "X-API-Key: your-key"

Supported providers

OpenAI

GPT-4o, GPT-4o-mini, GPT-4-turbo, o1-mini

Anthropic

Claude Opus 4, Sonnet 4, Haiku 3.5

Google

Gemini 2 Pro/Flash, Gemini 1.5 Pro

Mistral / Cohere

Mistral Large, Command R+, Mixtral 8x22b

Alert thresholds

Budgets auto-flag at: 50%75% 90%100%

Auth

Pass any non-empty string as X-API-Key header. Budget IDs are deterministic — the same key + name + department + limit always returns the same budget record.