Search documentation

Search the Fumadocs-backed documentation index.

Local provider keys

Run experiments locally with host provider API keys instead of Fiveonefour-managed model access.

Local provider keys let ax experiment run --local call model providers with credentials from your machine. Pass --local-model-keys to opt out of managed model access. Bring your own key and Fiveonefour's AI gateway do not apply on this path.

You still need Docker for local execution. See Installation.

When to use this path

Use local provider keys when you want:

  • Your own Anthropic, OpenAI, or Cursor billing for local runs.
  • To run without signing in for managed model access (no ax auth login / AX_API_KEY for the model path).
  • To keep model credentials on the host instead of routing through the Fiveonefour model proxy.

For remote sandbox runs, or default local managed access, see Model providers.

Set credentials and run

Each selected agent needs a host credential. Fiveonefour reads these from the host environment, ./.env, --env-file, or --env, then injects only the selected agent's key into the variant container.

AgentHost environment variable
claudeANTHROPIC_API_KEY
codexOPENAI_API_KEY
cursorCURSOR_API_KEY

These names are harness-managed and reserved. Do not put them under experiment environment_variables. ANTHROPIC_BASE_URL and OPENAI_BASE_URL are also reserved.

export ANTHROPIC_API_KEY=...
ax experiment run experiment.yaml --local --local-model-keys
export OPENAI_API_KEY=...
ax experiment run codex-experiment.yaml --local --local-model-keys
export CURSOR_API_KEY=...
ax experiment run cursor-experiment.yaml --local --local-model-keys

If you omit --local-model-keys and are not signed in, the CLI fails before starting containers with guidance to log in or opt into host keys.

What this path does not do

  • Does not use bring-your-own-key providers or Fiveonefour's AI gateway.
  • Does not inject AXP_MODEL_PROXY_TOKEN / AXP_MODEL_PROXY_URL for MCP servers that expect managed proxy refs. See MCP servers.
  • Does not apply to ax experiment run without --local (AX Cloud sandboxes always use managed model access).