· Ed Dowding · Portfolio  · 2 min read

PromptZero (AI Usage & Carbon Analytics)

Dashboard for monitoring OpenAI API usage, costs, carbon footprint, and project-level analytics. Track spend across multiple API keys with budget alerts, 5-year historical sync, and AES-256 encrypted credential storage.

Dashboard for monitoring OpenAI API usage, costs, carbon footprint, and project-level analytics. Track spend across multiple API keys with budget alerts, 5-year historical sync, and AES-256 encrypted credential storage.

The Problem

Teams using OpenAI APIs have limited visibility into costs until the monthly bill arrives. The OpenAI dashboard shows aggregate usage but doesn’t break down spend by project, feature, or team. Beyond costs, there’s growing awareness of AI’s environmental impact—but no easy way to measure it. Result: budget surprises, no feedback loop for prompt optimisation, and invisible carbon footprint.

What I Built

PromptZero (branded as “PromptNeutral”) provides granular AI usage analytics with carbon tracking:

  • Multi-Key Management: Track usage across multiple OpenAI organisation admin keys with AES-256-GCM encryption at rest
  • 5-Year Historical Sync: Background job fetches up to 5 years of usage data in 30-day chunks with smart deduplication
  • 16+ Model Pricing: Accurate cost calculations for GPT-4o, GPT-4o-mini, o4-mini, including cached tokens and audio tokens
  • Carbon Footprint Tracking: Estimate environmental impact per API call (PromptNeutral positioning)
  • Project Organisation: Group usage by OpenAI projects with aggregated metrics
  • Budget Alerts: Set monthly/daily limits with threshold notifications
  • Interactive Dashboard: Real-time charts with global date range filtering (Last 7 days, 30 days, All time)

Tech Stack

Frontend: React 18 + TypeScript, Vite, Wouter routing, TanStack Query, Recharts for visualisation, Radix UI + shadcn/ui, Tailwind CSS, Framer Motion animations.

Backend: Express.js with TypeScript, Drizzle ORM, PostgreSQL (Neon serverless), AES-256-GCM encryption for API keys, Replit Auth (OpenID Connect).

Database: Users, sessions, encrypted API keys, usage data (tokens, costs, models, dates, projects), budget settings, sync history with deduplication.

Lessons Learned

Admin Keys Have Different Permissions: Regular OpenAI API keys can’t access usage data—you need sk-admin-* format keys with organisation-level permissions. Documenting this requirement upfront prevented 90% of “it’s not working” support requests. Lesson: API permission models are UX concerns.

Historical Sync Is Engineering, Not Fetching: 5 years of data across 30-day chunks requires careful orchestration: progress tracking, gap handling, deduplication, and retry logic. A simple “fetch all” button hides significant complexity. Lesson: “import historical data” is always harder than it sounds.

Carbon Tracking Opens New Conversations: Adding environmental impact metrics transformed conversations with sustainability-focused teams. Same data, different framing, different buyers. Lesson: features can unlock markets without changing functionality.

Encryption Is Table Stakes: Early versions stored API keys in plaintext. Adding AES-256-GCM encryption was technically straightforward but dramatically changed enterprise interest. Lesson: security features are sales enablers, not just compliance checkboxes.

Back to Blog

Related Posts

View All Posts »
Mother's Almanac

Mother's Almanac

AI-powered parenting encyclopedia that generates evidence-based guidance on-demand. Built with Next.js 15, Supabase, Claude AI, and a 3-layer caching system with RAG document upload and semantic search.

Contextual Feedback

Contextual Feedback

Open-source React library enabling section-targeted feedback collection. Users visually identify specific UI elements they're commenting on, eliminating vague feedback and providing administrators with precise contextual information.

Moneypenny (WhatsApp AI Desktop Client)

Moneypenny (WhatsApp AI Desktop Client)

Native desktop WhatsApp client with AI-powered message summarisation, priority inbox, and keyboard-first navigation. Built with Tauri (Rust), React, and multi-provider LLM support.

Panauricon (Limitless Elephant)

Panauricon (Limitless Elephant)

Continuous voice capture app with 30-minute auto-segmented recording, Google Gemini transcription, location tagging, and full-text search. Designed for capturing thoughts, conversations, and ideas without interruption.