AI Quota Monitor for ESP32-C6
An ESP32 display project for ESP32-C6.
Parts and sourceBefore you start
Confirm board compatibility and supported firmware targets in the upstream documentation.
Parts, Cost & Where to Buy
Build total pending. Confirm the exact parts and prices first.
Parts to verify. These entries come from the project’s catalog information and may include alternatives or components already built into the board. Check the upstream schematic or parts list before ordering.
| Part | Qty | Unit (USD) | Line total | Supplier |
|---|---|---|---|---|
| ESP32-C6Example SKU: Espressif ESP32-C6-DevKitC-1-N8 | To confirm | From example: $9.952026-12-06 | — | Adafruit |
Reference prices are in US dollars and exclude shipping and tax. Availability and checkout prices may change.
Upstream README
AI Quota Monitor
English · Español

The finished desk display: the ESP32 in its 3D-printed enclosure, showing the quotas of an account.
Self-hosted monitor for the quotas of your AI services. A Go API polls each provider, stores the latest value and shows it in a web panel and on a physical ESP32 desk display. It keeps personal and work accounts apart.

Panel dashboard with the six fictitious accounts of example mode (EJEMPLO tag). Screenshots show the Spanish interface; the panel is also available in English.
What problem it solves
Every AI service shows its usage somewhere different: a 5-hour window here, a weekly limit there, a prepaid balance on another page. This project puts those numbers in one place, in the same format, without opening each dashboard.
Implemented features
- JSON API with a single quota contract: unit, used, limit, reset time, account status and usage level (
usageLevel). - Web panel embedded in the same binary: dashboard, preview of the ESP32 screen and provider settings. Spanish and English.
- Personal and work accounts kept apart, with a
?scope=personal|workfilter. - Example mode with fictitious data, to try it without any real account.
- Periodic polling of the providers, flagging stale data and expired sessions.
- Credentials on the server: per-account Codex and Claude sessions, and keys loaded from the panel encrypted with AES-256-GCM.
- Optional ingestion of data sent by an external collector.
- Deployment as a Go binary or with Docker Compose.
Providers
| Service | Status | How it connects |
|---|---|---|
| OpenRouter | Implemented | Management key; official credits API |
| Codex (ChatGPT) | Implemented | Device-code login through Codex App Server |
| Cursor | Experimental | Session cookie; undocumented dashboard endpoint |
| Claude Pro/Max | Experimental; not permitted by Anthropic's terms | OAuth login; undocumented usage endpoint |
| Kiro | Evaluated, not implemented | Exists only as an example account |
| ChatGPT (regular chat) | Not integrated | No complete counter was confirmed through an API |
The clients have tests against simulated servers. Each provider's documentation states what was validated with real accounts and what was not: see providers and the guide to connect them.
Screenshots
Taken from the real panel with demo data.
| Display preview | Settings |
|---|---|
![]() |
![]() |
| What the 172 × 320 px screen would show, with the example accounts. | Example configuration, with no session started and no credential loaded. |
Quick start
Requirements: Git and Docker with Compose v2. From the repo root:
cp server/.env.example server/.env
openssl rand -hex 32
Paste the result into DEVICE_TOKEN in server/.env. Then:
make docker-up
curl http://localhost:8080/ping
To read the data, replace the placeholder with your token:
curl -H 'Authorization: Bearer YOUR_DEVICE_TOKEN' \
'http://localhost:8080/usage?scope=personal'
It starts in example mode, with six fictitious accounts. Next steps:
- Without Docker:
make run, with Go 1.22 or later. See local setup. - Web panel: create the user with
make panel-passwordand open http://localhost:8080/. See web panel. - Real accounts: set
CONFIG_NAME=config.live.jsonand follow the provider guide.
How it works
flowchart LR
P["AI providers<br/>OpenRouter · Codex · Claude · Cursor"]
C["Collector<br/>(optional)"]
S["Go server<br/>API + web panel<br/>localhost:8080"]
D[("server/data<br/>latest values")]
W["Web panel<br/>browser"]
E["ESP32 display"]
P -- "polled every POLL_INTERVAL" --> S
C -- "PUT usage" --> S
S <--> D
S -- "GET /usage" --> W
S -- "GET /usage" --> E
A single Go process polls the providers on a timer, stores the latest value of each account and serves the API and the panel on the same port. The panel and the display only read what is stored: opening them never triggers a request to a provider. More detail in architecture.
Hardware
The target display is a Waveshare ESP32-C6-LCD-1.47: 172 × 320 px screen, 2.4 GHz Wi-Fi and USB-C power. The firmware is in firmware/esp32-c6-lcd-1.47/ and compiles with Arduino IDE; it runs on the physical board. A 3D-printable enclosure holds it on a desk. The screen can be in Spanish or English, the BOOT button moves to the next page and the RGB LED turns green, orange or red with the usage level. The server and the panel work without the board. See hardware for the exact board and where to buy it, the firmware guide to build and flash it, and enclosure.
Project status
Working today: server, API, web panel, example mode, Docker Compose, the OpenRouter, Codex, Cursor and Claude clients, the ESP32 firmware on the physical board, the 3D-printed enclosure and the Coolify deployment.
Pending:
- Kiro integration: evaluated, not implemented.
- Firmware over HTTPS with a real certificate.
The details are in the roadmap.
Documentation
The documentation index lists every topic. The most used:
- Local setup and configuration
- Deployment with Docker, homelab and Coolify
- Web panel
- Providers
- API reference
- Troubleshooting
Contributing
Changes are welcome. CONTRIBUTING.md explains how to run the project, run the tests and add a provider. Do not include cookies, sessions, keys or work data in commits or issues.
License
MIT. Not affiliated with the manufacturers or providers mentioned.

