Skip to content

OpenClaw Setup ​

OpenClaw is an open-source AI agent platform that can use Clauddy as its model provider.

What is OpenClaw? ​

A local AI assistant framework supporting:

  • Multi-channel messaging (Telegram, Discord, WhatsApp, etc.)
  • Tool use (browser, filesystem, shell, etc.)
  • Memory systems and extensible skills

Install ​

bash
npm install -g openclaw

Configure Clauddy as Provider ​

Edit ~/.openclaw/openclaw.json and add Clauddy under models.providers:

Anthropic Models (Claude) ​

json
{
  "models": {
    "providers": {
      "clauddy": {
        "baseUrl": "https://api.clauddy.com",
        "apiKey": "sk-your-clauddy-token",
        "auth": "api-key",
        "api": "anthropic-messages",
        "authHeader": true,
        "models": [
          {
            "id": "claude-sonnet-4-6",
            "name": "claude-sonnet-4-6",
            "api": "anthropic-messages",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 200000,
            "maxTokens": 8192,
            "compat": {
              "supportsReasoningEffort": true,
              "maxTokensField": "max_tokens"
            }
          },
          {
            "id": "claude-opus-4-7",
            "name": "claude-opus-4-7",
            "api": "anthropic-messages",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 200000,
            "maxTokens": 8192,
            "compat": {
              "supportsReasoningEffort": true,
              "maxTokensField": "max_tokens"
            }
          }
        ]
      }
    }
  }
}

OpenAI Models (GPT / Codex) ​

json
{
  "models": {
    "providers": {
      "clauddy-openai": {
        "baseUrl": "https://api.clauddy.com/v1",
        "apiKey": "sk-your-clauddy-token",
        "api": "openai-responses",
        "models": [
          {
            "id": "gpt-6-astra",
            "name": "gpt-6-astra",
            "api": "openai-responses",
            "reasoning": true,
            "input": ["text"],
            "contextWindow": 200000,
            "maxTokens": 16384
          }
        ]
      }
    }
  }
}

Google Models (Gemini) ​

json
{
  "models": {
    "providers": {
      "clauddy-gemini": {
        "baseUrl": "https://api.clauddy.com/v1beta",
        "apiKey": "sk-your-clauddy-token",
        "auth": "api-key",
        "api": "google-generative-ai",
        "models": [
          {
            "id": "gemini-3.1-pro-preview",
            "name": "gemini-3.1-pro-preview",
            "api": "google-generative-ai",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 1000000,
            "maxTokens": 65536
          }
        ]
      }
    }
  }
}

Field Reference ​

FieldDescription
baseUrlhttps://api.clauddy.com for Anthropic; https://api.clauddy.com/v1 for OpenAI; https://api.clauddy.com/v1beta for Gemini
apiKeyYour Clauddy API token
apiProtocol: anthropic-messages (Claude), openai-responses (GPT), google-generative-ai (Gemini)
authSet to api-key
authHeaderSet true for Anthropic models
modelsModel list with id, name, capabilities

Using Models ​

Reference models as provider/model-id:

clauddy/claude-sonnet-4-6
clauddy/claude-opus-4-7
clauddy-openai/gpt-6-astra
clauddy-gemini/gemini-3.1-pro-preview

Set a default model:

json
{
  "models": {
    "default": "clauddy/claude-sonnet-4-6"
  }
}

Apply Changes ​

After editing openclaw.json, restart the gateway to apply:

bash
openclaw gateway restart

TIP

OpenClaw supports hot-switching models. Use /model in chat to switch between configured models anytime.

Troubleshooting ​

Model switching not working ​

If you configured new models but OpenClaw can't recognize or switch to them, the model cache may be stale.

Fix:

  1. Delete the cached models file:
bash
rm ~/.openclaw/agents/main/agent/models.json
  1. Restart the gateway:
bash
openclaw gateway restart

OpenClaw will reload model configs from openclaw.json on restart.

Connection failed ​

  • Verify baseUrl is correct (Anthropic: https://api.clauddy.com, OpenAI: https://api.clauddy.com/v1, Gemini: https://api.clauddy.com/v1beta)
  • Verify apiKey is valid and the token group includes the target models
  • Run openclaw gateway restart to reload config

More at OpenClaw docs.

Clauddy | AI API 聚合平台