Skip to content
banhos.dev
pten
← Back

SaaS · Energy bill API

Faturapi 

An API that fetches energy bills from the utility, unlocks the PDF, reads the full data with AI and delivers it as JSON via webhook.

fields extracted per bill
0
fields extracted per bill
ways to capture a bill
0
ways to capture a bill
per bill via login
R$0,39
per bill via login
Visit site
Faturapi — 1
Faturapi — 2

/ The problem

Solar and energy management companies need each customer's bill data (consumption, distributed generation credits, tariff flag, taxes), but that means logging into the utility portal, downloading password-protected PDFs and typing everything by hand.

/ The solution

I built a multi-tenant API from scratch: a scraper logs into the Enel portal (solving reCAPTCHA inside the browser), downloads and unlocks the PDF, and an LLM extracts about 49 schema-validated fields, with deterministic post-processing on the totals. Results arrive via signed webhook. It started as an internal scraper for a solar energy company and became a self-serve SaaS with prepaid credits.

/ Highlights

  • 01

    Three capture modes: portal login (individual or business), email inbox and PDF upload

  • 02

    LLM reading with structured output of ~49 fields, schema-validated, with retry

  • 03

    Deterministic post-processing: distributed generation, barcode and autopay

  • 04

    BullMQ queue, reused portal sessions and multi-month history in a single login

  • 05

    Monitored units: automatic fetch of new bills and alerts for overdue bills or invalid passwords

  • 06

    HMAC-SHA256 signed webhooks and AES-256-GCM encrypted credentials

  • 07

    Prepaid credits via Stripe (card, Pix and boleto) with per-bill pricing

  • 08

    Developer docs and an llms.txt for integration by AI agents

Next project

Kaibe

SaaS · AI collaboration