/api/ for programmatic administration — the same API the dashboard frontend uses internally. These endpoints let you inspect server status, manage provider configuration, test connectivity, control the response cache, and track per-client usage without touching the config file directly.
Authentication
Most/api/ endpoints require a valid JWT token issued after login. Pass the token as a Bearer header:
Server information
GET /api/info
Returns the server’s network addresses, connection info, and live system resource metrics. This endpoint is public and requires no authentication.string
The server’s detected public or local IP address.
string
The bind host from server configuration.
integer
The port the server is listening on (default
8787).string
The constructed OpenAI-compatible base URL clients should point to, e.g.
http://1.2.3.4:8787/v1.boolean
Whether static access-key authentication is enabled in addition to JWT.
object
Live resource snapshot:
cpu_percent— CPU utilization (0–100)memory_total/memory_used/memory_percent— RAM in bytes and percentdisk_total/disk_used/disk_percent— disk in bytes and percent
GET /health
Lightweight health check. Returns200 OK with provider status when the server is running. Public endpoint.
string
Always
"ok" when the server is healthy.object
One entry per configured provider:
enabled— whether the provider is activekeys— number of configured API keysbase_url— the upstream endpoint
Providers
GET /api/providers
List all configured providers with their current status, key inventory, and routing settings. This endpoint is public. Query parameters:boolean
true on a successful response.object
Map of provider name to provider info:
enabled— whether the provider is activeprovider_type—"api"or"web_reverse"base_url— upstream API base URLkeys— array of key summaries (key value, label, weight, enabled)rate_limit_cooldown— cooldown in seconds after a rate-limit hittimeout— per-request timeout in secondsmodels— include/exclude model filter liststest_model— model used for connectivity tests
POST /api/providers//test
Send a minimal test request to the specified provider to verify API key validity and network reachability.string
"ok" on success, "error" on failure.string
Human-readable result message.
POST /api/providers//verify
Run a deeper multi-probe verification against a provider. Runs text generation, tool calling, and streaming probes in parallel and returns per-probe results. Request body:array
List of probes to run. Accepted values:
"text-gen", "tool-call", "streaming". Defaults to all three.string
Override the model used for probing. Falls back to the provider’s
test_model or a built-in default.string
"pass" if all probes succeeded, "partial" if some are unsupported, "fail" if any probe failed.object
Per-probe result with
status, latency_ms, error, and summary fields.Configuration
GET /api/config
Return the raw YAML config file content, preserving comments. Requires authentication.string
Raw YAML string of the current
config.yml.PUT /api/config
Update the config file with new YAML content and hot-reload all components without restarting. Validates YAML syntax and the MonoRelay config schema before writing.string
required
Complete YAML config file content to write. Must be valid YAML that parses into a valid
AppConfig.GET /api/config/full
Return the full configuration as a parsed JSON object, including secrets (admin-only). Requires admin privileges.PUT /api/config/full
Replace the full configuration from a JSON body (admin-only). Accepts the same structure returned byGET /api/config/full. Secrets are stored separately in the secrets manager.
Response cache
GET /api/cache/stats
Return current response cache statistics.integer
Number of cache hits since last clear.
integer
Number of cache misses.
integer
Current number of cached entries.
integer
Maximum cache capacity.
POST /api/cache/clear
Invalidate the response cache. Pass an optionalmodel query parameter to clear only entries for a specific model.
POST /api/cache/enable
Enable or reconfigure the response cache at runtime.Per-client usage
GET /api/usage/stats
Return usage statistics tracked per client identity. Passclient_id to scope results to one client.
POST /api/usage/clear
Reset usage stats. Passclient_id to clear only that client’s counters.