Configure OpenClaw
OpenClaw can register InOneAPI as an OpenAI Chat Completions provider. Keep the key in an environment variable so the main configuration only holds a variable reference.
Recommended: use the official wizard
Run openclaw onboard and choose Custom Provider (in some versions it is under More… or Custom setup), then fill in:
| Field | Value |
|---|---|
| Provider ID | inoneapi |
| Base URL | https://api.inoneapi.com/v1 |
| API Key | InOneAPI API key |
| Compatibility | OpenAI Chat Completions |
| Model ID | YOUR_MODEL_ID from the model detail page |
After the wizard, select inoneapi/YOUR_MODEL_ID. This setup uses Chat Completions, so do not pick Responses or Anthropic by mistake. If a Gateway already exists, run openclaw gateway restart and check the default model again. On Windows, WSL2 is recommended.
Optional: configure the provider and default model manually
Create or open ~/.openclaw/openclaw.json:
{
"agents": {
"defaults": {
"model": {
"primary": "inoneapi/YOUR_MODEL_ID"
}
}
},
"models": {
"providers": {
"inoneapi": {
"baseUrl": "https://api.inoneapi.com/v1",
"apiKey": "${INONEAPI_API_KEY}",
"api": "openai-completions",
"models": [
{
"id": "YOUR_MODEL_ID",
"name": "YOUR_MODEL_ID"
}
]
}
}
}
}
Store the API key
Create ~/.openclaw/.env:
INONEAPI_API_KEY=ioa_sk_...
Then restrict the file permissions:
chmod 600 ~/.openclaw/.env
Verify the configuration
Restart OpenClaw and confirm that the current primary model shows inoneapi/YOUR_MODEL_ID. Run one short task, then check the request protocol, model, trace and cost in the InOneAPI console.
Common issues
- Environment variable not expanded: confirm
.envis in the OpenClaw home directory, not the project directory. - Duplicated
/v1in the request path: keep only one/v1inbaseUrl. - Model unavailable: check the project's model restrictions and whether
models[].idmatches the model detail exactly. - Long tasks keep failing: review upstream errors and retry counts in the trace, and do not configure aggressive retries on both the client and the gateway.
The local operations an agent may perform are controlled by OpenClaw's own permissions. InOneAPI's model permissions do not replace the operating-system sandbox or command approval.
Optional: import into CC Switch
On the model detail page, select this tool and an API key, then click “Open CC Switch and import”. Use the official CC Switch release; the import link already contains the current model ID, so you do not need to enter it again. After confirming the import, finish the connection by enabling the provider and setting the default model for this tool. If it reports that this app is unsupported, update CC Switch or follow the manual steps in this document.
The import link only adds a provider. It does not mean the model is already the default or that a request succeeded. The link contains an API key, so do not share it. Use either the manual setup or the CC Switch import, not both.
CC Switch imports the provider and the model list. You still have to select the default model in OpenClaw, so do not assume the import switches it for you.
Official reference: OpenClaw CLI onboarding.