MandAPI
English ▾
Coding tools

Add MandAPI as an OpenClaw model provider

Register a custom provider, select a real model and check a local chat before connecting channels.

Use this recipe with your coding assistant

Read the prompt
Configure my existing OpenClaw installation with a custom MandAPI provider while preserving channels, workspace and tool policy. Locate the active config with openclaw config file and keep a backup. Add models.providers.mandapi with baseUrl https://api.mandapi.com/v1, api openai-completions, apiKey ${MANDAPI_API_KEY}, and one exact account-visible MODEL_ID. Keep the real key private and ensure the actual local process or service inherits it. Check for an agent models.json override if settings differ. Validate configuration, select mandapi/MODEL_ID and guide a small local text check followed by a read-only project summary. Check MandAPI usage and explain restoration. Do not create messaging connections or deploy a public service.
TXT

Register a model connection

Use your existing local OpenClaw installation. Run openclaw config file to find the active configuration and keep a copy before merging changes. Choose an exact MandAPI model ID with Chat Completions and tool support appropriate to your agent.

Merge the following provider block into the existing configuration. Replace MODEL_ID; preserve your existing providers, channels and workspace settings:

json
{
  "models": {
    "mode": "merge",
    "providers": {
      "mandapi": {
        "baseUrl": "https://api.mandapi.com/v1",
        "apiKey": "${MANDAPI_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "MODEL_ID",
            "name": "MandAPI"
          }
        ]
      }
    }
  }
}

openai-completions is OpenClaw's adapter name for Chat Completions. It uses the /v1 base above. A Responses connection requires a different adapter and a model that supports that format; changing the model name alone does not switch protocols.

Supply the credential to the running process

Set MANDAPI_API_KEY privately before starting the local process. For Bash:

bash
read -rsp "MandAPI key: " MANDAPI_API_KEY
printf '\n'
export MANDAPI_API_KEY

Or PowerShell:

powershell
$env:MANDAPI_API_KEY = [Net.NetworkCredential]::new('', (Read-Host 'MandAPI key' -AsSecureString)).Password

If you run OpenClaw as a background service, supply the variable through that service's environment; a variable in a separate terminal will not automatically reach it. The ${MANDAPI_API_KEY} text in the JSON is a reference, not the actual key.

Validate and select

bash
openclaw config validate
openclaw models list
openclaw models set mandapi/MODEL_ID

Start a local chat through your existing OpenClaw interface. Ask one short question without tool actions, then request a small read-only project summary. Check both the selected model and matching MandAPI usage. A local check does not require connecting WhatsApp, Telegram or another messaging channel.

Troubleshoot the active configuration

If a provider setting appears ignored, inspect whether the active agent's models.json overrides the same provider. If authentication fails only in the service, check its inherited environment. If tools fail after text works, inspect model compatibility and existing tool policy. Avoid adding invented context limits or zero-cost metadata to make the entry pass.

To restore the previous connection, reselect the old model and restore only the provider settings changed here.

References

Topics inspired by public documentation; instructions and examples adapted for MandAPI.