AI-Powered Revenue Estimation: bxb Integrates Google's TimesFM
Let’s address the elephant in the room: bxb is not the old BoxBilling. Zero PHP. Zero legacy code. It’s a ground-up rebuild — a modern, open-source billing platform written in Python on FastAPI. The name carries history, but the codebase is entirely new.
Today we’re announcing something that makes that distinction even clearer: bxb now ships with AI-powered revenue estimation, powered by Google Research’s TimesFM (Time Series Foundation Model).
No other open-source billing platform has this. Let’s talk about what it does and why it matters.
What is TimesFM?
TimesFM 2.5 is a foundation model for time series forecasting developed by Google Research. Think of it as a “GPT for numbers” — pretrained on billions of real-world time series data points, it can forecast trends without being fine-tuned on your specific data.
The key specs:
- 200M parameters — lightweight enough to self-host on modest hardware
- 16k context length — analyze up to 16,000 historical data points (years of daily billing data)
- 1k forecast horizon — continuous quantile predictions, perfect for monthly and quarterly revenue projections
- Zero-shot capable — works out of the box, no training on your data required
What bxb Does With It
TimesFM runs as a separate estimation service alongside your bxb instance. Your billing data never leaves your infrastructure. bxb queries the service over an internal API to power five core capabilities:
Revenue Forecasting
Predict MRR, ARR, and revenue trends with confidence intervals. Ask “what does our revenue look like in 6 months?” and get a statistically grounded answer.
POST /api/v1/estimation/revenue/forecast
{
"horizon_months": 6,
"confidence_intervals": [0.1, 0.5, 0.9]
}
{
"forecast": [
{"month": "2026-05", "p10": 42100, "p50": 48500, "p90": 55200},
{"month": "2026-06", "p10": 43800, "p50": 51200, "p90": 58900},
{"month": "2026-07", "p10": 45200, "p50": 53900, "p90": 62100},
{"month": "2026-08", "p10": 46800, "p50": 56400, "p90": 65800},
{"month": "2026-09", "p10": 48100, "p50": 58700, "p90": 69200},
{"month": "2026-10", "p10": 49500, "p50": 61200, "p90": 72800}
],
"model": "timesfm-2.5-200m",
"context_length": 2048
}
The p10, p50, and p90 quantiles give you worst-case, expected, and best-case scenarios — exactly what finance teams need for planning.
Churn Prediction
Identify at-risk customers before they cancel by analyzing changes in billing patterns — declining usage, payment failures, downgrade signals.
POST /api/v1/estimation/churn/score
{
"customer_ids": ["cust_abc123", "cust_def456"]
}
{
"scores": [
{"customer_id": "cust_abc123", "risk": 0.12, "label": "low"},
{"customer_id": "cust_def456", "risk": 0.78, "label": "high",
"signals": ["usage_declining", "support_tickets_increasing"]}
]
}
Usage Forecasting
Predict customer resource consumption to help with capacity planning. Particularly useful for infrastructure and API billing where usage drives cost.
Anomaly Detection
Flag unusual billing events automatically — sudden usage spikes, recurring payment failure patterns, unexpected plan changes across cohorts. Catch revenue leaks and fraud signals early.
Smart Pricing Suggestions
Analyze historical billing data across segments to surface pricing optimization opportunities. Which tiers are underutilized? Where are customers churning due to price sensitivity? The model finds patterns humans miss.
Why This Matters
SaaS companies currently pay $500+/month for revenue intelligence tools like ChartMogul, Baremetrics, or ProfitWell. These are good products — but they’re SaaS tools processing your billing data on their servers.
bxb gives you the same forecasting capabilities for free:
- Self-hosted — your billing data stays on your infrastructure
- Foundation model — works immediately without training on your data, and improves as it sees more of your patterns
- Open source — audit the code, modify the models, extend the API
- No per-seat pricing — the same estimation engine whether you have 10 customers or 10,000
The estimation service is optional. bxb works perfectly without it. But if you want revenue intelligence without handing your billing data to a third party, it’s there — one docker compose up away.
Architecture
┌─────────────┐ internal API ┌──────────────────┐
│ bxb core │ ──────────────────▶ │ estimation svc │
│ (FastAPI) │ ◀────────────────── │ (TimesFM 2.5) │
└─────────────┘ └──────────────────┘
│ │
▼ ▼
PostgreSQL Model weights (200M)
Both services run in Docker. The estimation service loads the pretrained TimesFM weights and exposes a simple REST API that bxb queries. No GPU required for inference at billing-scale volumes, though GPU acceleration is supported for larger deployments.
What’s Next
The estimation service ships in bxb 0.4.0. We’re also working on:
- Dashboard integration — forecast visualizations directly in the bxb admin UI
- Webhook triggers — get notified when churn risk exceeds a threshold
- Custom model support — bring your own fine-tuned TimesFM weights
- Estimation API docs — full OpenAPI spec for building custom integrations
Get Involved
bxb is open source and we’re building in public.
- GitHub: github.com/boxbilling/bxb
- Join the waitlist for managed hosting at boxbilling.com
- Star the repo if you think open-source billing deserves better tooling
We’re a Lago alternative that doesn’t stop at billing. Usage-based, subscription, hybrid — with AI-powered revenue intelligence built in. Self-hosted, privacy-first, and free.