flowingkhaosSign inBrowse the marketplace
New here? flowingkhaos is a build-in-public workshop. This is one part of one of six production failures.What this site is

monitoringFix 03 · part two of five

Context — The $5 video bill a pricing API said was $1.86

Context

OSI is our internal operations console. One of its doors (a door is a guarded route that spends money on our behalf) calls fal to render short video clips from a prompt. We call them previz drafts: cheap, low-resolution passes to judge a shot before paying for the real render.

Every door has a maxUsd ceiling. Before the call, the door asks fal’s pricing API for the model’s rate, multiplies by the clip length, and refuses the call if the estimate crosses the ceiling. After the call, it logs the estimate to a per-turn file so the day’s spend can be summed.

The design assumed one thing: that the price the API returns is the price we pay. For a text model that holds. For a video model with three output resolutions, it does not, and nothing in the API’s response says so.

In the last week of September the drafts were for a hero reel on a client site. Thirteen drafts ran that day, ten of them after the top-up.

The column · weekly · free

The next fix, in your inbox the week it happens.

One written column a week. The email service holds the list.

The marketplacePay once

Skip the build. Start from code that ships

Production-ready code under a one-time licence. Buy it, and start building with the code you bought.

  • Pay once
  • Resell what you build
  • No subscription

The columns, fixes and workshops continue in the community: SEO, AI, and making money with code.

Join on Whop

Luke Sidney writes and builds everything here, alone, in the open. lukesidney.me

Next part · 03 of 05Investigation