Router9
Documentation
Integrations

OpenClaw

Use Router9 as a custom provider in OpenClaw

OpenClaw logo

OpenClaw is a powerful AI agent framework for Node.js that supports 40+ LLM providers. You can add Router9 as a custom OpenAI-compatible provider.

Setup

Add Router9 as a custom provider in your OpenClaw configuration file:

{
  models: {
    providers: {
      router9: {
        baseUrl: "https://api.router9.com/v1",
        apiKey: "${ROUTER9_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "anthropic/claude-opus-5",
            name: "Claude Opus via Router9",
            contextWindow: 1000000,
            maxTokens: 16384
          },
          {
            id: "deepseek/deepseek-v4-pro",
            name: "DeepSeek v4 Pro via Router9",
            contextWindow: 1000000,
            maxTokens: 8192
          }
        ]
      }
    }
  }
}

Set as Default Model

{
  agents: {
    defaults: {
      model: { primary: "router9/anthropic/claude-opus-5" }
    }
  }
}

Environment Variables

Set your Router9 API key:

export ROUTER9_API_KEY=sk-r9k-your-key-here

The apiKey field in the config references this via "${ROUTER9_API_KEY}".

CLI Setup

# Set your Router9 key
export ROUTER9_API_KEY=sk-r9k-your-key-here

# Set the default model to Router9
openclaw models set router9/anthropic/claude-opus-5

# Verify Router9 shows up in the model list
openclaw models list

MCP Setup

OpenClaw can call Router9's Skills — image and audio tools — through Router9's hosted MCP server. Add it once; OpenClaw probes the server and registers the tools:

openclaw mcp add router9 \
  --url https://api.router9.com/v1/mcp \
  --transport streamable-http \
  --header "Authorization=Bearer sk-r9k-your-key-here"

OpenClaw prefixes each Router9 tool with router9__ and rewrites the separator to stay provider-safe, so they show up as router9__image-generate, router9__image-describe, router9__audio-synthesize, router9__memory-list, router9__artifact-deploy, and so on. See Install MCP Server for the full tool list.

Skills (optional): Router9 also offers image and audio Skills as agent tools. MCP is the recommended way to expose them where your harness supports it; otherwise call them directly as REST endpoints (/v1/image/*, /v1/audio/*, /v1/search/) with your sk-r9k- key — see the API Reference.

Tips

  • OpenClaw supports key rotation. You can set multiple Router9 keys via ROUTER9_API_KEYS (comma-separated) for redundancy.
  • Model references follow the provider/model format — use router9/anthropic/claude-opus-5, router9/deepseek/deepseek-v4-pro, etc.
  • See the OpenClaw providers docs for advanced options like failover and model metadata.

On this page