LiteLLM

LiteLLM

Beta
Beta release

This source is currently in beta. It works end to end, but you may still hit rough edges. Let us know if you do.

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.

Learn more
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 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.

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——