Base URL
Authentication
All Management API requests require authentication using one of these methods:Authorization Header
Custom Header
Security Configuration
Configure management access inconfig.yaml:
Security Best Practices:
- Keep
allow-remote: falseunless remote management is required - Use a strong, randomly generated
secret-key - Even localhost requests require the management key
- Empty
secret-keydisables all management routes (returns 404)
Environment Variable Override
SetMANAGEMENT_PASSWORD environment variable to:
- Enable remote management automatically
- Override the config file secret key
Rate Limiting
Remote clients are subject to rate limiting:- Max failures: 5 failed authentication attempts
- Ban duration: 30 minutes
- Automatic cleanup: Stale IPs purged after 2 hours idle time
Response Headers
All management responses include build information:Management Endpoints
Configuration
GET /v0/management/config- Get full configurationGET /v0/management/config.yaml- Get raw YAML configPUT /v0/management/config.yaml- Update entire configGET /v0/management/latest-version- Check for updates
OAuth Sessions
POST /v0/management/oauth-callback- Handle OAuth callbackGET /v0/management/get-auth-status- Get authentication statusGET /v0/management/{provider}-auth-url- Get OAuth authorization URL
Quota Management
GET /v0/management/quota-exceeded/switch-project- Get project switching settingPUT /v0/management/quota-exceeded/switch-project- Enable/disable project switchingGET /v0/management/quota-exceeded/switch-preview-model- Get preview model switchingPUT /v0/management/quota-exceeded/switch-preview-model- Enable/disable preview switching
Logs
GET /v0/management/logs- Get log entriesDELETE /v0/management/logs- Clear all logsGET /v0/management/request-error-logs- List error log filesGET /v0/management/request-log-by-id/:id- Download request log by ID
Usage Statistics
GET /v0/management/usage- Get usage statisticsGET /v0/management/usage/export- Export usage dataPOST /v0/management/usage/import- Import usage data
Authentication Files
GET /v0/management/auth-files- List authentication filesPOST /v0/management/auth-files- Upload authentication fileDELETE /v0/management/auth-files- Delete authentication fileGET /v0/management/auth-files/models- Get available models
API Keys
GET /v0/management/api-keys- Get API keysPUT /v0/management/api-keys- Replace API keysPATCH /v0/management/api-keys- Update specific keyDELETE /v0/management/api-keys- Delete API key
Provider Keys
- Gemini:
/v0/management/gemini-api-key - Claude:
/v0/management/claude-api-key - Codex:
/v0/management/codex-api-key - OpenAI Compatible:
/v0/management/openai-compatibility - Vertex:
/v0/management/vertex-api-key
Error Responses
401 Unauthorized
403 Forbidden
404 Not Found
Returned when management API is completely disabled (emptysecret-key).
Example: Complete Setup
Next Steps
- Configuration Endpoints - Manage server configuration
- OAuth Endpoints - Handle OAuth authentication flows
- Quota Endpoints - Configure quota behavior
- Log Endpoints - Access and manage logs