Skip to content

OpenClaw ​

OpenClaw is an open-source, self-hosted personal AI assistant platform that connects messaging apps (Telegram, Discord, WhatsApp, iMessage, …) to AI agents on your own hardware. Add AccelsRouter as a custom provider in openclaw.json and every accelsrouter-routed model becomes available to your agents.

Prerequisites ​

ItemRequirement
Node.js≥ 22
OpenClawlatest
AccelsRouterA working sk- token

Install & bootstrap ​

bash
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon

The wizard sets up auth, the Gateway, and optional channels. Other install paths (Docker, manual) are in OpenClaw's Getting Started.

Configure AccelsRouter via models.providers ​

OpenClaw discovers model providers from openclaw.json. You declare AccelsRouter as a custom provider, list the models you want exposed, and then point your agent's default model at it.

Many built-in provider plugins ship a default catalog. Only declare an explicit models.providers.<id> entry when you want to override the base URL, headers, or model list — which is exactly what we're doing here.

1. Provide the API key ​

In your shell, service env, or an .env file readable by OpenClaw:

bash
export ACCELSROUTER_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

2. Edit openclaw.json ​

Add (or merge into) the following:

js
{
  models: {
    mode: "merge",
    providers: {
      accelsrouter: {
        baseUrl: "https://router.accels.tech/v1",
        apiKey: "${ACCELSROUTER_API_KEY}",
        api: "openai-completions",
        models: [
          { id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
          { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash" },
          // multimodal model — pass images as native input
          { id: "gpt-5.4", name: "GPT-4o", input: ["text", "image"] },
        ],
      },
    },
  },

  agents: {
    defaults: {
      model: {
        primary:   "accelsrouter/claude-sonnet-4-6",
        fallbacks: ["accelsrouter/gemini-2.5-flash"],
      },
      models: {
        "accelsrouter/claude-sonnet-4-6": { alias: "sonnet" },
        "accelsrouter/gemini-2.5-flash":  { alias: "flash" },
      },
    },
  },
}

Key fields ​

FieldNotes
models.modeUse "merge" so AccelsRouter is added alongside OpenClaw's built-in providers, not replacing them
models.providers.accelsrouter.baseUrlAccelsRouter base URL; must include /v1
models.providers.accelsrouter.apiKey${ACCELSROUTER_API_KEY} reads from env — avoids hard-coding the secret
models.providers.accelsrouter.api"openai-completions" for an OpenAI-compatible gateway like AccelsRouter
models.providers.accelsrouter.models[]Each entry's id must match AccelsRouter's actual model ID exactly
models.providers.accelsrouter.models[].inputSet to ["text", "image"] on models that accept image input — lets WebChat and node attachments pass images as native input rather than text references
agents.defaults.model.primaryPrimary model — format is provider/model-id (e.g. accelsrouter/claude-sonnet-4-6)
agents.defaults.model.fallbacksOrdered fallback list when the primary fails
agents.defaults.modelsOptional aliases / per-model metadata — visibility-only, does not register a runtime model. Custom-provider models must also appear in models.providers.<provider>.models[]

Verify ​

Send a message via any connected channel (Telegram, Discord, web UI). The agent should respond via AccelsRouter using the primary model; failures auto-fall back per your config.

ModelUse
claude-sonnet-4-6Daily driver across channels
gpt-5.4Multimodal (image attachments) — set input: ["text", "image"]
gemini-2.5-flashLong conversation history
tts-1 + whisper-1Voice channels (TTS + STT)

Common pitfalls ​

SymptomLikely cause
404 from upstreambaseUrl is missing /v1
Model "not registered" at runtimeModel only declared under agents.defaults.models — must also be in models.providers.<provider>.models[]
Image attachments arrive as text referencesinput: ["text", "image"] not set on that model entry
Fallback never triggersfallbacks IDs don't match any models.providers.accelsrouter.models[].id

Known limitations ​

  • Channel integrations (Telegram bot, Discord webhook, WhatsApp Business) require separate setup with each platform.
  • OpenClaw runs on your hardware; uptime and security are your responsibility.
  • Voice quality depends on the OS (macOS / iOS / Android have differing STT/TTS support).