Skip to main content

OpenMeter - Usage-Based Billing

OpenMeter is an Open Source Usage-Based Billing solution for AI/Cloud applications. It integrates with Stripe for easy billing.


We want to learn how we can make the callbacks better! Meet the LiteLLM founders or join our discord

Quick Start

Use just 2 lines of code, to instantly log your responses across all providers with OpenMeter

Get your OpenMeter API Key from

litellm.callbacks = ["openmeter"] # logs cost + usage of successful calls to openmeter
# pip install openmeter 
import litellm
import os

# from
os.environ["OPENMETER_API_ENDPOINT"] = ""
os.environ["OPENMETER_API_KEY"] = ""

# LLM API Keys

# set openmeter as a callback, litellm will send the data to openmeter
litellm.callbacks = ["openmeter"]

# openai call
response = litellm.completion(
{"role": "user", "content": "Hi 👋 - i'm openai"}