latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-14129143297.4 KB

0e52fe5f8d33

admin

Get User Llm Usage Logs

List per-call LLM usage logs for a specific user, most recent first.

Each row records a single LLM call: provider, model, purpose (primary / vision / heartbeat / compaction / etc.), token counts, and cost in USD. Purpose lets you spot a runaway compaction loop or a heartbeat model burning cache misses.

The audit dependency writes one row when the route exits, matching the policy on the user-detail endpoint.

get/api/admin/users/{user_id}/llm-usage-logs

Path parameters

user_idstring required

Query parameters

limitinteger

Response

Successful Response

totalinteger required