James Washington
writing about archive utils free game ideas replays
API

Marked-up LLM gateway with per-client virtual keys and Stripe invoicing

A private AI service that lets a consultancy give each client their own AI key and bill them monthly for exactly what they used.

built Apr 2024 updated Oct 2026 Cloudflare and the edge

how it works

LiteLLM running as a Cloudflare Container behind a Worker issues per-client virtual keys and logs spend to Postgres; a separate stateless cron Worker turns monthly spend into one Stripe invoice per client with idempotent dedup.

API: A service other programs can call.

The code for this one lives in a private repo. This page explains the idea so you can build your own.

cloudflare-containerslitellmmeteringresalestripe

related

  • LiteLLM-as-container job engine behind a DO binding API The backend that runs paid AI document jobs for a small SaaS.
  • Separate flat-rate and metered Claude routes in an LLM gateway Technique Keep the subscription-covered AI and the pay-per-use AI clearly separate so you don't get surprise bills.
  • Code-owns-workflow, models-supply-judgment outreach pipeline Automation A program that researches leads and writes draft sales emails for a person to approve, never sending anything itself.
  • AI Workbench: local-first LLM interface Browser tool A chat workbench in one web page that talks to local or cloud AI models.
  • Omni-token + pinned account_id Technique Give AI agents one all-powerful cloud key, but make every project refuse to deploy anywhere except its own account.
← everything I've built
© 2026 James Washington
github twitter rss