← 开源
openmeterio

openmeter

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

InfrastructureData systemsObservabilityGo
在 GitHub 打开
增长势头
+124 小时新增 Star+0.0%
2.38k
Star
226
Fork
+8
本周
35
贡献者
创建于 2023-06-06 · 更新于 2026-10-16 · 今日第 5064 名
主要开发者

openmeterio/openmeter 排名第 5,064,有 2,383 个星标。

同类别比较

openmeterio/openmeter 排名第 5,064,此处有 8 个同类条目;IST-DASLab/gptq 排名第 5,062。

同类别比较
名称排名指标
zerobootdev/zeroboot5,038
语言:
Rust
星标数:
2,464
分叉数:
115
简介:
Sub-millisecond VM sandboxes for AI agents via copy-on-write forking
pixpark/gpupixel5,039
语言:
C++
星标数:
2,460
分叉数:
355
简介:
Real-time image filter engine based on GPU
xusenlinzy/api-for-open-llm5,040
语言:
Python
星标数:
2,460
分叉数:
267
简介:
Openai style api for open large language models, using LLMs just as chatgpt! Support for LLaMA, LLaMA-2, BLOOM, Falcon, Baichuan, Qwen, Xverse, SqlCoder, CodeLLaMA, ChatGLM, ChatGLM2, ChatGLM3 etc. 开源大模型的统一后端接口
IST-DASLab/gptq5,062
语言:
Python
星标数:
2,386
分叉数:
207
简介:
Code for the ICLR 2023 paper "GPTQ: Accurate Post-training Quantization of Generative Pretrained Transformers".
AgentsMesh/AgentsMesh5,073
语言:
Go
星标数:
2,361
分叉数:
246
dvmazur/mixtral-offloading5,078
语言:
Python
星标数:
2,336
分叉数:
225
简介:
Run Mixtral-8x7B models in Colab or consumer desktops
langchain-ai/langserve5,083
语言:
JavaScript
星标数:
2,326
分叉数:
268
简介:
LangServe 🦜️🏓
jwadow/kiro-gateway5,084
语言:
Python
星标数:
2,324
分叉数:
564
简介:
👻 Proxy API gateway for Kiro IDE & CLI (Amazon Q Developer / AWS CodeWhisperer). Use free Claude models with any client.
关键参数与规格
关键参数与规格
参数值
语言Go
类别Infrastructure
子类别Data systems,Observability
关键词Data processing, Databases, DevOps
星标数2,383
分叉数226
贡献者35
创建日期2023-06-06
更新日期2026-10-16
1 天星标数1
7 天星标数8
排名5,064
上次排名3,823
排名变化-1,241
7 天星标排名4,429
上次 7 天星标排名4,417
7 天星标排名变化-12
总星标排名5,486
上次总星标排名5,486
总星标排名变化0
README 摘录

** OpenMeter is open-source monetization infrastructure built for AI, API, and usage-based products. It turns high-volume events into real-time usage, powers access enforcement, and handles usage-based billing from pricing and subscriptions through credits and invoices. Quickstart · Documentation · API reference · Community How it fits together Is OpenMeter a fit? ** | Products with usage-based or hybrid pricing, prepaid credits, or usage limits that need one source of truth for consumption. ** | 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. ** | 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. | | **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. | Quickstart The local evaluation stack requires Git and Docker with Compose. Choose a client below; each example sends one event and queries its metered value

. Bash (curl) TypeScript SDK Install the OpenMeter TypeScript SDK: Save as , then run : Python SDK The Python SDK is in preview, so install it with pre-releases enabled: Save as , then run : Event processing is asynchronous. A successful example ends with a metered value of . 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 OpenMeter 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: Running OpenMeter The 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.

常见问题

记录了多少星标和分叉?

openmeterio/openmeter 有 2,383 个星标和 226 个分叉。

仓库排名是多少?

openmeterio/openmeter 排名第 5,064。

