OpenClaw

Prerequisites

ItemValue
OpenClaw version2026.6.11
Config file~/.openclaw/openclaw.json
Provider idjoytoken
Model namejoytoken/auto
JoyToken Base URLJOY_TOKEN_OPENAI_BASE_URL from Environments
API key envJOY_TOKEN_API_KEY

Step 1: Install

$npm install -g openclaw@2026.6.11
$openclaw --version

Step 2: Write the API key

$export JOY_TOKEN_API_KEY="jt_xxx"
$export JOY_TOKEN_OPENAI_BASE_URL="https://api-dev.joytokens.ai/openai/v1"

For persistent use, add it to ~/.zshrc:

Persist JOY_TOKEN_API_KEY in ~/.zshrc
$JOY_TOKEN_API_KEY="jt_xxx"
$touch ~/.zshrc
$if grep -q '^export JOY_TOKEN_API_KEY=' ~/.zshrc; then
$ sed -i.bak "s|^export JOY_TOKEN_API_KEY=.*|export JOY_TOKEN_API_KEY=\"${JOY_TOKEN_API_KEY}\"|" ~/.zshrc
$else
$ printf '\nexport JOY_TOKEN_API_KEY="%s"\n' "$JOY_TOKEN_API_KEY" >> ~/.zshrc
$fi
$export JOY_TOKEN_API_KEY

Step 3: Register provider

$openclaw onboard \
> --non-interactive \
> --accept-risk \
> --auth-choice custom-api-key \
> --custom-provider-id joytoken \
> --custom-base-url "$JOY_TOKEN_OPENAI_BASE_URL" \
> --custom-compatibility openai \
> --custom-model-id auto \
> --custom-api-key "$JOY_TOKEN_API_KEY" \
> --skip-channels \
> --skip-daemon \
> --skip-skills \
> --skip-search \
> --skip-ui \
> --skip-health

Step 4: Confirm config

$cat ~/.openclaw/openclaw.json

The config should include the concrete value from JOY_TOKEN_OPENAI_BASE_URL:

~/.openclaw/openclaw.json
1{
2 "models": {
3 "providers": {
4 "joytoken": {
5 "baseUrl": "<JOY_TOKEN_OPENAI_BASE_URL>",
6 "api": "openai-completions"
7 }
8 }
9 },
10 "agents": {
11 "defaults": {
12 "model": {
13 "primary": "joytoken/auto"
14 }
15 }
16 }
17}

Step 5: Verify

$openclaw models status

Expected output includes:

joytoken/auto

Run one request:

$openclaw infer model run \
> --local \
> --model joytoken/auto \
> --prompt "Reply with exactly: pong" \
> --json

A successful response includes pong.

JoyToken Check

PlaceExpected result
LogsRequest path is /openai/v1/chat/completions
API keyRequest is attributed to the key used by OpenClaw
UsageTokens and credits are recorded
ModelRequested model is auto

Common Errors

ErrorFix
custom-api-key argument is missingInstall openclaw@2026.6.11
Default model is not joytoken/autoRun openclaw onboard again
401 UnauthorizedSet JOY_TOKEN_API_KEY again
No JoyToken logsCheck baseUrl and default model in ~/.openclaw/openclaw.json

Resources