Introduction
The Management API provides programmatic control over switchAILocal’s configuration, monitoring, and intelligent systems. Use it to automate operations, build management dashboards, or integrate with DevOps tools.Base URL
/v0/management prefix.
Authentication
Management endpoints require a secret key for authentication:Initialize Secret
On first run, initialize your management secret:Endpoint Categories
Configuration
Manage server configuration and settings
- Get/update
config.yaml - Manage API keys
- Configure providers
Monitoring
Track usage and performance
- Usage statistics
- Provider health
- Request logs
Intelligent Systems
Access advanced AI capabilities
- Memory statistics
- Steering rules
- Hook status
- Analytics
Provider Management
Control AI providers
- Test connectivity
- Discover models
- Manage credentials
Quick Examples
Get Server Configuration
Update Configuration
Get Usage Statistics
Test Provider
Setup Workflow
New installations can use the setup flow:1. Check Setup Status
2. Initialize or Skip
3. Access Management Endpoints
After initialization, use the secret key:Localhost Bypass
When accessing fromlocalhost and remote management is disabled:
config.yaml
Remote Access
To enable remote management:config.yaml
Security Features
Rate Limiting
Failed authentication attempts trigger temporary IP bans:- Max failures: 5 attempts
- Ban duration: 30 minutes
- Scope: Per remote IP
CORS Disabled
Management endpoints disable CORS to prevent browser-based attacks.Localhost Restriction
Optionally restrict management to localhost only:config.yaml
Response Format
All management endpoints return JSON:Success Response
Error Response
Common Headers
Version Information
All responses include version headers:Available Endpoints
Configuration Management
Provider Management
Monitoring
Intelligent Systems
Advanced
Python Client Example
JavaScript Client Example
Next Steps
Configuration
Manage server configuration
Providers
Control AI provider settings
Authentication
Set up management authentication