Skip to main content

Ramp

Send AI usage and cost data to Ramp for automated spend tracking.

Ramp is a finance automation platform that helps businesses manage expenses, corporate cards, and vendor payments. With the Ramp callback integration, your LiteLLM AI usage — including token counts, model costs, and request metadata — is automatically sent to Ramp for real-time spend visibility.

info

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

Pre-Requisites

  1. Log in to Ramp and search for "LiteLLM" using the search bar. Click the LiteLLM integration result.

Note: Only business owners and admins can access and configure integrations.

  1. On the LiteLLM integration page, click the Connect button in the top right.

  2. In the Connect LiteLLM drawer, click Generate API Key to create an API key.

Important: Copy the API key immediately — it won't be shown again. If you lose it, you can revoke the existing key and generate a new one from the integration settings.

pip install litellm

Quick Start

Set your RAMP_API_KEY and add "ramp" to your callbacks to start logging LLM usage to Ramp.

litellm.callbacks = ["ramp"]
import litellm
import os

# Ramp API Key
os.environ["RAMP_API_KEY"] = "your-ramp-api-key"

# LLM API Keys
os.environ['OPENAI_API_KEY'] = ""

# Set ramp as a callback
litellm.callbacks = ["ramp"]

# OpenAI call
response = litellm.completion(
model="gpt-3.5-turbo",
messages=[
{"role": "user", "content": "Hi - I'm testing Ramp integration"}
]
)

What Data is Logged?

LiteLLM sends the Standard Logging Payload to Ramp on successful LLM API calls, which includes:

  • Request details: Model, messages, parameters
  • Response details: Completion text, token usage, latency
  • Metadata: User ID, custom metadata, timestamps
  • Cost tracking: Response cost based on token usage

Authentication

Set the RAMP_API_KEY environment variable with your Ramp API key.

Environment VariableDescription
RAMP_API_KEYYour Ramp API key (required)

Support & Talk to Founders

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