What it
cost
300 million tokens. A $2.79 API bill. And it still ran dry before the demo.
On Sunday I built The Commons, a room that builds itself. You wish for a creature, Codex writes it, tests it and draws it, and about a minute later it walks into a shared room with your name on it.
I kept every token, prompt and timestamp from the day. This is the money side of it: what two coding agents burned building it, what the one real bill came to, and what a single wished-for pet costs to make.
Where the hours
and tokens went
The night before, parallel agents prototyped ten ideas. At 10:01 the organisers put the prize slide up, and by 10:48 every one of those ten was gone. That overnight work cost about $44 in tokens at API prices, and none of it shipped.
The build itself took 2 hours 47 minutes and ate 54% of the day's tokens. Hover over the chart to scrub through the day in 15-minute slices.
96% of it was
the agent re-reading
An agent re-reads its whole conversation on every turn. Prompt caching makes those re-reads cheap, so they dominate the token count but not the bill. Only about 2 million tokens were actually generated all day. Without caching, the same day would have cost about $1,080 instead of $150.
Two agents,
seven models
Claude Code planned and wrote the app with a team of subagents. Codex drew the art during the build and is the engine inside the product, so every wish in the room is a Codex run. Switch between tokens and dollars: the heavy reasoning model is a small slice of the tokens and a big slice of the money.
$2.79, and it
still ran out
Everything above is an estimate at API list prices. I paid none of it. Claude Code ran on my subscription, and Codex ran through its CLI on my ChatGPT login, which also covered all 93 sprite sheets.
The only pay-as-you-go piece was an OpenAI API key, used to redraw the venue photo into the house style. The whole weekend on that key came to $2.86.
I'd left almost nothing on the key. A few minutes before the demo the balance hit zero, and I had to rush a top-up so the room could still redraw itself on stage.
OpenAI API · usage export
One pet costs
about a dime
Each wish is four Codex jobs: screen it, write it, plan the animation, draw the sprite sheet. I priced every runtime call from the Codex logs at API rates. Move every step to the small model and the code nearly disappears from the bill. What's left is the picture.
Three minutes
to 44 seconds
Once the room was public, real people were waiting on their pets. Under load a pet took about 3 minutes. The Codex logs showed why: the drawing step called the image tool three to six times per pet, because saving the picture kept failing.
Two fixes did most of the work. The model now draws exactly once and the server picks the image up itself. And drawing and coding start while the wish is still being screened, instead of after it.
The biggest bill
is the server
Public voting runs for three days, so the room has to stay up for three days. On the day it ran on my laptop: close the lid and the link dies, restart it and you get a new URL. So I moved it to AWS.
Laptop + quick tunnel
- Cloudflare quick tunnel
- New URL on every restart
- Four different public links in one afternoon
- Dies when the lid closes
Lightsail, Singapore
- 4 vCPU, 8 GB, paid from AWS credits
- Tailscale Funnel: permanent HTTPS, free
- Codex signs in with my ChatGPT account
- Every pet is still built by Codex
Moving from a Mac to Ubuntu broke three things:
Wish a pet in,
then vote
The room is live right now. Wish for a creature from your browser, no QR code needed, and watch Codex build it. If it makes you smile, The Commons is up for People's Choice.