Skip to main content

Levo

API and LLM security testing and observability, at levo.ai.

info

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

Pre-Requisites

uv add litellm

You need a Levo collector URL in addition to your API key. Contact Levo support if you do not have one.

Quick Start

import litellm
import os

os.environ["LITELLM_OTEL_V2"] = "true"
os.environ["LEVOAI_API_KEY"] = ""
os.environ["LEVOAI_ORG_ID"] = ""
os.environ["LEVOAI_WORKSPACE_ID"] = ""
os.environ["LEVOAI_COLLECTOR_URL"] = ""
# LLM API Keys
os.environ["OPENAI_API_KEY"] = ""

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

# openai call
response = litellm.completion(
model="gpt-4o",
messages=[
{"role": "user", "content": "Hi 👋 - i'm openai"}
]
)

What Levo renders

Open the Levo dashboard. Levo does not add a vendor mapper, so spans arrive in the canonical gen_ai.* schema; see Span attributes for the full list of keys.

The preset routes spans to LEVOAI_COLLECTOR_URL with Authorization: Bearer $LEVOAI_API_KEY, plus x-levo-organization-id and x-levo-workspace-id headers built from LEVOAI_ORG_ID and LEVOAI_WORKSPACE_ID.

Configuration

VariableRequiredNotes
LEVOAI_API_KEYYes
LEVOAI_ORG_IDYes
LEVOAI_WORKSPACE_IDYes
LEVOAI_COLLECTOR_URLYesUsed as-is with no path manipulation, so provide the exact URL Levo gave you

All four are validated at startup; the integration raises if any is missing. To label spans with an environment, set OTEL_ENVIRONMENT_NAME, which stamps deployment.environment on every span.

Full OpenTelemetry reference

This page covers the Levo-specific setup. For span attributes, prompt and response capture, metrics, distributed tracing, and which routes are traced, see the OpenTelemetry v2 guide.

Support & Talk to Founders

🚅
LiteLLM Enterprise
SSO/SAML, audit logs, spend tracking, multi-team management, and guardrails — built for production.
Learn more →