Case study
AI PRODUCT · PILATES VOICE (CLEARA) · APR – OCT 2026
I chose the coaching model at a tenth of the cost, and cut what didn't earn its place
- Owned
- Model choice
- Blind eval
- Session scope
- Cost and spend limits
- Pain check
- Rollout flag
What it does
Pilates Voice runs short guided Pilates sessions. During an exercise you tell the coach how it feels, and the model replies with two or three short cues.
It's the product I build at Cleara. I keep a decision log, and most entries say what result would show the decision was wrong.
Three calls that shaped it
One priority, one cut and one constraint from my decision log, with what each one cost.
PriorityDecision log D1
Sessions you can repeat, over sessions that are new every time
- The call
- 12 hand-written sessions (3 lengths, 4 focus areas). The model only writes the cues.
- Why
- The first version had the model generate each session. The sessions came out different every time, which made it hard to build a routine around them.
- Gave up
- Variety.
- Wrong if
- People stop repeating sessions because they feel the same.
CutDecision log D3
The 30-minute sessions
- The call
- Removed them.
- Why
- Every 30-minute version repeated exercises to fill the time. Removing them was better than padding them.
- Gave up
- A longer session for people who want one.
Constraint
Every AI call is paid from my own key
- The call
- Cost counted in the model choice, and spending has a hard cap.
- Why
- There's no revenue, and the endpoint is public. A security scan on the earlier Replit build found that anyone could send text to the model through it, on my paid key. So gpt-4o-mini won on quality and on cost ($0.11 vs $1.11 per 1,000 requests), input has length limits, each IP has a rate limit, and the AI Gateway credit balance caps spending.
- Gave up
- Unlimited typing. How an exercise feels is the input the coach needs, so I capped it instead of removing it.
Choosing the model
I compared gpt-4o-mini and Claude Haiku 4.5 on 20 cases, with the model names hidden and the order shuffled. gpt-4o-mini won 12, Haiku won 3, and 5 were ties. gpt-4o-mini cost $0.11 per 1,000 requests against $1.11, and its median response time was 1.3 s against 1.9 s.
The eval also set a rule: cues are 8 words or fewer. That brought the average from 5.5 to 4.2 words, and the check runs on every model change. It also found a bug: a retry returned the same answer, because the app didn't send the earlier cues back to the model.
The blind test winner was also a tenth of the cost
Which answer I preferred
- gpt-4o-mini
- Tie
- Claude Haiku 4.5
Cost per 1,000 requests
Median response time
With no revenue and every call on my own key, cost was a requirement, not a tiebreaker. Quality had to win first, and it did.
Source: my blind review, Oct 2026, with order shuffled. I was the only grader.
Cost and safety checks run before the model is called
- You say how it feelsduring the exercise
- Length and rate limitscaps what one person can spend on my key
- Pain check, in codeno model call neededPain: the exercise stops here
- The model flag picks a modelsame person, same model
- Two or three short cues8 words or fewer
The pain check costs false stops, like "my abs are burning". I chose that over letting the model judge pain.
Source: the request path as built. Illustration, not the product UI.
The model flag
The guidance model is behind a server-side flag. One setting names the candidate model, another sets the percentage of traffic it gets, and 0% turns it off.
Each browser gets an anonymous id. The id is hashed (FNV-1a) into a bucket from 0 to 99, so the same person always gets the same model. Every response has a header naming the model that answered. If more than 30% of the last 20 candidate requests fail (minimum 5), the flag switches back to the default model, then tries the candidate again after a cooldown.
I tested the split with a fake gateway: at a 20% setting, 19.97% of 10,000 ids went to the candidate. The flag hasn't served live traffic yet, so there's no comparison between models.
A 20% setting sent 19.97% of test ids to the new model
10,000 anonymous ids at a 20% setting
- Candidate model
- Default model
Source: a test run of the flag with 10,000 generated ids. Not live traffic.
Why the flag runs on the server
- The model is already called from the server, so checking the flag there adds no extra request
- The API key and the model choice stay out of the browser
- The web app and the iPhone app can share it
Known limits
- Rollback is per instance: each serverless instance counts its own failures. Fix: a shared store, or a monitoring alert that sets the percentage to 0
- Manual off switch needs a redeploy: the percentage is an environment variable, and Vercel only applies changes on a new deployment. Fix: read the flag from a store on each request
- Errors only: a model that gives worse cues without failing won't trigger a rollback. Fix: use eval checks like cue length as guardrails
- One hash for every flag: a second flag would put the same users in both test groups. Fix: include the flag name in the hash
- Ids are per browser: a new device or cleared storage means a new bucket. Fix: use the account id once there are accounts
- Cooldown can repeat: a candidate that's still broken fails again after each cooldown. Fix: back off, or require a manual re-enable
- Exposures aren't logged: the response header exists, but nothing records it yet. Fix: log which model each user saw and join it to outcomes
What's in, what's next, what I'm not building
In the demo4
- 12 fixed sessions, cues from gpt-4o-mini
- Cues of 8 words or fewerchecked on every model change
- Pain check in codethe exercise stops before the model is called. The cost is false stops, like "my abs are burning"
- Server-side model flagbuilt and tested. No model has rolled out to real people through it
Next2
- iPhone appiPhone before Android: faster to build
- An A/B test once traffic allowsuntil then, a partial rollout plus the offline eval
Not building5
- Sessions generated by the modelReplacedunpredictable sessions made a routine hard to build
- 30-minute sessionsCutevery version repeated exercises
- VideoLaterpictures first: faster to build
- AndroidLaterafter the iPhone app
- The Replit buildCutrebuilt as one Vercel app, and deleted 55 unused UI components
How I'd measure it
- Main metric: sessions completed, with guardrails on error rate, latency, cue length and how often the pain check stops a session
- With little traffic: an A/B test can't detect small differences, so start with a partial rollout plus the offline eval, and run an A/B test once there's enough traffic
Status
A web demo built with Claude Code, before launch and before revenue, so the flag hasn't rolled out a model to live traffic yet. I can walk through the code on a call.