Tools & IDE

OpenClaw Configuration

OpenClaw is an AI agent framework that lets you create and manage AI agents with high customizability. This guide covers configuring OpenClaw to use the ShopAIKey API.

Primary Endpoints

  • OpenAI-compatible: https://api.shopaikey.com/v1
  • Anthropic-compatible: https://api.shopaikey.com
  • Google GenAI: https://api.shopaikey.com

Configuration File Structure

The OpenClaw configuration file uses JSON format with the following main sections:

1. Meta & Wizard

code
{
  "meta": {
    "lastTouchedVersion": "2026.3.13",
    "lastTouchedAt": "2026-03-17T13:15:30.244Z"
  },
  "wizard": {
    "lastRunAt": "2026-03-17T12:46:52.879Z",
    "lastRunVersion": "2026.3.13",
    "lastRunCommand": "onboard",
    "lastRunMode": "local"
  }
}

This section stores version information and wizard run history.

2. Models - AI Provider Configuration

You can declare multiple providers all pointing to ShopAIKey with different API types (OpenAI-compatible, Anthropic, Google GenAI). Each provider contains the list of models you want to use.

code
{
  "models": {
    "mode": "merge",
    "providers": {
      "shopaikey": {
        "baseUrl": "https://api.shopaikey.com/v1",
        "apiKey": "sk-xxx",
        "api": "openai-completions",
        "models": [
          {
            "id": "gpt-5",
            "name": "GPT-5 (ShopAIKey)",
            "api": "openai-completions",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 400000,
            "maxTokens": 16384
          },
          {
            "id": "gpt-5-mini",
            "name": "GPT-5 Mini (ShopAIKey)",
            "api": "openai-completions",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 400000,
            "maxTokens": 16384
          },
          {
            "id": "claude-opus-4-5",
            "name": "Claude Opus 4.5 (ShopAIKey)",
            "api": "openai-completions",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 200000,
            "maxTokens": 32000
          },
          {
            "id": "claude-sonnet-4-5",
            "name": "Claude Sonnet 4.5 (ShopAIKey)",
            "api": "openai-completions",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 200000,
            "maxTokens": 64000
          },
          {
            "id": "claude-haiku-4-5",
            "name": "Claude Haiku 4.5 (ShopAIKey)",
            "api": "openai-completions",
            "reasoning": false,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 200000,
            "maxTokens": 8192
          },
          {
            "id": "deepseek-v3.2",
            "name": "DeepSeek V3.2 (ShopAIKey)",
            "api": "openai-completions",
            "reasoning": false,
            "input": ["text"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 128000,
            "maxTokens": 8192
          },
          {
            "id": "qwen3-coder-plus",
            "name": "Qwen3 Coder Plus (ShopAIKey)",
            "api": "openai-completions",
            "reasoning": false,
            "input": ["text"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 128000,
            "maxTokens": 8192
          }
        ]
      },
      "shopaikey-anthropic": {
        "baseUrl": "https://api.shopaikey.com",
        "apiKey": "sk-xxx",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "claude-opus-4-5",
            "name": "Claude Opus 4.5 (Anthropic native)",
            "api": "anthropic-messages",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 200000,
            "maxTokens": 32000
          },
          {
            "id": "claude-sonnet-4-5",
            "name": "Claude Sonnet 4.5 (Anthropic native)",
            "api": "anthropic-messages",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 200000,
            "maxTokens": 64000
          }
        ]
      },
      "shopaikey-gemini": {
        "baseUrl": "https://api.shopaikey.com",
        "apiKey": "sk-xxx",
        "api": "google-generative-ai",
        "models": [
          {
            "id": "gemini-3-pro-preview",
            "name": "Gemini 3 Pro (ShopAIKey)",
            "api": "google-generative-ai",
            "reasoning": true,
            "input": ["text", "image", "video", "audio"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 1000000,
            "maxTokens": 8192
          },
          {
            "id": "gemini-3-flash-preview",
            "name": "Gemini 3 Flash (ShopAIKey)",
            "api": "google-generative-ai",
            "reasoning": false,
            "input": ["text", "image", "video", "audio"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 1000000,
            "maxTokens": 8192
          }
        ]
      }
    }
  }
}

Key fields:

  • mode: Provider merge mode ("merge")
  • baseUrl: ShopAIKey API URL — use /v1 for openai-completions, no /v1 for anthropic-messages and google-generative-ai
  • apiKey: Your ShopAIKey API key (the same key works for all 3 API types)
  • api: API type
    • "openai-completions": Supports OpenAI-compatible models via OpenAI format
    • "anthropic-messages": Native Anthropic format, full extended thinking and prompt caching support
    • "google-generative-ai": Native Gemini format
  • models: List of available models
    • id: Model ID (must match the model name in Model Pricing)
    • contextWindow: Maximum context tokens
    • maxTokens: Maximum response tokens
    • reasoning: Whether the model supports reasoning / extended thinking
    • input: Input types the model supports ("text", "image", "video", "audio")

Tip: for Claude, using the "anthropic-messages" provider gives full access to extended thinking and prompt caching. The "openai-completions" provider with Claude models still works but some advanced features may be limited.

3. Agents - AI Agent Configuration

code
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "shopaikey-anthropic/claude-sonnet-4-5"
      },
      "models": {
        "shopaikey/gpt-5": { "alias": "gpt" },
        "shopaikey/gpt-5-mini": { "alias": "gpt-mini" },
        "shopaikey-anthropic/claude-opus-4-5": { "alias": "opus" },
        "shopaikey-anthropic/claude-sonnet-4-5": { "alias": "sonnet" },
        "shopaikey/claude-haiku-4-5": { "alias": "haiku" },
        "shopaikey-gemini/gemini-3-pro-preview": { "alias": "gemini" },
        "shopaikey-gemini/gemini-3-flash-preview": { "alias": "gemini-fast" },
        "shopaikey/deepseek-v3.2": { "alias": "deepseek" },
        "shopaikey/qwen3-coder-plus": { "alias": "qwen-coder" }
      },
      "workspace": "/Users/username/.openclaw/workspace"
    },
    "list": [
      { "id": "main", "model": "shopaikey-anthropic/claude-sonnet-4-5" },
      { "id": "fast", "model": "shopaikey-gemini/gemini-3-flash-preview" },
      { "id": "coder", "model": "shopaikey/qwen3-coder-plus" }
    ]
  }
}

