Skip to main content
Environment variables identify Step Code subprocesses, control permissions and multiple agents, and inject temporary model configuration in CI or containers. Launch Step Code from the same terminal after setting them.

Provider credentials

Each provider uses its own variables, such as ANTHROPIC_API_KEY and OPENAI_API_KEY. See API key providers.
Replace YOUR_STEP_API_KEY with your key and keep it out of commits. Saved accounts and custom provider settings also affect credentials; see Authentication and models. STEP_BASE_URL selects the Step model service endpoint. Match it to the account and billing channel; see Step API endpoints.

Runtime switches

Data and plan directories

See Data paths for the directory layout.

Injecting models with environment variables

Saving model and permission preferences writes back to the JSON file pointed to by STEPCODE_CONFIG_PATH rather than models.json; do not treat it as a read-only temporary model catalog. Use injected configuration for temporary endpoints in CI or containers. Specify the required model capabilities and compatibility options to match the server. See Authentication and models for persistent configuration.

Proxies

Use HTTP_PROXY / HTTPS_PROXY for outbound proxies, or global httpProxy in config.toml. NO_PROXY matches hostnames or suffixes that bypass the proxy.
Replace the port with your proxy’s port. This example bypasses the proxy for loopback requests.

Process marker

Subprocesses inherit this marker. SDK embedding does not set it automatically.

Telemetry

Telemetry is configured in global config.toml; see Configuration files. Model requests and manual feedback are managed separately.