Connect OpenClaw
Run OpenClaw on Gigatoken
OpenClaw is a self-hosted personal AI assistant gateway. It is model-agnostic: any OpenAI-compatible endpoint is a provider. This guide points OpenClaw at Gigatoken so your agent runs on a catalog model served by a provider device, using the same inference key as any other Gigatoken client.
What you'll need
- Docker (Engine or Desktop). These examples use
ghcr.io/openclaw/openclaw:2026.5.28, pinned to the OpenClaw2026.5.28release this guide was verified with. - A Gigatoken inference key. Provider keys are rejected by inference endpoints.
Get an inference key
Generate an inference key from the Inference console API keys page. Gigatoken shows the full key value only once, at generation time. Export it in the shell you run Docker from:
export GIGATOKEN_INFERENCE_KEY="gt_your_inference_key"Use the Responses API mode
Gigatoken implements the OpenResponses API (POST /v1/responses) and does not serve /v1/chat/completions. Configure the Gigatoken provider with api: "openai-responses" so OpenClaw speaks the matching protocol. The default (openai-completions) will return 404 against Gigatoken.
Configure the Gigatoken provider
Create a config directory and write openclaw.json. The apiKey reads the GIGATOKEN_INFERENCE_KEY environment variable you pass into the container, so the secret never lives in the file.
mkdir -p "$HOME/.openclaw-gigatoken"
cat > "$HOME/.openclaw-gigatoken/openclaw.json" <<'JSON'
{
"models": {
"providers": {
"gigatoken": {
"baseUrl": "https://coordinator.gigatoken.baremetallabs.ai/v1",
"apiKey": "${GIGATOKEN_INFERENCE_KEY}",
"api": "openai-responses",
"timeoutSeconds": 300,
"models": [
{
"id": "qwen/qwen3.6-35b-a3b",
"name": "qwen/qwen3.6-35b-a3b (Gigatoken)",
"contextWindow": 256000,
"maxTokens": 8192,
"input": ["text"],
"reasoning": true,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}
]
}
}
},
"agents": {
"defaults": {
"model": { "primary": "gigatoken/qwen/qwen3.6-35b-a3b" }
}
}
}
JSONSet contextWindow to the window Gigatoken actually serves for your model. Each model advertises this at runtime as max_served_context_length in GET /v1/models (the example value 256000 is the highest served tier allowed by qwen/qwen3.6-35b-a3b's catalog context). Treat the live /v1/models response as the source of truth. Setting it to the advertised value gives OpenClaw an accurate budget and leaves ample room for its default reply reserve plus the agent's system prompt.
Run a one-shot inference
Verify the provider end to end with a single model call. This mounts your config directory and forwards the inference key:
docker run --rm \
-e GIGATOKEN_INFERENCE_KEY="$GIGATOKEN_INFERENCE_KEY" \
-e HOME=/home/node \
-e OPENCLAW_CONFIG_PATH=/home/node/.openclaw/openclaw.json \
-v "$HOME/.openclaw-gigatoken:/home/node/.openclaw" \
--entrypoint node ghcr.io/openclaw/openclaw:2026.5.28 \
dist/index.js infer model run --local \
--model "gigatoken/qwen/qwen3.6-35b-a3b" \
--prompt "Reply with exactly one word: pong"A successful run prints provider: gigatoken and the model's reply.
Run an agent turn
Drive the embedded agent (system prompt, tools, and reasoning) with an explicit session key:
docker run --rm \
-e GIGATOKEN_INFERENCE_KEY="$GIGATOKEN_INFERENCE_KEY" \
-e HOME=/home/node \
-e OPENCLAW_CONFIG_PATH=/home/node/.openclaw/openclaw.json \
-v "$HOME/.openclaw-gigatoken:/home/node/.openclaw" \
--entrypoint node ghcr.io/openclaw/openclaw:2026.5.28 \
dist/index.js agent --local --agent main --session-key demo \
--message "What is 17*23? Answer with just the number."For the persistent gateway, channels (WhatsApp, Slack, Telegram, and others), and onboarding, follow OpenClaw's Docker install guide. The same gigatoken provider block applies; mount the config directory into the gateway container at /home/node/.openclaw.
Notes and troubleshooting
- Pick a served model. List what is currently routable with
curl -H "Authorization: Bearer $GIGATOKEN_INFERENCE_KEY" https://coordinator.gigatoken.baremetallabs.ai/v1/models, and set the provider modelidto a live alias. A model is only routable while a provider device is serving it. - "No text output returned." Confirm
apiisopenai-responses, not the default completions mode. - "Already compacted" on the first agent turn. Your
contextWindowis too small for OpenClaw's default 20,000-token reply reserve plus the agent's ~20k-token system prompt. This only happens on small served windows (for example the 32,768 compatibility floor served by older provider daemons). First setcontextWindowto the model's advertisedmax_served_context_length; if that is genuinely small, add"compaction": { "reserveTokens": 6000 }underagents.defaults. - 401 / 403. Use an inference key (
gt_…) from the Inference console; provider keys are not accepted on inference endpoints.