记录的语言和类别是什么?

openmeterio/openmeter 有 2,383 个星标,语言为 Go,类别为 Infrastructure。

哪个仓库排名最接近?

openmeterio/openmeter 与 IST-DASLab/gptq 比较,后者排名第 5,062,有 2,386 个星标。

README

OpenMeter

Meter usage. Enforce access. Bill customers. Keep the stack yours.

OpenMeter is open-source monetization infrastructure built for AI, API, and usage-based products. It turns high-volume events into real-time usage, powers access enforcement, and handles usage-based billing from pricing and subscriptions through credits and invoices.

API-first and composable, it can own the path from raw usage to invoice—or only the parts your stack is missing—and work with the payment and tax providers you already use.

Quickstart · Documentation · API reference · Community

How it fits together

Is OpenMeter a fit?

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.

What OpenMeter provides

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.

Quickstart

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 --wait

The stack includes an api_requests_total meter. Choose a client below; each example sends one request event and queries its metered value.

Bash (curl)

curl -sS -o /dev/null -w '%{http_code}\n' \
  -X POST http://localhost:48888/api/v1/events \
  -H 'Content-Type: application/cloudevents+json' \
  --data-raw '{
    "specversion": "1.0",
    "type": "request",
    "id": "readme-curl-1",
    "source": "readme",
    "subject": "readme-curl",
    "data": { "method": "GET", "route": "/hello" }
  }'

response=
for attempt in 1 2 3 4 5 6 7 8 9 10; do
  response=$(curl -fsS 'http://localhost:48888/api/v1/meters/api_requests_total/query?subject=readme-curl')
  printf '%s' "$response" | grep -q '"value":1' && break
  sleep 1
done
printf '%s\n' "$response"

TypeScript SDK

Install the OpenMeter TypeScript SDK:

npm install @openmeter/sdk tsx

Save as quickstart.ts, then run npx tsx quickstart.ts:

import { OpenMeter } from '@openmeter/sdk'

const openmeter = new OpenMeter({ baseUrl: 'http://localhost:48888' })

const queryUsage = () =>
  openmeter.meters.query('api_requests_total', {
    subject: ['readme-typescript'],
  })

async function main() {
  await openmeter.events.ingest({
    type: 'request',
    id: 'readme-typescript-1',
    source: 'readme',
    subject: 'readme-typescript',
    data: { method: 'GET', route: '/hello' },
  })

  let usage = await queryUsage()
  for (let attempt = 1; usage.data[0]?.value !== 1 && attempt < 10; attempt++) {
    await new Promise((resolve) => setTimeout(resolve, 1000))
    usage = await queryUsage()
  }

  if (usage.data[0]?.value !== 1) {
    throw new Error('usage was not processed in time')
  }
  console.log(usage.data[0].value)
}

main().catch((error) => {
  console.error(error)
  process.exitCode = 1
})

Python SDK

The Python SDK is in preview, so install it with pre-releases enabled:

python -m pip install --pre openmeter

Save as quickstart.py, then run python quickstart.py:

import time

from openmeter import Client
from openmeter.models import Event

with Client(endpoint="http://localhost:48888") as openmeter:
    openmeter.events.ingest_event(
        Event(
            id="readme-python-1",
            source="readme",
            specversion="1.0",
            type="request",
            subject="readme-python",
            data={"method": "GET", "route": "/hello"},
        )
    )

    for _ in range(10):
        usage = openmeter.meters.query_json(
            "api_requests_total",
            subject=["readme-python"],
        )
        if usage.data and usage.data[0].value == 1:
            break
        time.sleep(1)
    else:
        raise RuntimeError("usage was not processed in time")

    print(usage.data[0].value)

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 latest OpenMeter 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 -v

Running OpenMeter

The 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.

Project and community

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

License

OpenMeter is licensed under the Apache License 2.0.

排名相邻
同类项目