Agent configuration:

  • defaults.model.primary: Default model when calling an agent
  • defaults.models: Aliases for short names (e.g., @gpt, @sonnet, @gemini) instead of typing the full provider/model
  • defaults.workspace: Agent working directory
  • list: List of specific agents, each can use a different model based on purpose

4. Tools & Commands

code
{
  "tools": {
    "profile": "coding"
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto",
    "restart": true,
    "ownerDisplay": "raw"
  }
}
  • tools.profile: Tool profile ("coding" for development)
  • commands: System command configuration

5. Gateway - Server Configuration

code
{
  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": "your-secure-token",
      "password": "your-secure-password"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    },
    "nodes": {
      "denyCommands": [
        "camera.snap",
        "camera.clip",
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send"
      ]
    }
  }
}

Gateway configuration:

  • port: Server port (default 18789)
  • mode: Run mode ("local" or "remote")
  • bind: Bind address ("loopback" for localhost only)
  • auth: Authentication with token/password
  • nodes.denyCommands: List of denied commands

Complete Configuration Example

code
{
  "meta": {
    "lastTouchedVersion": "2026.3.13",
    "lastTouchedAt": "2026-03-17T13:15:30.244Z"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "shopaikey": {
        "baseUrl": "https://api.shopaikey.com/v1",
        "apiKey": "sk-xxx",
        "api": "openai-completions",
        "models": [
          {
            "id": "gpt-5",
            "name": "GPT-5",
            "api": "openai-completions",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 400000,
            "maxTokens": 16384
          },
          {
            "id": "deepseek-v3.2",
            "name": "DeepSeek V3.2",
            "api": "openai-completions",
            "reasoning": false,
            "input": ["text"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 128000,
            "maxTokens": 8192
          }
        ]
      },
      "shopaikey-anthropic": {
        "baseUrl": "https://api.shopaikey.com",
        "apiKey": "sk-xxx",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "claude-sonnet-4-5",
            "name": "Claude Sonnet 4.5",
            "api": "anthropic-messages",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 200000,
            "maxTokens": 64000
          }
        ]
      },
      "shopaikey-gemini": {
        "baseUrl": "https://api.shopaikey.com",
        "apiKey": "sk-xxx",
        "api": "google-generative-ai",
        "models": [
          {
            "id": "gemini-3-pro-preview",
            "name": "Gemini 3 Pro",
            "api": "google-generative-ai",
            "reasoning": true,
            "input": ["text", "image", "video", "audio"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 1000000,
            "maxTokens": 8192
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "shopaikey-anthropic/claude-sonnet-4-5" },
      "models": {
        "shopaikey/gpt-5": { "alias": "gpt" },
        "shopaikey-anthropic/claude-sonnet-4-5": { "alias": "sonnet" },
        "shopaikey-gemini/gemini-3-pro-preview": { "alias": "gemini" }
      },
      "workspace": "/Users/username/.openclaw/workspace"
    },
    "list": [
      { "id": "main", "model": "shopaikey-anthropic/claude-sonnet-4-5" }
    ]
  },
  "tools": { "profile": "coding" },
  "gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": "your-secure-token",
      "password": "your-secure-password"
    }
  }
}

Usage Guide

  1. Create config file: Create openclaw.json with the content above
  2. Configure API keys: Replace sk-xxx with your actual API key (obtained from your ShopAIKey account)
  3. Select models: Keep only the models you actually use to keep the config tidy. Refer to the full list at Model Pricing
  4. Security: Change the default gateway token and password before running
  5. Launch: Run OpenClaw with this configuration file

Security Notes

  • Do not commit API keys to git — use environment variables or .gitignore
  • Use strong tokens/passwords for the gateway
  • Consider using mode: "local" if only running on a personal machine
  • Review denyCommands to restrict agent access
  • When sharing config via Tailscale or remote, ensure bind is not "0.0.0.0" unless absolutely necessary

Support