This document specifies the internal Administrative API for managing a Routstr provider node. The Admin API is intended for the node operator and is secured via a persistent secret token or password-based session.
Access to all Admin API endpoints requires authentication.
- Method: Bearer Token or Session Cookie.
- Authorization:
Authorization: Bearer <ADMIN_TOKEN> - Security: This API should typically be exposed only on
localhostor over a secure VPN/tunnel.
The API is divided into functional modules:
Manages the core configuration of the provider node.
- GET /api/settings: Retrieve current configuration (redacting secrets).
- PATCH /api/settings: Update configuration (e.g.,
cashu_mints,description,name). - POST /api/settings/password: Rotate the admin password.
Manages connections to backend LLM providers (e.g., OpenAI, OpenRouter, vLLM).
- GET /api/upstreams: List configured upstream providers.
- POST /api/upstreams: Add a new upstream provider.
- PATCH /api/upstreams/{id}: Update credentials or base URL.
- DELETE /api/upstreams/{id}: Remove a provider.
Controls the catalog of models offered to the public network.
- GET /api/models: List all models (active and inactive).
- POST /api/models: Manually add or import a model.
- PATCH /api/models/{id}:
- Enable/Disable a model.
- Set custom pricing (overriding default calculation).
- Set aliases (e.g., map
gpt-4otomy-custom-gpt4).
- DELETE /api/models/{id}: Remove a model from the catalog.
Monitors the financial state of the node.
- GET /api/balances: View total holdings in the internal Cashu wallet.
- GET /api/temporary-balances: View active ephemeral sessions and their current "held" funds.
- POST /admin/withdraw: Withdraw funds from the internal wallet to an external Cashu token.
Investigative tools for debugging and monitoring.
- GET /logs/{request_id}: Retrieve detailed trace logs for a specific request ID (useful for debugging client issues).
- GET /logs/recent: Fetch a stream of recent system events.