Twenty-Six AI Tools and a Team of Agents, Metered to the Cent
A subscription platform where every AI generation — a caption, an image, a video, an agent conversation — debits a credit ledger that reconciles against Stripe, so paid usage can never outrun what the customer actually bought.
Industry
SaaS / AI
Solution
Credit-Metered AI Workspace
Engagement
~5 Months
Services
AI & Full-Stack Development

The Hard Part of an AI Product Is the Billing
Anyone can wire a language model to a text box. The problem starts the moment you charge for it: an AI call costs real money on every request, so the platform has to know — before it makes the call — whether this user is entitled to it, and debit them the moment it succeeds.
This platform runs a suite of generators, a media studio, a team of specialised AI agents and a no-code workflow engine on top of exactly that. Every action has a price in credits, every plan has an allowance, and the ledger and the payment provider have to agree at all times.
The Problems We Set Out to Solve
The source records these as engineering challenges rather than a client's before-state, and we present them the same way. They are the problems that decide whether a metered AI product is viable or quietly loses money on every call.
Metering paid AI usage so it can never exceed the entitlement bought
Replenishing credits monthly on annual plans, without relying on billing events
Orchestrating a dozen specialised agents behind one conversation
Delivering generated media reliably, without silently broken public URLs
Making payment webhooks safe to receive twice — because they will be
A Ledger the Product Cannot Outrun
Every mechanism below exists because AI costs money per call. The architecture is shaped by that fact rather than bolted on afterwards.
Credit Ledger Reconciled to Billing
Every tool and agent action debits a tiered credit cost, checked against the subscription before the call is made — so an AI request can never exceed what the plan allows.
Scheduled Replenishment
Annual plans get their monthly credits back from a daily scheduled job rather than from billing events alone, which arrive late or not at all.
Supervisor-Routed Agents
A supervisor routes each conversation to one of twelve specialised agents, through a registry, a capability validator and a boundary checker — not a prompt that hopes for the best.
Media That Actually Loads
After every upload the pipeline re-checks the public URL it just produced, catching a misconfigured bucket that hands back a link which 403s.
What the Platform Does
Free AI Tools
Caption generator, hashtag generator, content ideas, blog and SEO writer, email reply and a CV/resume agent.
Paid AI Tools
Social calendar, product descriptions, real-estate listings, market research and video scripts, gated behind the subscription.
Media Studio
AI image and video generation with reference-image input, and a per-user history and gallery of everything produced.
AI Employees
Twelve specialised agents — strategist, copywriter, support, data analyst, e-commerce, email marketer, coach, recruiter, sales, SEO, social and virtual assistant — behind one supervisor.
Workflow Engine
A no-code automation builder, plus intake for custom automation requests.
Credit Economy
Tiered credit costs per action — images, video and enhancement each priced differently — debited from a ledger on every call.
Subscriptions & Billing
Stripe-driven plans across three tiers, monthly or annual, with the plan catalogue held in the database rather than in code.
Promo Codes & Trials
HMAC-signed promo codes, campaign subscriptions, and trial accounts that expire on schedule.
Partner & Internal APIs
API-key-gated partner integration, service-to-service internal endpoints, and partner link-click tracking.
Speech
Speech-to-text and text-to-speech, so the agents can be spoken to as well as typed at.
Scheduled Workers
Daily jobs for annual credit reset, trial expiry, and promo expiry with conversion emails.
Security Hardening
CSRF on browser-mutating routes, split access and refresh tokens, rate limiting, security headers and environment-aware CORS.
Webhook Idempotency
Payment webhook events are deduplicated in a dedicated table, so a redelivered event cannot double-charge or double-credit.
Observability
Error tracing and profiling, plus a caching layer in front of the hot paths.
Python Backend, Agentic Core
Frontend
Backend
AI & Agents
Billing & Infra
How We Worked
- 1
Pull-Request Workflow
Feature branches into a development branch and then to main, with merge commits showing a review step rather than direct pushes.
- 2
Migration-Driven Schema
Sixteen versioned migrations; automatic table creation is deliberately disabled in production so it can never race the migration runner.
- 3
Containerised Deployment
The container runs the migration to head and then starts the API — so a deploy cannot serve traffic against an old schema.
- 4
Hardening Passes
Dedicated stretches for tool hardening, backend optimisation and live-testing fixes, each on its own branch.
What Was Delivered
12+1
AI Agents + Supervisor
31
Database Tables
~24
Backend Route Modules
~12
Third-Party Integrations
Every AI action is metered against a credit ledger that reconciles with the payment provider — paid usage cannot exceed entitlement.
Twelve specialised agents run behind a single supervisor with a capability validator, rather than one prompt pretending to be many.
Redelivered payment webhooks are safe by construction: the event table deduplicates them before anything is charged.
Generated media is verified reachable after upload, so a broken bucket surfaces immediately instead of as a blank image weeks later.
Frequently Asked Questions
Every tool and agent action debits a tiered credit cost that is checked against the subscription before the call is made, so an AI request can never exceed what the plan allows. The credit ledger reconciles against the payment provider at all times, which means paid usage cannot outrun the entitlement the customer bought — the architecture is shaped by the fact that each AI call costs real money, rather than having metering bolted on afterwards.
Services Behind This Build
Explore Other Case Studies
Charging for AI and losing money on every call?
We build the metering, the ledger and the billing reconciliation that make a paid AI product actually work.
Talk to a Delivery Expert

