OpenClaw

OpenClaw is a self-hosted gateway that connects chat interfaces and communication channels to AI-powered agents.

Official documentation: https://docs.openclaw.ai


1.1 Setup Options

Method 1: Configuration File or Guided Setup (Recommended)

You can initialize OpenClaw using the interactive onboarding flow:

openclaw onboard

Alternatively, you may directly edit the configuration file located at:

~/.openclaw/openclaw.json

If your setup uses a different path, retrieve it with:

openclaw config file

Configuration Steps

  • Define a custom provider inside models.providers
  • Use OpenAI-compatible transport:
    • api: openai-completions
    • baseUrl: https://api.rygen.io/v1
  • Assign a default model using the provider/model format
  • Provide your API key directly or via environment variables / secret references

Example Configuration

{
  "models": {
    "providers": {
      "rygen": {
        "baseUrl": "https://api.rygen.io/v1",
        "api": "openai-completions",
        "apiKey": "your-rygen-api-key",
        "models": [
          {
            "id": "minimax/minimax-m2.5",
            "name": "Rygen Minimax M2.5",
            "reasoning": false,
            "input": ["text"],
            "contextWindow": 128000,
            "maxTokens": 8192
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "rygen/minimax/minimax-m2.5" }
    }
  }
}

Method 2: Non-Interactive Setup

For automated environments, you can configure OpenClaw without prompts:

export CUSTOM_API_KEY="your-rygen-api-key"

openclaw onboard --non-interactive \
  --auth-choice custom-api-key \
  --custom-base-url "https://api.rygen.io/v1" \
  --custom-model-id "minimax/minimax-m2.5" \
  --custom-api-key "$CUSTOM_API_KEY" \
  --secret-input-mode plaintext \
  --custom-compatibility openai

1.2 References: