OpenClaw
OpenClaw is an open-source personal AI assistant framework that supports multi-platform and multi-channel deployment. You can integrate OpenClaw with MyTokenGate through OpenAI-compatible API.
Features
- Multiple chat channels: Discord, Telegram, WhatsApp, Slack, and more
- Custom model providers and Base URL configuration
- Multi-model switching and failover
- Tool calling and automation support
Configuration
Method 1: OpenAI-Compatible API
Add a custom provider configuration in ~/.openclaw/openclaw.json:
{
models: {
providers: {
"mytokengate": {
baseUrl: "https://gateway.mytokengate.com/v1",
apiKey: "tg-your-api-key",
api: "openai-completions",
models: [
{
id: "claude-opus-4-6",
name: "Claude Opus 4.6",
contextWindow: 200000,
input: ["text", "image"],
},
{
id: "gpt-5.1",
name: "GPT-5.1",
contextWindow: 400000,
input: ["text", "image"],
},
],
},
},
},
agents: {
defaults: {
model: {
primary: "mytokengate/claude-opus-4-6",
},
},
},
}Method 2: Anthropic API
If you prefer using native Anthropic API format:
{
models: {
providers: {
"mytokengate-anthropic": {
baseUrl: "https://gateway.mytokengate.com/v1",
apiKey: "tg-your-api-key",
api: "anthropic-messages",
models: [
{
id: "claude-opus-4-6",
name: "Claude Opus 4.6",
contextWindow: 200000,
input: ["text", "image"],
},
],
},
},
},
agents: {
defaults: {
model: {
primary: "mytokengate-anthropic/claude-opus-4-6",
},
},
},
}Configuration Reference
| Parameter | Description |
|---|---|
baseUrl | MyTokenGate API URL with /v1 suffix |
apiKey | Your MyTokenGate API key |
api | API protocol: openai-completions or anthropic-messages |
models | Available model list |
contextWindow | Model context window size |
CLI Configuration
You can also configure via OpenClaw CLI:
# Add custom provider
openclaw config set models.providers.mytokengate.baseUrl "https://gateway.mytokengate.com/v1"
openclaw config set models.providers.mytokengate.apiKey "tg-your-api-key"
openclaw config set models.providers.mytokengate.api "openai-completions"
# Set default model
openclaw models set mytokengate/claude-opus-4-6Verify Configuration
# List available models
openclaw models list --provider mytokengate
# Test chat
openclaw chatRelated Links
Last updated on