AI Spend You Can Audit: a Cost-Governed Pipeline
A generative asset pipeline where every run writes to a cost ledger: 256 production assets delivered for $37.59, about 15 cents each, with the receipts to prove it.
Status
Internal R&DDomain
AI EngineeringHeadline result
256 production assets for $37.59 (~$0.15 each) with a per-run audit ledger
Demonstrates
Representative stack
Generation
- Prompt templates
- Image model calls
- Batch orchestration
Governance
- SQLite per-run cost ledger
- Budget awareness per batch
Output
- 256 production assets
- Cost-per-asset reporting
Situation
Internal lab work, framed as exactly that. A production project needed hundreds of consistent art assets, the kind of job that conventionally means commissioning an artist or buying a stock library, with the cost, lead time, and consistency problems each brings.
Problem
The interesting problem was not “can AI generate images”. It obviously can. The problem was the one every CFO eventually asks about: what does AI spend actually produce, and how do you know? Most teams run generative tooling with no per-unit economics at all. Spend appears on an invoice; outputs appear in a folder; nobody can connect the two.
Approach
I built the pipeline with governance as a design requirement, not an afterthought. Every generation run writes to a SQLite cost ledger: what was requested, what was produced, what it cost. Batches are orchestrated against prompt templates for consistency, and the ledger makes cost-per-asset a queryable fact instead of a guess.
Architecture and key decisions
- The ledger is the product. Generation tooling changes monthly; an auditable record of spend-to-output is what makes AI a manageable business process.
- Per-run granularity. Costs attach to runs, not months, so a bad prompt template or a wasteful batch is visible immediately, not at invoice time.
- Templates over one-off prompting. Consistency across 256 assets comes from versioned prompt templates, the same way consistency in code comes from CI.
- Build-vs-buy decided on numbers. Roughly 15 cents per asset against commissioned art’s cost and lead time, a procurement decision made with receipts.
What shipped
The generation pipeline, the per-run cost ledger, prompt template library, and 256 production assets in active use, plus the reporting that turns the ledger into cost-per-output answers.
Outcome
256 production assets for $37.59 total, roughly $0.15 each, with every dollar traceable to a run. The number matters less than the discipline: this is AI spend that can survive an audit.
What this demonstrates
When I talk to operators about AI adoption, governance is usually the missing half: teams adopt the tools and skip the instrumentation. This is the pattern I install and teach: every AI process paired with a ledger, so leadership can see unit economics instead of a line item.
The playbooks behind this work