Opening the Admin UI
UI features
Accounts view
The Accounts view shows a KPI overview across all registered accounts, including error rate and average tokens per request. You can filter and sort the account list. Click any account to jump directly to the Requests view with that account’s filter pre-applied.Requests view
The Requests view lets you search and filter your request history. Available filters include:account_id— the account that handled the requestmodel— the client-requested model or the upstream modelendpoint— the endpoint pathstatus— HTTP response statushas_error— show only requests that returned errors- Time range — preset windows (15 min, 1 h, 6 h, 24 h, 7 days) or a custom date/time range
Request detail
Click any row in the Requests view to open the request detail page. From there you can:- Use the Back button to return to the Requests view with your filters preserved
- View summary fields — each one links back into the Requests view with that value as a filter
- Inspect the full request metadata in the JSON viewer, which supports search/highlight, expand/collapse, copy, and download
Header controls
The top-right corner of the UI exposes three controls:- Motion — choose
Magic,Subtle, orOff. Automatically forced toOffwhen your OS has reduced motion enabled. - Theme — choose
System,Light, orDark. - Admin token — open a dialog to save and test your admin token, which is stored in
sessionStorageand sent as thex-admin-tokenheader.
Deep links
The Admin UI uses hash routing. You can copy and share URLs that preserve your current view and filters:Data storage and retention
The proxy stores request metadata inadmin.sqlite under the app data directory:
- Linux / macOS:
~/.local/share/copilot-api/admin.sqlite - Windows:
%USERPROFILE%\.local\share\copilot-api\admin.sqlite
Access control
When you access the Admin UI from
localhost, 127.0.0.1, or ::1, no token is required. The Admin UI and API are restricted to loopback access by default.ADMIN_TOKEN environment variable on the server before starting the proxy:
403 Forbidden— the request came from a non-loopback address andADMIN_TOKENis not set on the server.401 Unauthorized—ADMIN_TOKENis set but you did not include the token in the request header.
Admin API endpoints
You can query the same data programmatically using the Admin API:| Endpoint | Description |
|---|---|
GET /api/admin/meta | Returns database metadata: path, retention settings, and row count. |
GET /api/admin/accounts?include_stats=1 | Lists all accounts with runtime status. Pass include_stats=1 to include aggregated request statistics per account. |
GET /api/admin/requests | Returns paginated request logs. Supports filters: account_id, upstream_model, client_model, status, has_error, from_ms, to_ms. Paginate using cursor_id from the previous response’s next_cursor_id. |
GET /api/admin/requests/:requestId | Returns the full metadata record for a single request by its ID. |