HomeTokenhotAPI DocumentTools
language
language
  • 中文
  • English
HomeTokenhotAPI DocumentTools
language
language
  • 中文
  • English
  1. Tools
  • navigation
  • OpenClaw
  • hermes
  • Gemini CLI
  • OpenCode
  • Cherry Studio
  • CC-Switch
  • Claude
    • Overview
    • Install Claude Code
    • Configure Model Providers
    • CCometixLine Status Bar Plugin
    • Skills Configuration
  • Codex
    • Codex CLI Installation
    • Configure Model Providers
  1. Tools

OpenClaw

OpenClaw 🦞#

OpenClaw is an open-source, local AI assistant that interacts with you through messaging apps like WhatsApp, Telegram, and Slack, and can perform real actions — managing emails, calendars, flight check-ins, web browsing, and more. It runs entirely locally, so your data never leaves your device.

Why Pair with Tokenhot?#

Universal Interface, One-Click Access — Say goodbye to complex multi-platform integration; a single interface meets all model calling needs.
Scenario-Based Model Combinations — Freely configure Agent routing with primary, reasoning, and lightweight models each playing their role to unlock maximum performance.
Extremely Stable Connectivity — 99.9% availability SLA with automatic failover switching, letting you focus on code rather than operations.
Transparent Billing Management — Unified management of model consumption across all platforms, with real-time observation and analytics to eliminate billing anxiety.
As an Agentic AI assistant, OpenClaw's per-task token consumption can be significant (typically 10K-100K+ tokens). It is recommended to select a model based on task complexity to avoid unnecessary costs. This document provides several configuration options for reference.

Installation#

macOS/Linux
Windows
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1)))

Quick Start#

1. Get an API Key#

Go to the Tokenhot Console to create an API Key.

2. Run the Configuration Wizard#

OpenClaw provides an interactive wizard — enter the following command to quickly complete configuration:
Select Custom Provider in the wizard and fill in the following information:
Configuration ItemValue
Provider Typeanthropic-messages
Base URLhttps://api.tokenhot.ai
API KeyTokenhot API Key
Modelclaude-sonnet-4.6

3. Start & Verify#

Send a message to OpenClaw to test connectivity. If you receive a normal response, the configuration is successful.

Full Configuration#

OpenClaw manages all configuration through ~/.openclaw/openclaw.json (supports JSON5 format, comments allowed).

Provider Configuration#

Providers are defined under models.providers. Each provider needs to specify the API protocol type, address, and key:
{
  "models": {
    "providers": {
      "Tokenhot-anthropic": {
        "baseUrl": "https://api.tokenhot.ai",
        "apiKey": "${TOKENHOT_API_KEY}",
        "api": "anthropic-messages",
        "models": []
      },
      "Tokenhot-openai": {
        "baseUrl": "https://api.tokenhot.ai/v1",
        "apiKey": "${TOKENHOT_API_KEY}",
        "api": "openai-responses",
        "models": []
      },
      "Tokenhot-gemini": {
        "baseUrl": "https://api.tokenhot.ai",
        "apiKey": "${TOKENHOT_API_KEY}",
        "api": "google-generative-ai",
        "models": []
      }
    }
  }
}

Models Configuration#

