LiteLLM

LiteLLM

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

PostHog Wizard hedgehog

Connect LiteLLM to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.

Sync spend logs, keys, users, teams, organizations, customers, budgets, tags and models from your LiteLLM proxy into the PostHog Data warehouse.

Enter the proxy's public https URL and the master key or an admin key. A key without admin rights only syncs its own spend logs. The organizations table needs a LiteLLM Enterprise license.

Configuration

OptionTypeRequired
Proxy URLtextYes
Master or admin keypasswordYes

Linking LiteLLM to PostHog

  1. Go to the Data pipeline page in PostHog
  2. Click New source and select LiteLLM
  3. Fill in the required configuration fields
  4. Click Next, select the tables you want to sync, and then press Import

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
spend_logs

One row per request the LiteLLM proxy served, with its cost, tokens and the key, user and team that sent it.

Incremental, Full refreshstartTime—
keys

A virtual key issued by the LiteLLM proxy, with its budget and spend.

Full refresh——
users

A user of the LiteLLM proxy, with their role, budget and spend.

Full refresh——
teams

A team on the LiteLLM proxy, with its members, budget and spend.

Full refresh——
models

A model deployment configured on the LiteLLM proxy.

Full refresh——
budgets

A budget on the LiteLLM proxy that keys, users, teams, organizations, customers and tags can share.

Full refresh——
organizations

An organization on the LiteLLM proxy that owns teams, with its budget and spend.

Full refresh——
tags

A spend tag on the LiteLLM proxy. Includes tags that were only passed on requests and have no stored settings.

Full refresh——
customers

An end user that callers pass to the LiteLLM proxy, with spend and budget fields.

Full refresh——