SkillAgentSearch skills...

Openmeter

Metering and Billing for AI, API and DevOps. Collect and aggregate millions of usage events in real-time and enable usage-based billing.

Install / Use

/learn @openmeterio/Openmeter

README

<div align="center">

OpenMeter logo

OpenMeter

The open-source metering and billing platform for AI, agentic and DevTool monetization.

Docs | Hosted | Blog | Contributing

GitHub Release CI Status Go Report Card GitHub Stars

</div>

OpenMeter is a real-time metering and billing engine that helps you track usage, enforce limits, manage subscriptions, and automate invoicing — all in one platform. Ingest events via a simple API, define meters with flexible aggregations, and connect usage data to billing, entitlements, and customer-facing dashboards.

Features

  • Usage Metering — Ingest events in CloudEvents format, define meters with flexible aggregations (SUM, COUNT, AVG, MIN, MAX), and query usage in real time.
  • Usage-Based Billing — Generate invoices from metered usage. Supports tiered, graduated, and flat-fee pricing with automated invoice lifecycle management.
  • Usage Limits and Entitlements — Enforce usage quotas per feature with real-time balance tracking, boolean feature flags, and grace periods.
  • Product Catalog — Define plans, add-ons, features, and rate cards. Manage subscriptions with mid-cycle changes, prorating, and alignment.
  • Prepaid Credits — Support paid or promotional credit grants with priority-based burn-down and expiration.
  • Customer Portal — Token-based self-service dashboards so your customers can see their own usage.
  • Notifications — Webhook-based alerts with configurable rules and channels for usage thresholds and billing events.
  • LLM Cost Tracking — First-class support for metering AI token usage and computing model-specific costs.

Getting Started

Cloud

The fastest way to start. Start for free and begin metering and billing in minutes — no infrastructure to manage.

Self-Hosted

Run OpenMeter locally with Docker Compose:

git clone git@github.com:openmeterio/openmeter.git
cd openmeter/quickstart
docker compose up -d

Then ingest your first event:

curl -X POST http://localhost:48888/api/v1/events \
  -H 'Content-Type: application/cloudevents+json' \
  --data-raw '{
    "specversion": "1.0",
    "type": "request",
    "id": "00001",
    "time": "2024-01-01T00:00:00.001Z",
    "source": "my-service",
    "subject": "customer-1",
    "data": { "method": "GET", "route": "/api/hello" }
  }'

Query your usage:

curl 'http://localhost:48888/api/v1/meters/api_requests_total/query?windowSize=HOUR' | jq

See the full quickstart guide for more details.

Deploy to Production

Deploy to Kubernetes using our Helm chart.

SDKs

| Language | Package | Source | |----------------------|--------------------------------------------------------------------------------|----------------------------------------------------| | Go | openmeter | api/client/go | | JavaScript / Node.js | @openmeter/sdk | api/client/javascript | | Python | openmeter | api/client/python |

Don't see your language? Use the OpenAPI spec directly or request an SDK.

Architecture

OpenMeter is built in Go with a stack optimized for high-volume event ingestion and real-time aggregation:

| Component | Role | |--------------------------|----------------------------------------------------------| | PostgreSQL (Ent ORM) | Billing, subscriptions, entitlements, product catalog | | ClickHouse | Real-time usage aggregation and analytics | | Kafka | Event streaming and ingestion pipeline | | TypeSpec | API-first design — OpenAPI spec and SDKs from TypeSpec |

Community

We'd love to have you involved:

  • Contributing — Start here if you want to contribute code.
  • Code of Conduct — Our community guidelines.
  • Blog — Product updates and engineering deep dives.

Development

Prerequisites: Nix and direnv are recommended. See CONTRIBUTING.md for detailed setup instructions.

make up       # Start dependencies (Postgres, Kafka, ClickHouse)
make server   # Run the API server with hot reload
make test     # Run tests
make lint     # Run linters

License

Licensed under Apache 2.0.

FOSSA Status

View on GitHub
GitHub Stars1.9k
CategoryData
Updated5h ago
Forks158

Languages

Go

Security Score

100/100

Audited on Mar 29, 2026

No findings