Audit log
The audit log records who changed the configuration of your Pishtaq install, and what the change was. It is for questions such as who created a key, who changed a team's budget, or who added a model.
What is recorded
Each entry records one change to one object:
- The time of the change.
- The action: created, updated, deleted, blocked, unblocked, rotated, or kill switch fired.
- The kind of object (the table) and its ID.
- Who made the change: the ID of the user, or the proxy admin name when there is no user ID, and the hash of the API key they used.
- The values before and after the change, when there are any.
The log covers administrative changes such as keys, teams, users, models, guardrails, agents, and sign-in and interface settings. It does not record the requests that people send to models. Those are in the request logs.
Values stored under a field name that contains "key" are masked before they are saved, so the audit log does not become a place where secrets sit.
If an administrator acts on behalf of another user, the entry names the user who was acted for, and the acting administrator is added to the updated values under _litellm_impersonation.
On by default
The audit log is on by default and needs no license. It needs a connected database, where entries are stored in the LiteLLM_AuditLog table. Without a database, entries are not stored and Pishtaq writes an error to the log.
To turn it off, use either of these. If both are set, the first one wins.
-
In
config.yaml:litellm_settings:store_audit_logs: false -
As an environment variable:
PISHTAQ_STORE_AUDIT_LOGS=false. In the Pishtaq container image, everyPISHTAQ_variable is also set under itsLITELLM_name, so this setsLITELLM_STORE_AUDIT_LOGS.
If neither is set, the audit log is on. Setting store_audit_logs: true in config.yaml also overrides the environment variable.
Read it in the admin UI
Sign in as a proxy admin or a view-only admin. In the left menu, open Logs, then the Audit Logs tab. Other roles do not see the tab.
The table has the columns Timestamp, Action, Table, Object ID, Changed By, and API Key (Hash), newest first. Search by ID, or open Filters to narrow the list by Object ID, Changed By, Team ID, Key Hash, Action, and Table. Select a row to see the details, with the values Before and After the change.
Read it through the API
Two endpoints read the log. Both need a proxy admin or view-only admin key, and answer with HTTP 403 for any other role.
List entries
curl "https://pishtaq.example.com/audit?action=deleted&table_name=LiteLLM_VerificationToken&page_size=20" \
-H "Authorization: Bearer $PISHTAQ_ADMIN_KEY"
Query parameters, all optional:
| Parameter | Meaning |
|---|---|
page | Page number, starting at 1. Default 1. |
page_size | Entries per page, from 1 to 100. Default 50. |
action | Exact action, such as created, updated, deleted, blocked, unblocked, rotated, or kill_switch_fired. |
table_name | Exact table name, such as LiteLLM_VerificationToken for keys or LiteLLM_TeamTable for teams. |
object_id | Exact ID of the changed object. |
changed_by | Exact ID of the user who made the change. |
changed_by_api_key | Exact hash of the API key that made the change. |
object_team_id | Entries whose before or after values hold this team_id. |
object_key_hash | Entries whose before or after values hold this key hash (token). |
search | Entries whose ID, object ID, user, or API key hash equals this value. |
sort_by | One of updated_at, action, table_name, changed_by, or object_id. Default updated_at. |
sort_order | asc or desc. Default desc. |
Filters combine, so an entry must match all that you give. The answer looks like this:
{
"audit_logs": [
{
"id": "0b7c1f0e-0000-0000-0000-000000000000",
"updated_at": "2026-12-04T09:30:00.000Z",
"changed_by": "admin-user-id",
"changed_by_api_key": "hash-of-the-api-key",
"action": "deleted",
"table_name": "LiteLLM_VerificationToken",
"object_id": "hash-of-the-deleted-key",
"before_value": {"key_alias": "demo-key"},
"updated_values": null
}
],
"total": 1,
"page": 1,
"page_size": 20,
"total_pages": 1
}
Get one entry
GET /audit/{id} returns one entry in the same shape as an item of audit_logs, or HTTP 404 when no entry has that ID.