Skip to main content

Overview

The Configuration Management API allows you to read and modify switchAILocal’s configuration at runtime without restarting the server.

Get Configuration

JSON Format

Returns the current configuration in JSON format:
Response:

YAML Format

Returns the configuration in YAML format:
Response:

Update Configuration

Update the entire configuration file:
Success Response:
Configuration changes are applied immediately without server restart. The config.yaml file is updated on disk.

Individual Settings

Debug Mode

Response:

File Logging

Response:

Request Logging

Response:

WebSocket Authentication

Response:

Usage Statistics

Response:

Proxy Settings

Response:

Retry Configuration

Request Retry

Response:

Max Retry Interval

Response:

Quota Configuration

Switch Project on Quota

Response:

Switch Preview Model

Monitoring

Server Logs

Retrieve server logs:
Query Parameters:
  • lines - Number of lines to retrieve (default: 100)
  • level - Filter by log level: debug, info, warn, error
Example:

Delete Logs

Clear all log files:

Request Error Logs

List all request error logs:
Response:

Download Error Log

Download a specific error log:

Get Request by ID

Retrieve a specific request log:

State Box

Get State Box information:
Response:

Version Check

Check for updates:
Response:

Hot-Reload Operations

Reload Steering Rules

Reload steering rules from disk:
Response:

Reload Hooks

Reload hooks from disk:
Response:

Python Examples

JavaScript Examples

Next Steps

Provider Management

Manage AI provider settings

Authentication

Set up management authentication

Configuration Guide

Learn about configuration options