OpenClaw

Connect OpenClaw to AuraRoute

OpenClaw takes a custom provider. These commands register AuraRoute as that provider and make agent the default model.

Flow

  1. Create an AuraRoute key — Dashboard → API keys. Copy az_live_… once.
  2. Install OpenClaw — The CLI installer puts OpenClaw under ~/.openclaw.
  3. Onboard the AuraRoute provider — Custom provider auraroute, base URL https://auraroute.dev/api, model id agent, OpenAI chat completions.
  4. Start OpenClaw — The default model is auraroute/agent. Requests use your key.
  5. Requests are routed — Tool calls hit the agent workload. Failover happens before the first token.

Commands

1. Create a key

Create a free account, then open API keys and create one. Copy the az_live_… value. It is shown once.

2. Install the CLI

Linux, macOS, or WSL2. This skips the interactive wizard so the next command can set the provider.

bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash

3. Register the AuraRoute provider

--custom-compatibility openai selects chat completions. AuraRoute does not serve /v1/responses.

bash
export AURAROUTE_API_KEY='az_live_...'
export CUSTOM_API_KEY="$AURAROUTE_API_KEY"

~/.openclaw/bin/openclaw onboard --non-interactive --accept-risk --skip-health \
  --mode local \
  --auth-choice custom-api-key \
  --custom-base-url https://auraroute.dev/api \
  --custom-model-id agent \
  --custom-provider-id auraroute \
  --custom-compatibility openai \
  --gateway-bind loopback

Or the same provider in OpenClaw's config:

javascript
{
  agents: {
    defaults: {
      model: { primary: "auraroute/agent" },
    },
  },
  models: {
    mode: "merge",
    providers: {
      auraroute: {
        baseUrl: "https://auraroute.dev/api",
        apiKey: "${AURAROUTE_API_KEY}",
        api: "openai-completions",
        models: [{ id: "agent", name: "AuraRoute agent" }],
      },
    },
  },
}

4. Check the key

bash
curl -fsS https://auraroute.dev/api/models \
  -H "Authorization: Bearer $AURAROUTE_API_KEY"

One script

Linux, macOS, or WSL2. It installs the CLI, runs onboarding against AuraRoute, and checks the key. The key is read from AURAROUTE_API_KEY or from a silent prompt, and it is not printed.

bash
#!/usr/bin/env bash
# Install OpenClaw and point it at AuraRoute.
# Linux, macOS, or WSL2. Needs curl.
set -euo pipefail

BASE_URL="https://auraroute.dev/api"

if [[ -z "${AURAROUTE_API_KEY:-}" ]]; then
  printf 'AuraRoute API key (az_live_…): '
  read -r -s AURAROUTE_API_KEY
  printf '\n'
fi

case "$AURAROUTE_API_KEY" in
  az_live_*) ;;
  *) echo "That key should start with az_live_." >&2; exit 1 ;;
esac

echo "Installing OpenClaw…"
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash

openclaw="$HOME/.openclaw/bin/openclaw"
if [[ ! -x "$openclaw" ]]; then
  echo "Expected $openclaw. Check the installer output for the binary path." >&2
  exit 1
fi

# The key stays in the environment. OpenClaw reads CUSTOM_API_KEY when --custom-api-key is omitted.
export CUSTOM_API_KEY="$AURAROUTE_API_KEY"
"$openclaw" onboard --non-interactive --accept-risk --skip-health \
  --mode local \
  --auth-choice custom-api-key \
  --custom-base-url "$BASE_URL" \
  --custom-model-id agent \
  --custom-provider-id auraroute \
  --custom-compatibility openai \
  --gateway-bind loopback

echo "Checking the key…"
curl -fsS "$BASE_URL/models" -H "Authorization: Bearer $AURAROUTE_API_KEY" >/dev/null

echo "OpenClaw is ready. Its default model is auraroute/agent."