Metering and Billing for AI, API and DevOps. Collect and aggregate millions of usage events in real-time and enable usage-based billing.
Metering and Billing for AI, API and DevOps. Collect and aggregate millions of usage events in real-time and enable usage-based billing.
| Question | Answer |
|---|---|
| What is it best for? | Products with usage-based or hybrid pricing, prepaid credits, or usage limits that need one source of truth for consumption. |
| What is it not? | A bundled operator UI, payment processor, tax engine, or general-purpose accounting system. If you only need fixed recurring subscriptions, a direct payment-provider integration is usually simpler. |
| How mature is it? | Releases are beta and can include breaking changes. The OpenMeter metering engine has run in production for years and processed billions of usage events. Review releases and migration guides when upgrading. |
| Capability | What it covers |
|---|---|
| Meter usage | Ingest CloudEvents, attribute usage to customers, aggregate it in real time, and query it by time window or dimension. |
| Model products and pricing | Define versioned plans, features, add-ons, and flat, recurring, per-unit, tiered, package, or dynamic prices; then assign customer subscriptions. |
| Control access | Calculate feature access and usage-limit balances for your application to enforce, with one-time or recurring entitlement grants. |
| Bill usage | Rate flat and usage-based charges, manage customer credit balances and subscription changes, and run the invoice lifecycle. |
| Integrate | Use the OSS REST API and JavaScript, Python, or Go SDKs, send webhooks, and connect external invoicing providers. |
The local evaluation stack requires Git and
Docker with Compose. Use curl, Node.js
22+, or Python 3.9+ for the examples below.
git clone https://github.com/openmeterio/openmeter.git
cd openmeter/quickstart
docker compose up -d --waitThe stack includes an api_requests_total meter. Choose a client below; each
example sends one request event and queries its metered value.
…Install the OpenMeter TypeScript SDK:
npm install @openmeter/sdk tsxSave as quickstart.ts, then run npx tsx quickstart.ts:
…The Python SDK is in preview, so install it with pre-releases enabled:
python -m pip install --pre openmeterSave as quickstart.py, then run python quickstart.py:
…Event processing is asynchronous. A successful example ends with a metered
value of 1.
[!NOTE] This Compose setup is a local evaluation stack. It runs the OpenMeter API and workers together with Kafka, ClickHouse, PostgreSQL, Redis, and Svix using
latestOpenMeter images; it is not a production topology.
Continue with the full OSS quickstart, try a metering example, add entitlements and usage limits, or model plans and subscriptions.
When you are done, remove the containers and their local data volumes:
docker compose down -vThe core runtime is OpenMeter's API and worker processes plus Kafka, ClickHouse, and PostgreSQL. Redis is optional for distributed deduplication and query progress; Svix is used when webhook delivery is enabled. The architecture guide explains the complete runtime and data flow.
The official Helm chart for Kubernetes is intended for development deployments, not production.
| Need | Go to |
|---|---|
| Ask a question or discuss an approach | GitHub Discussions |
| Report a reproducible bug or request a feature | GitHub Issues |
| Track changes | Releases and migration guides |
| Report a vulnerability | Security policy |
| Build or contribute | Contributing guide and Code of Conduct |
OpenMeter is licensed under the Apache License 2.0.
No open issues yet, or sync has not completed.