Models are defined in the models array under their corresponding provider. We offer three configurations — choose based on your needs:
All-Claude Lineup — Pursuing maximum capability, suitable for demanding scenarios.
{
  "models": {
    "providers": {
      "Tokenhot-anthropic": {
        "baseUrl": "https://api.tokenhot.ai/anthropic",
        "apiKey": "${TOKENHOT_API_KEY}",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "claude-sonnet-4.6",
            "name": "Claude Sonnet 4.6",
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 64000
          },
          {
            "id": "claude-opus-4.6",
            "name": "Claude Opus 4.6",
            "reasoning": true,
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 128000
          },
          {
            "id": "claude-haiku-4.5",
            "name": "Claude Haiku 4.5",
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 64000
          }
        ]
      }
    }
  }
}
ModelRoleSuitable Scenarios
claude-opus-4.6⭐ Flagship ReasoningComplex research, multi-step reasoning, deep analysis
claude-sonnet-4.6🎯 Primary WorkhorseCoding, everyday tasks, balanced performance
claude-haiku-4.5⚡ Fast & LightweightSimple Q&A, fast responses, low-cost tasks
Anthropic + OpenAI Combo — Claude as primary + OpenAI as secondary for scenario-based switching (e.g., GPT-5.2).
{
  "models": {
    "providers": {
      "Tokenhot-anthropic": {
        "baseUrl": "https://api.tokenhot.ai",
        "apiKey": "${TOKENHOT_API_KEY}",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "claude-sonnet-4.6",
            "name": "Claude Sonnet 4.5",
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 64000
          },
          {
            "id": "claude-opus-4.6",
            "name": "Claude Opus 4.6",
            "reasoning": true,
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 128000
          },
          {
            "id": "claude-haiku-4.5",
            "name": "Claude Haiku 4.5",
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 64000
          }
        ]
      },
      "Tokenhot-openai": {
        "baseUrl": "https://api.tokenhot.ai/v1",
        "apiKey": "${TOKENHOT_API_KEY}",
        "api": "openai-responses",
        "models": [
          {
            "id": "gpt-5.2",
            "name": "GPT-5.2",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 128000,
            "maxTokens": 16384
          }
        ]
      }
    }
  }
}
ModelRoleSuitable Scenarios
claude-opus-4.6⭐ Flagship ReasoningComplex research, multi-step reasoning, deep analysis
claude-sonnet-4.6🎯 Primary WorkhorseCoding, everyday tasks, balanced performance
claude-haiku-4.5⚡ Fast & LightweightSimple Q&A, fast responses, low-cost tasks
gpt-5.2🔄 Scenario SwitchingMulti-model collaboration, A/B testing
Anthropic + Gemini Combo — Claude as primary + Gemini for speed, suitable for cost-sensitive scenarios.
{
  "models": {
    "providers": {
      "Tokenhot-anthropic": {
        "baseUrl": "https://api.tokenhot.ai",
        "apiKey": "${TOKENHOT_API_KEY}",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "claude-sonnet-4.6",
            "name": "Claude Sonnet 4.6",
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 64000
          },
          {
            "id": "claude-haiku-4.5",
            "name": "Claude Haiku 4.5",
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 64000
          }
        ]
      },
      "Tokenhot-gemini": {
        "baseUrl": "https://api.tokenhot.ai",
        "apiKey": "${TOKENHOT_API_KEY}",
        "api": "google-generative-ai",
        "models": [
          {
            "id": "gemini-2.5-flash",
            "name": "Gemini 2.5 Flash",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 1000000,
            "maxTokens": 64000
          },
          {
            "id": "gemini-2.5-pro",
            "name": "Gemini 2.5 Pro",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 1000000,
            "maxTokens": 64000
          }
        ]
      }
    }
  }
}
ModelRoleSuitable Scenarios
claude-sonnet-4.6🎯 Primary WorkhorseCoding, everyday tasks, balanced performance
claude-haiku-4.5⚡ Fast & LightweightSimple Q&A, fast responses, low-cost tasks
gemini-2.5-flash🚀 High-Speed EngineMillion-token context, high-throughput tasks
gemini-2.5-pro🧠 Deep ThinkingMillion-token context, complex reasoning

Agents Configuration#

