Repolode
openmeterio

openmeterio/openmeter

Open-source metering and usage-based billing infrastructure that ingests usage events, enforces access limits, and generates invoices.

Open-source alternative to:Stripe BillingMetronomeOrb

Stars
2,439
Forks
241
Open issues
64
Last commit
5 hours ago

What is it?

OpenMeter collects high-volume usage events in CloudEvents format, attributes them to customers, and aggregates them in real time. It is aimed at AI, API, and usage-based products that need one consistent source of truth for consumption.

Beyond metering, it provides a product catalog for versioned plans, features, add-ons, and flat, per-unit, tiered, package, or dynamic prices. It calculates feature access and usage-limit balances that an application can enforce, and handles rating, customer credit balances, subscription changes, and the invoice lifecycle. Developers can use the REST API or JavaScript, Python, and Go SDKs, and connect external invoicing and payment providers.

The project runs as API and worker processes backed by Kafka, ClickHouse, and PostgreSQL, with a Docker Compose quickstart for local evaluation. It is in beta and may include breaking changes between releases.

Key features

  • 01Ingests CloudEvents and aggregates usage in real time by customer and time window.
  • 02Defines versioned plans, features, and flat, per-unit, tiered, package, or dynamic prices.
  • 03Calculates feature access and usage-limit balances for application enforcement.
  • 04Manages customer credit balances, subscription changes, and the invoice lifecycle.
  • 05Provides a REST API and JavaScript, Python, and Go SDKs, plus webhooks.

Use cases

  • Billing customers per API call, token, or other metered unit in an AI or API product.
  • Enforcing prepaid credits or monthly usage limits in an application.
  • Combining usage-based and recurring subscription pricing under one system.
  • Adding usage metering to an existing stack while keeping your current payment provider.

Quick start

  1. 1

    Clone the repository

    git clone https://github.com/openmeterio/openmeter.git
  2. 2

    Go to the quickstart folder

    cd openmeter/quickstart
  3. 3

    Start the local evaluation stack with Docker Compose

    docker compose up -d --wait
  4. 4

    Send a test event and query its metered value using the README's curl, TypeScript, or Python example

Things to know

  • Releases are beta and can include breaking changes.
  • The Python SDK is in preview.
  • The Compose stack is for local evaluation, and the Helm chart is for development, not production.
  • Running the core runtime requires Kafka, ClickHouse, and PostgreSQL.

Topics

FAQ

What is openmeter?
Open-source metering and usage-based billing infrastructure that ingests usage events, enforces access limits, and generates invoices. OpenMeter collects high-volume usage events in CloudEvents format, attributes them to customers, and aggregates them in real time. It is aimed at AI, API, and usage-based products that need one consistent source of truth for consumption.
Is openmeter free to use? What license does it have?
openmeter is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is openmeter still maintained?
Actively maintained. The last commit to openmeter was on Nov 7, 2026.
What can I use openmeter for?
Billing customers per API call, token, or other metered unit in an AI or API product. Enforcing prepaid credits or monthly usage limits in an application. Combining usage-based and recurring subscription pricing under one system. Adding usage metering to an existing stack while keeping your current payment provider.
How do I install openmeter?
Clone the repository: git clone https://github.com/openmeterio/openmeter.git Go to the quickstart folder: cd openmeter/quickstart Start the local evaluation stack with Docker Compose: docker compose up -d --wait Send a test event and query its metered value using the README's curl, TypeScript, or Python example
Where can I get openmeter?
The source code and installation instructions are on GitHub: https://github.com/openmeterio/openmeter

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects