Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kitephp/CLIProxyAPI-Tray/llms.txt

Use this file to discover all available pages before exploring further.

CLIProxyAPI Tray reads and manages config.yaml, the main configuration file for the CLIProxyAPI proxy service. The tray auto-creates config.yaml from config.example.yaml on first run if it does not exist. This page documents the most important settings.

File location

config.yaml lives in the same directory as cli-proxy-api.ps1 (the tray script). For the one-line installer, this is %USERPROFILE%\.cli-proxy-api-tray\config.yaml. For a cloned repository, it is the repository root.
To edit config.yaml directly, use Open → Config from the tray menu. This opens the file in your system’s default editor.

Core settings

The host and port control which network interface and port CLIProxyAPI binds to.
host: ""
port: 8317
FieldDefaultDescription
host""Interface to bind. Empty binds all interfaces (IPv4 + IPv6). Use "127.0.0.1" to restrict to localhost only.
port8317TCP port the server listens on.
The tray reads port from config.yaml each time it starts or opens the WebUI to construct the URL http://127.0.0.1:{port}/management.html.

TLS

Enable HTTPS by providing a certificate and key.
tls:
  enable: false
  cert: ""
  key: ""
When enable: true, CLIProxyAPI listens on HTTPS using the certificate and key at the paths specified by cert and key. Leave enable: false for plain HTTP (the default).

Remote management

These settings control the management API and WebUI access. The secret-key field is the most important one for the tray.
remote-management:
  allow-remote: false
  secret-key: ""
  disable-control-panel: false
  panel-github-repository: "https://github.com/router-for-me/Cli-Proxy-API-Management-Center"
FieldDefaultDescription
allow-remotefalseWhen false, only localhost can reach management endpoints. A key is still required even for localhost.
secret-key""The management password. All management requests require this key. CLIProxyAPI hashes it on startup if a plaintext value is provided.
disable-control-panelfalseWhen true, disables the bundled WebUI asset download and its HTTP route.
panel-github-repository(Cli-Proxy-API-Management-Center)GitHub repository used to fetch the management panel assets.
The tray reads secret-key on each Start to check whether a password is set. When you use Settings → Reset Password, the tray writes the new value back to config.yaml under remote-management.secret-key. See Managing the CLIProxyAPI management password for the full workflow.

API keys

Clients authenticate with the proxy using these keys.
api-keys:
  - "your-api-key-1"
  - "your-api-key-2"
Add one key per line under the api-keys list. Clients include the key in their requests (typically as a Bearer token or Authorization header, depending on the client).

Routing

Controls how the proxy selects credentials when multiple match a request.
routing:
  strategy: "round-robin"  # round-robin (default) or fill-first
  session-affinity: false
  session-affinity-ttl: "1h"
FieldDefaultDescription
strategy"round-robin"round-robin distributes requests evenly; fill-first exhausts one credential before moving to the next.
session-affinityfalseWhen true, binds sessions to a specific credential for continuity. Session ID is detected from headers or message hash.
session-affinity-ttl"1h"How long a session-to-credential binding is retained before expiring.

Logging

Controls how CLIProxyAPI writes log files.
logging-to-file: false
logs-max-total-size-mb: 0
error-logs-max-files: 10
debug: false
FieldDefaultDescription
logging-to-filefalseWhen true, writes logs to rotating files in the logs/ directory instead of stdout.
logs-max-total-size-mb0Maximum total size in MB of all log files. Oldest files are deleted when exceeded. 0 disables the limit.
error-logs-max-files10Maximum number of error log files kept when request logging is disabled. 0 disables cleanup.
debugfalseWhen true, enables verbose debug logging.

Show update progress (tray-specific)

This setting is read exclusively by the tray, not by CLIProxyAPI itself.
show-update-progress: true
When true (the default), a progress window appears during CLIProxyAPI binary downloads. Set to false to suppress the progress window and download silently.
The tray only reads two fields from config.yaml at runtime: port and show-update-progress. All other settings are passed directly to CLIProxyAPI when it starts via --config "path/to/config.yaml".

Provider-specific and advanced options

Provider-specific keys (Gemini, Claude, Codex, OpenAI-compatibility, Vertex, Ampcode) and advanced options (payload rules, OAuth aliases, quota behavior) are documented in the CLIProxyAPI project itself. For the full reference, see the CLIProxyAPI repository.

Build docs developers (and LLMs) love