Skip to content

Configuration Options

ParameterTypeDefaultDescription
portinteger8317The port number on which the server will listen.
auth-dirstring"~/.cli-proxy-api"Directory where authentication tokens are stored. Supports using ~ for the home directory. If you use Windows, please set the directory like this: C:/cli-proxy-api/
proxy-urlstring""Proxy URL. Supports socks5/http/https protocols. Example: socks5://user:[email protected]:1080/
request-retryinteger0Number of times to retry a request. Retries will occur if the HTTP response code is 403, 408, 500, 502, 503, or 504.
remote-management.allow-remotebooleanfalseWhether to allow remote (non-localhost) access to the management API. If false, only localhost can access. A management key is still required for localhost.
remote-management.secret-keystring""Management key. If a plaintext value is provided, it will be hashed on startup using bcrypt and persisted back to the config file. If empty, the entire management API is disabled (404).
remote-management.disable-control-panelbooleanfalseWhen true, skip downloading management.html and return 404 for /management.html, effectively disabling the bundled management UI.
ampcodeobject{}Amp CLI integration block. Legacy amp-upstream-* keys are auto-migrated into this structure on load and rewritten.
ampcode.upstream-urlstring""Amp control plane URL. When empty, only provider aliases are registered (management proxy disabled).
ampcode.upstream-api-keystring""Optional ampcode.com API key override with highest precedence.
ampcode.restrict-management-to-localhostbooleantrueWhether to restrict Amp management routes to localhost only.
ampcode.model-mappingsobject[][]Amp model fallback mappings: map requested model (from) to an available local model (to).
ampcode.model-mappings.*.fromstring""Model name requested by Amp CLI.
ampcode.model-mappings.*.tostring""Local or proxy-available model to route to instead.
quota-exceededobject{}Configuration for handling quota exceeded.
quota-exceeded.switch-projectbooleantrueWhether to automatically switch to another project when a quota is exceeded.
quota-exceeded.switch-preview-modelbooleantrueWhether to automatically switch to a preview model when a quota is exceeded.
debugbooleanfalseEnable debug mode for verbose logging.
logging-to-filebooleantrueWrite application logs to rotating files instead of stdout. Set to false to log to stdout/stderr.
usage-statistics-enabledbooleantrueEnable in-memory usage aggregation for management APIs. Disable to drop all collected usage metrics.
api-keysstring[][]Legacy shorthand for inline API keys. Values are mirrored into the config-api-key provider for backwards compatibility.
gemini-api-keyobject[][]Gemini API key entries with optional per-key base-url and proxy-url overrides.
gemini-api-key.*.api-keystring""Gemini API key.
gemini-api-key.*.base-urlstring""Optional Gemini API endpoint override.
gemini-api-key.*.headersobject{}Optional extra HTTP headers sent to the overridden Gemini endpoint only.
gemini-api-key.*.proxy-urlstring""Optional per-key proxy override for the Gemini API key.
generative-language-api-keystring[][](Legacy alias) Pure key list mirrored from gemini-api-key; loads migrate into gemini-api-key and the legacy field is removed on save.
codex-api-keyobject{}List of Codex API keys.
codex-api-key.api-keystring""Codex API key.
codex-api-key.base-urlstring""Custom Codex API endpoint, if you use a third-party API endpoint.
codex-api-key.proxy-urlstring""Proxy URL for this specific API key. Overrides the global proxy-url setting. Supports socks5/http/https protocols.
claude-api-keyobject{}List of Claude API keys.
claude-api-key.api-keystring""Claude API key.
claude-api-key.base-urlstring""Custom Claude API endpoint, if you use a third-party API endpoint.
claude-api-key.proxy-urlstring""Proxy URL for this specific API key. Overrides the global proxy-url setting. Supports socks5/http/https protocols.
claude-api-key.modelsobject[][]Model alias entries for this key.
claude-api-key.models.*.namestring""Upstream Claude model name invoked against the API.
claude-api-key.models.*.aliasstring""Client-facing alias that maps to the upstream model name.
openai-compatibilityobject[][]Upstream OpenAI-compatible providers configuration (name, base-url, API keys, models); only api-key-entries are persisted.
openai-compatibility.*.namestring""The name of the provider. It will be used in the user agent and other places.
openai-compatibility.*.base-urlstring""The base URL of the provider.
openai-compatibility.*.api-keysstring[][](Deprecated) Parsed for compatibility, migrated into api-key-entries, and removed on save.
openai-compatibility.*.api-key-entriesobject[][]API key entries with optional per-key proxy configuration. Preferred over api-keys.
openai-compatibility.*.api-key-entries.*.api-keystring""The API key for this entry.
openai-compatibility.*.api-key-entries.*.proxy-urlstring""Proxy URL for this specific API key. Overrides the global proxy-url setting. Supports socks5/http/https protocols.
openai-compatibility.*.modelsobject[][]Model alias definitions routing client aliases to upstream names.
openai-compatibility.*.models.*.namestring""Upstream model name invoked against the provider.
openai-compatibility.*.models.*.aliasstring""Client alias routed to the upstream model.

NOTE

When claude-api-key.models is specified, only the provided aliases are registered in the model registry (mirroring OpenAI compatibility behaviour), and the default Claude catalog is suppressed for that credential.

Released under the MIT License.