whereismyai
Hardcount
Hardcount is an open-source usage billing system that tracks AI token consumption, generates invoices, and calculates customer margins.
Hardcount is an open-source usage billing system designed for AI products that price consumption per token and model. It tracks usage events, calculates margins per customer and model, generates invoices, and manages prepaid credits while keeping your data in your own Postgres database. The software relies on a Go program, Postgres, and Redis, and integrates with Stripe to charge cards. It suits small and mid-size teams looking to self-host their billing infrastructure without paying extra software licensing fees. Key components include test clocks for previewing invoices, idempotent event counting, and support for automated payment retries through Stripe.
Hardcount at a glance
- Best for: Software engineer, Founder
- Runs on: Web, API, self-hosted, open source
- Pricing: Free, open-source under the MIT license
- Released: November 2026
- Category: AI agent tool
- Website: github.com/gethardcount/hardcount
Key features
- Tracks token usage by model and token type
- Calculates margin per customer and model
- Generates invoices and PDF reports
- Handles prepaid credits
- Provides test clocks for previewing billing changes
- Connects with Stripe for card payments
Use it for
- Billing customers for AI token consumption
- Tracking profit margins per AI customer
- Selling prepaid credits for AI usage
- Generating usage-based invoices on own servers
Alternatives to Hardcount
- Overview — Returns deterministic probabilities that sum to 1 with zero free text written.
- AUDR by Chargebee — It connects fragmented usage data to business context at the run level.
- FastGPT — It uses hybrid retrieval and auto-cleansed data to prevent hallucinations.
- Comma — It operates 24/7 on a cloud computer to finish tasks independently.
- Monid — One balance for 1,800+ APIs, with no per-tool sign-ups
- Composio — Equips AI agents with tools, managed user auth, and sandboxes across 1,500+ apps
- Browser Use — Managed remote browsers built for protected sites at $0.02 an hour.
- Nasiko — Control enterprise AI agent costs, permissions, and multi-model execution from one place.
- Kopai — Builds and hosts custom AI agents with managed infrastructure and built-in billing.
- Activepieces — Unifies AI agents, chat, flows, tables, and 760+ apps with open-source core and self-hosting options.
- Botpress — Handles complex support tickets and multi-step workflows without per-seat costs.
- AgenticOS — Govern AI agents with budget controls, approvals, and audit logs on your own infrastructure.
All Hardcount alternatives