Budget & Spend Tracking
Get Spend Capture Rate
Changed onCompare the spend LiteLLM captured for a provider against that provider's own bill, per UTC day.
Admin only. Reads the provider's billing API with the billing credential set on the proxy (OpenAI: OPENAI_ADMIN_KEY) and sums LiteLLM_DailyUserSpend for the same days.
Example:
curl -H "Authorization: Bearer $LITELLM_MASTER_KEY" "http://localhost:4000/spend/capture_rate?provider=openai&start_date=2026-09-17&end_date=2026-09-23"
get/spend/capture_rate
Request
- Base URL: https://api.sea-lion.ai (the document declares no server; this is the origin it was published from)
- URL: https://api.sea-lion.ai/spend/capture_rate
- Auth: API key in header x-litellm-api-key
Query parameters
start_datestring date required
First UTC day of the range, YYYY-MM-DD
end_datestring date required
Last UTC day of the range, YYYY-MM-DD, inclusive
provider'openai'
Provider whose bill to compare against; needs OPENAI_ADMIN_KEY set on the proxy
thresholdnumber
Ratio under which the report flags below_threshold
project_idsstring[] nullable
Scope the OpenAI bill to these project ids; omit to compare against the whole organization. Captured spend is never scoped, so pass every project LiteLLM's OpenAI keys belong to
Response
Successful Response
Changes
- info
endpoint added
- info