ModelPilot Docs Home Sign in Start free trial

Configuration

The client is configured entirely through environment variables, so launchd/systemd/ container deployments behave identically. Flags to modelpilot-client override env.

Connection & auth

VariableDefaultDescription
ANTHROPIC_API_KEYYour Anthropic key. Stays on your machine; the proxy uses it to call Anthropic directly.
MODELPILOT_API_KEYAuthenticates your gateway to ModelPilot (created on the Connect page). Sent as a bearer token; recommended over a bare deployment id.
MODELPILOT_DEPLOYMENT_IDYour deployment id (dep_…). Identifies which account's mode, policy & billing apply.
MODELPILOT_BRAIN_URLThe hosted routing brain. Set it to enable routing; unset = pure passthrough.
MODELPILOT_CONSOLE_URLThe console base URL — enables metering, approved-policy fetch, and proposals.
MODELPILOT_UPSTREAMhttps://api.anthropic.comWhere the proxy forwards traffic.
MODELPILOT_PORT8400Port the proxy listens on.

Mode & refresh

VariableDefaultDescription
MODELPILOT_MODEautopilotLocal fallback mode. The account mode set in the console is authoritative when a brain is configured.
MODELPILOT_POLICY_REFRESH300Seconds between background refetches of admin-approved floors & rules. Newly approved tuning applies without a restart.

Metering & billing

When MODELPILOT_CONSOLE_URL + a key/deployment id are set, the client reports realized-savings deltas to the console so your bill reflects delivered savings — aggregate dollars and counts only, never prompt text.

VariableDefaultDescription
MODELPILOT_METER_INTERVAL60Seconds between background metering reports.
MODELPILOT_DBmodelpilot.dbLocal ledger path (counts/dollars; no prompt text).

Prefer a sidecar/cron? Run modelpilot meter --watch instead of the built-in reporter.

Proxy URL for your app

VariableDefaultDescription
MODELPILOT_PROXY_URLhttp://127.0.0.1:8400Used by the SDK helper (SDKs) to find your local proxy.
Set a spend budget and a minimum model per deployment in Settings — those are enforced server-side, no client config needed.

© 2026 ModelPilot · krethikram@gmail.com