5-Minute Quickstart

Get your AI API calls metered, monitored, and analyzed in minutes. Revenium acts as a zero-latency middleware—just install the SDK, set your keys, and wrap your client.


list-radio Prerequisites

Before you begin, you need a Revenium account to route your telemetry.

Sign in or Register

Then navigate to Integrationsarrow-up-right to get your API key


1. Install the SDK

pip install "revenium-python-sdk[openai]"

2. Set Environment Variables

Revenium automatically intercepts these variables from your environment to route your telemetry securely.

# Your Revenium Routing & Auth
# Metering key (rev_mk_*): write-only scope used by the SDK + OTLP to emit metering events to Revenium.
export REVENIUM_METERING_API_KEY="your_revenium_api_key"
# Provider key: your standard provider API key used for the actual LLM call (swap for ANTHROPIC_API_KEY, etc. when using other providers).
export OPENAI_API_KEY="your_openai_api_key"

3. Wrap Your Client

Drop this into your existing logic. Revenium intercepts the call, calculates the exact token usage and cost, and forwards the request to OpenAI with zero added latency.


hand-point-right Next Step: Take Control of Your AI Economics

Seeing a single request on your dashboard is just the beginning. Now that Revenium is connected, choose your next objective to move from basic observability to true economic control:

  • Attribute Your Usage: Raw token counts are useless if you don't know what generated them. Learn how to inject organizationName, productName, agent, and traceId so you can track profit margins per customer and monitor exact agent execution paths.

  • Set Budgets & Alerts: Don't wake up to a massive provider bill. Set hard caps based on your tags and get pinged in Slack the second a customer or agent spikes your spend.

  • Monetize Your Apps: Ready to turn compute costs into revenue? Use your new telemetry data to build automated, usage-based billing for your users.

Last updated

Was this helpful?