latestOpenAPI 3.1.02026-08-236994571.1 MB

79928a3d37d3

Budget & Spend Tracking

Get Global Spend Report

Get Daily Spend per Team, based on specific startTime and endTime. Per team, view usage by each key, model [ { "group-by-day": "2024-05-10", "teams": [ { "team_name": "team-1" "spend": 10, "keys": [ "key": "1213", "usage": { "model-1": { "cost": 12.50, "input_tokens": 1000, "output_tokens": 5000, "requests": 100 }, "audio-modelname1": { "cost": 25.50, "seconds": 25, "requests": 50 }, } } ] ] }

get/global/spend/report

Query parameters

start_datestring nullable

Time from which to start viewing spend

Time from which to start viewing spend

end_datestring nullable

Time till which to view spend

Time till which to view spend

group_by'team' | 'customer' | 'api_key' nullable

Group spend by internal team or customer or api_key

Group spend by internal team or customer or api_key

api_keystring nullable

View spend for a specific api_key. Example api_key='sk-1234

View spend for a specific api_key. Example api_key='sk-1234

internal_user_idstring nullable

View spend for a specific internal_user_id. Example internal_user_id='1234

View spend for a specific internal_user_id. Example internal_user_id='1234

team_idstring nullable

View spend for a specific team_id. Example team_id='1234

View spend for a specific team_id. Example team_id='1234

customer_idstring nullable

View spend for a specific customer_id. Example customer_id='1234. Can be used in conjunction with team_id as well.

View spend for a specific customer_id. Example customer_id='1234. Can be used in conjunction with team_id as well.

Response

Successful Response

request_idstring required
api_keystring required
modelstring nullable
api_basestring nullable
call_typestring required
spendnumber nullable
total_tokensinteger nullable
prompt_tokensinteger nullable
completion_tokensinteger nullable
userstring nullable
{"stackTrail":"components:schemas:LiteLLM_SpendLogs-Output:properties:metadata:anyOf","oasType":"schema","type":"unknown","title":"Metadata","nullable":true}
cache_hitstring nullable
cache_keystring nullable
{"stackTrail":"components:schemas:LiteLLM_SpendLogs-Output:properties:request_tags:anyOf","oasType":"schema","type":"unknown","title":"Request Tags","nullable":true}
requester_ip_addressstring nullable