Agents define model routing rules. You can set default models and create multiple Agents for different tasks:
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "claude-sonnet-4.6",
        "fallbacks": ["claude-haiku-4.5"]
      },
      "models": {
        "claude-opus-4.6": { "alias": "opus" },
        "claude-sonnet-4.6": { "alias": "sonnet" },
        "claude-haiku-4.5": { "alias": "haiku" }
      },
      "thinkingDefault": "low",
      "timeoutSeconds": 600,
      "maxConcurrent": 3
    },
    "list": [
      {
        "id": "main",
        "default": true
      },
      {
        "id": "research",
        "model": {
          "primary": "claude-opus-4.6"
        }
      },
      {
        "id": "quick",
        "model": {
          "primary": "claude-haiku-4.5"
        }
      }
    ]
  }
}
AgentModelPurpose
mainclaude-sonnet-4.6 (inherits defaults)Default Agent, all daily tasks
researchclaude-opus-4.6Deep research, complex reasoning, long-form analysis
quickclaude-haiku-4.5Simple Q&A, fast responses, low cost

Complete Configuration Example#

Below is a complete openclaw.json that integrates Provider, Models, and Agents configuration (maximum-performance setup):
{
  "models": {
    "providers": {
      "Tokenhot-anthropic": {
        "baseUrl": "https://api.tokenhot.ai,
        "apiKey": "${Tokenhot_API_KEY}",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "claude-sonnet-4.6",
            "name": "Claude Sonnet 4.5",
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 64000
          },
          {
            "id": "claude-opus-4.6",
            "name": "Claude Opus 4.6",
            "reasoning": true,
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 128000
          },
          {
            "id": "claude-haiku-4.5",
            "name": "Claude Haiku 4.5",
            "input": ["text", "image", "file"],
            "contextWindow": 200000,
            "maxTokens": 64000
          }
        ]
      },
      "Tokenhot-gemini": {
        "baseUrl": "https://api.tokenhot.ai",
        "apiKey": "${Tokenhot_API_KEY}",
        "api": "google-generative-ai",
        "models": [
          {
            "id": "gemini-2.5-flash",
            "name": "Gemini 2.5 Flash",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 1000000,
            "maxTokens": 64000
          },
          {
            "id": "gemini-2.5-pro",
            "name": "Gemini 2.5 Pro",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 1000000,
            "maxTokens": 64000
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "claude-sonnet-4.6",
        "fallbacks": ["claude-haiku-4.5"]
      },
      "models": {
        "claude-opus-4.6": { "alias": "opus" },
        "claude-sonnet-4.6": { "alias": "sonnet" },
        "claude-haiku-4.5": { "alias": "haiku" }
      },
      "thinkingDefault": "low",
      "timeoutSeconds": 600,
      "maxConcurrent": 3
    },
    "list": [
      {
        "id": "main",
        "default": true
      },
      {
        "id": "research",
        "model": {
          "primary": "claude-opus-4.6"
        }
      },
      {
        "id": "quick",
        "model": {
          "primary": "claude-haiku-4.5"
        }
      }
    ]
  }
}

Usage Scenarios#

Once configured, send commands to OpenClaw through messaging apps:
Email Management — "Sort today's unread emails by priority"
Schedule Planning — "Schedule a team meeting tomorrow at 3 PM"
Information Retrieval — "Search for recent technical articles on AI Agents and summarize the key points"
Code Assistance — "Review this Python code snippet and check for security issues"
Workflow Automation — "Send the daily team report to the #general channel on Slack every morning at 9 AM"

Troubleshooting#

Unable to Connect to Tokenhot
Verify that baseUrl is configured correctly:
Anthropic protocol: https://api.tokenhot.ai
OpenAI-Response protocol: https://api.tokenhot.ai/v1
Gemini protocol: https://api.tokenhot.ai
Model Not Found
Confirm the model ID format is correct. When defining models under models.providers, use Tokenhot's full model name as the id (e.g., claude-sonnet-4.6).
Token Consumption Too High
OpenClaw tasks consume significant tokens. We recommend:
1.
Use claude-haiku-4.5 or other models for daily tasks
2.
Only switch to the research Agent (using claude-opus-4.7) for complex tasks
3.
Monitor usage in the Tokenhot Console
How to Quickly Switch Models
Switch using aliases in conversation: /model opus, /model sonnet, /model haiku (aliases must be configured in agents.defaults.models).
Modified at 2026-05-29 09:52:54
Previous
navigation
Next
hermes
Built with