fal.ai spend console with per-model budgets and spike explanations

By General Input

See your fal.ai credit balance, what every model and teammate spent, and the real cost per image or video, with anything over budget flagged.

Integrations

  • fal.ai
  • Google Sheets
  • Slack Bot

Type

App

Categories

  • Finance
  • Operations

Build me a spend and usage console for fal.ai that whoever owns our AI budget opens every week. fal.ai has no built-in spend caps, so right now nobody notices a runaway model until the credit balance drops. This app is the early warning system: one screen that shows where the money went, which models are over budget, and what to do about it.

At the top of the dashboard, show the current credit balance from the fal.ai Get Account Billing operation, next to a date range picker for the period being reviewed. Default to the current month to date, with quick presets for the last 7 days, the last 30 days, and the previous month. Everything below the balance recalculates for whichever period is selected.

The main view is the spend breakdown for that period, ranked so the biggest movers sit first. Build it from the fal.ai Get Model Usage operation, which filters usage records by endpoint, user and date range. Show one table broken down by model endpoint and a second broken down by team member. Every row needs three things: total spend, number of runs, and cost per output, rather than just a lump dollar sum. Important detail: fal list endpoints return a cursor string for pagination, so the usage handler has to page through until the cursor is exhausted instead of assuming one response covers the whole period. Monetary values in the pricing and billing responses are US dollars.

Turn raw run counts into unit economics with the fal.ai Get Model Pricing and List Models operations. Each model carries its own billing unit, so show what each endpoint actually charges: per image or per megapixel for image models, per second of video or flat per clip for video models, per request or output unit for language and audio models. Image models range from about $0.0010 per 1024x1024 image up to roughly $0.150 on flagship models, and that spread is the entire reason this app exists.

I keep a monthly budget per model in a Google Sheets tab, one row per model endpoint with a monthly dollar figure. The app reads it with the Google Sheets Get Values operation. Any endpoint tracking over its line gets flagged on the board, and I want to see how far over it is and the pace it is on for the rest of the month, not just a binary flag.

Put an "Explain this spike" button on every flagged row. It kicks off a background agent that pulls the usage records for that endpoint and window with Get Model Usage, compares them against the previous period and against the model's unit pricing from Get Model Pricing, and writes a plain English explanation back into the app. The explanation should say what actually drove the increase: more runs at the same price, a switch to a pricier model, or larger outputs and longer video. It should also name which cheaper model in the catalog from List Models would do the same job, and it can use Estimate Pricing to quantify what the same volume would have cost on that cheaper model. The written result lands on the row itself, so the board still shows it the next time anyone opens the app.

Give me two actions on the breakdown as a whole. One appends a dated snapshot of the full breakdown to Google Sheets with the Append Values operation, so we build a spend trend line over months. The other posts the summary to our finance channel with the Slack Bot Send a Message operation, carrying the balance, the top movers, and any flagged endpoints.

The nuance that matters most: switching models is the biggest cost lever available to us, so every view should make the cheap versus flagship tradeoff visible instead of hiding it inside a single dollar total. Show the unit price next to the spend everywhere, and wherever a flagship model is doing work a cheaper one could handle, make that obvious on the board.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerA brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensStop cold emails to anyone with a live deal in PipedriveLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasoniMessage campaign console with pre-flight checks and delivery board