LiteLLM
Antenna tracks AI spend from your self-hosted LiteLLM proxy by reading LiteLLM’s daily spend rollups. You get insight into spend, tokens, and requests by LiteLLM team, virtual key, and model, next to the AI tools you already track in Antenna.
Because every request through the proxy is counted, this covers internally built agents, shared integrations, and developer API calls that don’t show up in any single tool’s own reporting.
Prerequisites
- A LiteLLM proxy with spend tracking turned on (a connected database), reachable from the internet over HTTPS
- Permission to create users and virtual keys on the proxy
- Admin access to your Antenna enterprise
Setup
Create an Admin Viewer user
In LiteLLM, create a user with the Admin Viewer (proxy_admin_viewer) role, for example antenna@example.com. This role can read spend, users, and teams across the proxy but cannot change anything. See LiteLLM user roles .
Create a virtual key for that user
Generate a virtual key owned by the Admin Viewer user. Copy the key (it starts with sk-); you’ll paste it into Antenna next.
The key must belong to an Admin Viewer or other proxy admin user. Keys owned by internal users, or keys with no user, cannot read proxy-wide spend, and Antenna rejects them when you connect.
Connect in Antenna
- In Antenna, go to Settings > Sources > Add source.
- Find LiteLLM and click Connect.
- Enter your Proxy URL, for example
https://litellm.example.com. - Paste your Virtual Key.
- Click Connect.
Antenna validates the URL and key when you connect and encrypts the key at rest. Usage refreshes every two hours, and Antenna backfills up to 19 months of daily history so year-over-year comparisons are available.
If the key is revoked or loses access, Antenna flags the source and stops collecting until you enter a new key under Edit Connection on the source’s settings page. To connect a different proxy, disconnect LiteLLM and connect the new proxy; the proxy URL can’t be changed after data has been imported.
Network access
Antenna calls your proxy’s management API directly, so the proxy must:
- Resolve to a public IP address. Antenna rejects URLs that resolve to private, loopback, or link-local addresses.
- Serve HTTPS with a certificate from a publicly trusted CA.
- Allow requests from Antenna’s IP addresses, if you restrict access by IP. See IP Allowlisting below.
If your proxy is internal only, a common setup is a reverse proxy or load balancer that terminates TLS, allows only Antenna’s IP addresses, and forwards requests to LiteLLM. Contact us at support@antenna.dev if you can’t expose a public hostname.
Viewing LiteLLM spend
Go to AI Financials > Spend and set Spend by to Key. You can view spend, tokens, or requests at three levels:
| Level | What it shows |
|---|---|
| Team | The LiteLLM team each virtual key is assigned to. Keys with no team are grouped into one line. |
| Key | Each virtual key by its alias, under its team. |
| Model | The model the proxy sent requests to. |
A virtual key with no owner is treated as a service account, such as an agent or shared integration. Its spend is reported against the key, and it never counts as a contributor.
Spend is the USD cost LiteLLM calculates for each request, so it reflects any custom pricing or discounts configured on your proxy.
Tracking agents and coding tools
LiteLLM attributes spend to the virtual key that made each request. To see the cost of an individual agent or team, give it its own virtual key with a descriptive alias, such as checkout-agent or payments-team, and assign the key to a LiteLLM team.
LiteLLM also tags each request with the client’s User-Agent, which identifies coding agents such as Claude Code, Codex, and Cursor. Antenna collects these tags along with any custom request tags you send. Keep User-Agent tagging on (don’t set disable_add_user_agent_to_request_tags) so this data stays available.
Data collected
We pull from the LiteLLM proxy management API:
| Purpose | Endpoint |
|---|---|
| Validate the key and sync proxy users | GET /user/list |
| Team names for keys assigned to LiteLLM teams | GET /v2/team/list |
| Daily spend, tokens, and requests by virtual key and model | GET /user/daily/activity |
| Daily spend, tokens, and requests by request tag and model | GET /tag/daily/activity |
Each daily query covers a single UTC day and returns spend in USD, request counts (total, successful, and failed), and prompt, completion, and cache token counts. We use proxy users’ emails to match key owners to identities in Antenna.
Antenna only reads from your proxy and never changes keys, users, budgets, or settings. Antenna does not collect prompts or completions.
IP Allowlisting
If your organization restricts access by IP address, you must allow traffic from Antenna before connecting a source such as your Git provider or LiteLLM proxy. All of our API requests come from a fixed set of load balancer IP addresses, so an active allowlist that does not include them will block data imports, and for Git providers, sign-in too.
Add all five addresses below. In tools that require CIDR notation, append /32 to each address (for example, 100.21.131.68/32).
| IP address | Direction |
|---|---|
100.21.131.68 | Inbound and outbound |
54.200.57.76 | Inbound and outbound |
52.37.32.106 | Inbound and outbound |
44.241.124.75 | Inbound and outbound |
54.69.112.12 | Egress (outbound requests from Antenna) |
When an address is missing from your allowlist, the connection often looks successful while requests fail in the background with 403 errors and no data appears in your reports. If you are unsure whether an IP restriction is active, ask your provider administrator to confirm before connecting, or contact us at support@antenna.dev.