Use ZhiFlo in OpenClaw
This guide adds a model provider to your local OpenClaw configuration. At the end, openclaw models status will recognize ZhiFlo and you can select zhiflo/<model ID> for a local chat.
Before you start
Section titled “Before you start”- Install OpenClaw from its official documentation, then confirm that
openclaw --versionprints version information. - Create a Token for this device.
- Copy a complete model ID from your account.
Provide the Token through the environment
Section titled “Provide the Token through the environment”macOS, Linux, or Bash
Section titled “macOS, Linux, or Bash”read -s ZHIFLO_API_TOKENexport ZHIFLO_API_TOKENPowerShell
Section titled “PowerShell”$secureToken = Read-Host "Paste your ZhiFlo Token" -AsSecureString$env:ZHIFLO_API_TOKEN = [System.Net.NetworkCredential]::new("", $secureToken).PasswordThe Token is available to processes for this user session. Do not write its real value into openclaw.json or a project repository.
Add the provider
Section titled “Add the provider”Open:
~/.openclaw/openclaw.jsonMerge models.providers.zhiflo from the example below into your existing JSON. Keep other providers, Gateway settings, and user preferences. Replace both <MODEL_FROM_ZHIFLO> values with the same complete model ID.
{ "models": { "providers": { "zhiflo": { "baseUrl": "https://api.zhiflo.com/v1", "apiKey": "${ZHIFLO_API_TOKEN}", "api": "openai-completions", "models": [ { "id": "<MODEL_FROM_ZHIFLO>", "name": "<MODEL_FROM_ZHIFLO>" } ] } } }}Use openai-completions with the /v1 Base URL. The name controls a local label; the id must match the account model exactly.
Check and select the model
Section titled “Check and select the model”-
Save
openclaw.json. -
In the same terminal where you set the environment variable, run:
Terminal window openclaw models statusThe output should recognize
zhifloand the configured model. -
Replace the placeholder with the same model ID and make it current:
Terminal window openclaw models set "zhiflo/<MODEL_FROM_ZHIFLO>" -
Open your local OpenClaw chat interface from the same terminal.
-
Run
/model statusin the chat.The status should show the ZhiFlo provider address and OpenAI Completions mode.
-
Confirm that the current model is
zhiflo/<model ID>. -
Send:
Do not run tools. Reply with OK only.
An OK reply confirms both model selection and an actual request.
If OpenClaw keeps the old configuration
Section titled “If OpenClaw keeps the old configuration”- No
zhifloin status: verify the exactmodels.providers.zhiflonesting and correct any JSON punctuation errors. - A running Gateway still shows old settings: restart that Gateway after saving, then run
openclaw models statusagain. Do not disable authentication or enable insecure access as a workaround. - The model appears but requests fail: check that
apiisopenai-completions,baseUrlishttps://api.zhiflo.com/v1, and the current terminal can readZHIFLO_API_TOKEN. - Model unavailable: copy the ID again and update
id,name, and themodels setcommand together.