Skip to main content
Add RunInfra to OpenClaw while keeping existing providers available. Support level: ready. Connect supports automatic setup.
Check the active configuration path before connecting. If you use an OpenClaw profile, pass its directory to Connect through OPENCLAW_STATE_DIR. Keep the same path environment for on and off.

Connect OpenClaw

Have OpenClaw installed, a workspace API key, and available RunInfra credits.
The bare agent command is an alias for on. In an interactive terminal, Connect starts login if needed. Review and approve the proposed changes. Connect saves a snapshot, writes the model settings, and makes a real Chat Completions request that uses credits. To choose a model during setup:
See Connect for status, diagnostics, and key replacement.

What Connect writes

Connect uses the first nonempty path setting in this order: Empty overrides are ignored. A leading ~ expands to your home directory. Connect refuses relative paths. Use an absolute path or a home-relative path beginning with ~. Check the file OpenClaw actually uses:
For --profile p1, run Connect with OPENCLAW_STATE_DIR set to ~/.openclaw-p1. More generally, --profile <name> uses ~/.openclaw-<name>. Connect cannot see OpenClaw’s profile flag. Use the same path environment for setup and disconnect. Connect sets models.mode to merge. It adds models.providers.runinfra with baseUrl: https://api.runinfra.ai/v1, apiKey, api: openai-completions, and the catalog model list. Each model uses its exact id, name, reasoning support, contextWindow, and maxTokens, with input: ["text"]. Connect selects runinfra/<model-id> through agents.defaults.model.primary. Existing providers remain available. Other settings, including modelPolicy.allow, stay unchanged.

Key placement

Literal mode writes the key to models.providers.runinfra.apiKey. For an environment reference:
Helper mode writes ${RUNINFRA_API_KEY}. Start OpenClaw with RUNINFRA_API_KEY in its actual process environment. A value exported in another terminal does not reach an already running process.
Export RUNINFRA_API_KEY with your RunInfra API key in the environment that launches the app. Restart GUI apps and background services with that environment.On Windows, set RUNINFRA_API_KEY in your user environment, then fully restart the app. GUI and Start menu launches do not receive a terminal-only $env:RUNINFRA_API_KEY value. Connect does not change your external environment.

Verify

OpenClaw 2026.9.2 on WSL completed a verified round trip on September 8, 2026, after Connect’s config-path correction. With OPENCLAW_STATE_DIR set, Connect wrote the file reported by openclaw config file. Configuration validation passed. The local agent request succeeded with stopReason: stop and was confirmed in RunInfra usage. Validate the active configuration:
If validation rejects pre-existing legacy keys such as meta.lastTouchedAt or commands.ownerDisplay, review the changes before letting OpenClaw migrate its own configuration:
In an authorized isolated environment, run the follow-up command for deepseek-v4-flash. Connect prints it but does not execute it:
The no-tools prompt is not a permission boundary. Confirm the selected model and request destination after choosing the active configuration file.

Restart

Check the active OpenClaw provider and model. Restart OpenClaw if reload is disabled or fails. Start a new chat. A successful Connect API probe does not verify OpenClaw.

Known behaviours

Connect edits JSON/JSONC only, not full JSON5. Still check reply routing after selecting the corrected file, reload behavior, helper credential resolution, and restoration after OpenClaw saves changes.
If Connect refuses JSON5 syntax or a structure it cannot rewrite safely, review the non-secret settings before applying them through this command:
Supply the reviewed setting and value yourself. Set models.mode to merge, models.providers.runinfra.baseUrl to https://api.runinfra.ai/v1, and models.providers.runinfra.api to openai-completions. Set agents.defaults.model.primary to runinfra/<model-id>.Use the catalog’s exact model ids, names, reasoning support, context windows, and output limits for models.providers.runinfra.models. Connect uses input: ["text"].Enter your API key through OpenClaw’s Control UI Settings > Models. Keep a backup of manual changes. Do not put the key in command arguments.

Troubleshooting

Revert

Keep the same path environment you used for on, including OPENCLAW_STATE_DIR for a profile:
In the recorded rerun, off restored the original absent-file state. With intact state and snapshots, off restores the original bytes from before the first on in the active connection. If the file did not exist then, Connect removes it. Later on calls and key rotations keep that restore point. If OpenClaw or another editor changed the file, Connect refuses to overwrite it. Back up and review the edits before choosing to discard them:
Connect saves the current contents in a recovery snapshot and prints its id before restoring the origin. Keep the snapshots. Without the origin snapshot, credential cleanup does not remove the provider, model catalog, or primary selection. It does not guarantee original-byte restoration. See Connect recovery. Restore manual environment changes yourself. Review changes made through OpenClaw’s own controls separately.

Connect

Set up, inspect, and restore your coding agent.

Chat completions

Read the request contract.

Models

Find model ids and context windows.