Documentation Index
Fetch the complete documentation index at: https://gomodel.enterpilot.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Philosophy
GoModel ships with admin endpoints enabled by default. The goal is simple: you should be able to deploy GoModel and immediately have visibility into what’s happening — no extra services, no separate monitoring stack, no configuration. The admin layer is split into two independently controllable pieces:- Admin REST API (
/admin/*) — machine-readable JSON endpoints for usage data, budgets, and model inventory. Protected byGOMODEL_MASTER_KEYlike all other API routes. - Admin Dashboard UI (
/admin/dashboard) — a lightweight, embedded HTML dashboard that visualizes the same data. No external dependencies, no JavaScript frameworks to install — it’s compiled into the binary.
Configuration
| Variable | Description | Default |
|---|---|---|
ADMIN_ENDPOINTS_ENABLED | Enable the admin REST API | true |
ADMIN_UI_ENABLED | Enable the admin dashboard UI | true |
DASHBOARD_LIVE_LOGS_ENABLED | Stream realtime dashboard audit/usage previews | true |
DASHBOARD_LIVE_LOGS_BUFFER_SIZE | In-memory replay window for live dashboard events | 10000 |
DASHBOARD_LIVE_LOGS_REPLAY_LIMIT | Max events replayed to one reconnecting client | 1000 |
DASHBOARD_LIVE_LOGS_HEARTBEAT_SECONDS | Idle stream heartbeat interval in seconds | 15 |
The dashboard UI requires the REST API to be enabled. If you set
ADMIN_ENDPOINTS_ENABLED=false but leave ADMIN_UI_ENABLED=true, the UI
will be automatically disabled with a warning in the logs.Authentication
The admin REST API endpoints (/admin/*) are protected by the same GOMODEL_MASTER_KEY authentication as the main API routes. Include the key as a Bearer token:
/admin/dashboard) and static assets (/admin/static/*) skip authentication so the dashboard is accessible without configuring API keys in the browser.
REST API Endpoints
All admin API endpoints are mounted under/admin.
Legacy path alias — until 2026-08-09, the same endpoints are also
reachable under
/admin/api/v1/*. Responses on the legacy path carry
Deprecation: true, Sunset: Sun, 09 Aug 2026 00:00:00 GMT, and a Link
header pointing to the new path. To migrate, replace /admin/api/v1/ with
/admin/ in your scripts. One endpoint also moved within /admin:
/admin/api/v1/dashboard/config → /admin/runtime/config.GET /admin/usage/summary
Returns aggregate token usage statistics over a configurable time window. Query parameters:| Parameter | Type | Description | Default |
|---|---|---|---|
start_date | string | Range start in YYYY-MM-DD format | 29 days before end |
end_date | string | Range end in YYYY-MM-DD format | Today |
days | int | Shorthand for look-back window (ignored if dates are set) | 30 |
start_date/end_date for explicit ranges or days as a shorthand. When both are provided, start_date/end_date take priority.
Response:
GET /admin/usage/daily
Returns per-period token usage breakdown over a configurable time window, grouped by the specified interval. Query parameters:| Parameter | Type | Description | Default |
|---|---|---|---|
start_date | string | Range start in YYYY-MM-DD format | 29 days before end |
end_date | string | Range end in YYYY-MM-DD format | Today |
days | int | Shorthand for look-back window (ignored if dates are set) | 30 |
interval | string | Grouping: daily, weekly, monthly, yearly | daily |
date field in the response changes format based on the interval: YYYY-MM-DD (daily), YYYY-Www (weekly), YYYY-MM (monthly), or YYYY (yearly).
Response:
Budget endpoints
Budgets are managed under/admin/budgets. These endpoints are
available when budget management is enabled.
| Method | Path | Description |
|---|---|---|
GET | /admin/budgets | List budgets with current status |
PUT | /admin/budgets/{user_path}/{period} | Create or update one budget |
DELETE | /admin/budgets/{user_path}/{period} | Delete one budget |
GET | /admin/budgets/settings | Read budget reset settings |
PUT | /admin/budgets/settings | Update budget reset settings |
POST | /admin/budgets/reset-one | Reset one budget period |
POST | /admin/budgets/reset | Reset all budget periods |
PUT, DELETE, and reset-one identify one budget by the composite
(user_path, period) key, or (user_path, period_seconds) for custom periods.
These operations are not global per period. For the path-scoped PUT and
DELETE routes, URL-encode user_path; see Budgets for
the request shape.
See Budgets for request examples and enforcement behavior.
GET /admin/models
Returns all registered models with both provider type and configured provider name. Response:/v1/models endpoint: the admin version includes both provider_type and provider_name for each model, making it useful for understanding both the provider family and the concrete configured provider instance that serves the model.
Admin Dashboard
The dashboard is a server-rendered HTML page embedded in the GoModel binary. Access it at:DASHBOARD_LIVE_LOGS_ENABLED=true, the dashboard opens
GET /admin/live/logs and streams compact audit/usage lifecycle previews. This
lets the Audit Logs and Usage pages show a request as it moves through the
workflow before the async database flush finishes. The stream uses sequence
cursors, bounded replay, and heartbeat events so reconnecting browsers can catch
up after short network drops.
The persisted audit and usage tables remain the source of truth. If the
browser’s cursor falls outside the replay buffer, the stream sends a reset event
and the dashboard reloads from the normal REST endpoints.