Skip to main content

OpenClaw

Connect OpenClaw to the Bankr LLM Gateway.

Pick Your Setup Path

Have OpenClawNeed OpenClaw
Have Bankr2 min setup ↓5 min setup ↓
Need Bankr5 min setup ↓10 min setup ↓

Have OpenClaw + Have Bankr

Ask your agent

If you have the Bankr skill installed, just tell your agent: "set up the Bankr LLM gateway" — it can handle the rest.

  1. Install the Bankr CLI:

    npm install -g @bankr/cli
  2. Get an API key with LLM Gateway enabled:

    • Have a key? Enable LLM Gateway on it at bankr.bot/api.
    • Need a key? Generate one via CLI:
      bankr login email user@example.com
      bankr login email user@example.com --code OTP --accept-terms --key-name "My Agent" --llm # enables LLM Gateway
  3. Run the setup command:

    bankr llm setup openclaw --install
  4. Set your default model in ~/.openclaw/openclaw.json:

    {
    agents: {
    defaults: {
    model: {
    primary: "bankr/claude-sonnet-4.6"
    }
    }
    }
    }

    Pick any model from bankr llm models — prefix with bankr/ in OpenClaw config.

  5. Verify your credits:

    bankr llm credits

    Must show > $0. If not, top up via bankr llm credits add 25 or at bankr.bot/llm.

  6. Restart OpenClaw (or run openclaw gateway restart).

  7. Install the Bankr skill — give your agent crypto and DeFi capabilities.

Need OpenClaw + Have Bankr

  1. Install the Bankr CLI:

    npm install -g @bankr/cli
  2. Get an API key with LLM Gateway enabled:

    • Have a key? Enable LLM Gateway on it at bankr.bot/api.
    • Need a key? Generate one via CLI:
      bankr login email user@example.com
      bankr login email user@example.com --code OTP --accept-terms --key-name "My Agent" --llm # enables LLM Gateway
  3. Install OpenClaw and onboard with your Bankr credentials:

    openclaw onboard --non-interactive \
    --auth-choice custom-api-key \
    --custom-base-url "https://llm.bankr.bot" \
    --custom-model-id "claude-sonnet-4.6" \
    --custom-api-key "$BANKR_LLM_KEY" \
    --custom-compatibility anthropic
  4. Run the Bankr setup (adds all available models):

    bankr llm setup openclaw --install
  5. Set your default model in ~/.openclaw/openclaw.json (see Have OpenClaw + Have Bankr).

  6. Verify your credits:

    bankr llm credits
  7. Hatch your agent.

  8. Install the Bankr skill — give your agent crypto and DeFi capabilities.

Have OpenClaw + Need Bankr

Ask your agent

Have the Bankr skill installed? Tell your agent: "help me create a Bankr account and set up the LLM gateway" — it can guide you through login, credits, and config.

Fund credits BEFORE your first LLM call

New wallets start with $0 LLM credits. Any LLM call will return a 402 error until you add credits.

  1. Install the Bankr CLI:

    npm install -g @bankr/cli
  2. Send verification code:

    bankr login email user@example.com
  3. Complete setup (replace OTP with the code from your email):

    bankr login email user@example.com --code OTP --accept-terms --key-name "My Agent" --llm  # enables LLM Gateway

    You can also create and configure API keys at bankr.bot/api.

  4. Top up LLM credits at bankr.bot/llm?tab=credits — do this before anything else.

  5. Verify your balance:

    bankr llm credits
  6. Install the Bankr provider into OpenClaw:

    bankr llm setup openclaw --install
  7. Set your default model in ~/.openclaw/openclaw.json (see Have OpenClaw + Have Bankr).

  8. Restart OpenClaw (or run openclaw gateway restart).

  9. Install the Bankr skill — give your agent crypto and DeFi capabilities.

Need OpenClaw + Need Bankr

Starting from zero — most steps

Top up credits BEFORE touching OpenClaw, or you will hit a 402 with no explanation.

  1. Install the Bankr CLI:

    npm install -g @bankr/cli
  2. Send verification code:

    bankr login email user@example.com
  3. Complete setup:

    bankr login email user@example.com --code OTP --accept-terms --key-name "My Agent" --llm  # enables LLM Gateway

    You can also create and configure API keys at bankr.bot/api.

  4. Top up LLM credits at bankr.bot/llm?tab=credits — do this BEFORE installing OpenClaw.

  5. Verify your balance:

    bankr llm credits

    Should show > $0.

  6. Install OpenClaw and onboard with your Bankr credentials:

    openclaw onboard --non-interactive \
    --auth-choice custom-api-key \
    --custom-base-url "https://llm.bankr.bot" \
    --custom-model-id "claude-sonnet-4.6" \
    --custom-api-key "$BANKR_LLM_KEY" \
    --custom-compatibility anthropic
  7. Add all available models:

    bankr llm setup openclaw --install
  8. Set your default model in ~/.openclaw/openclaw.json (see Have OpenClaw + Have Bankr).

  9. Hatch your agent.

  10. Install the Bankr skill — give your agent crypto and DeFi capabilities.


LLM Credits ≠ Trading Wallet

Your Bankr account has two separate balances:

  • Trading wallet — on-chain crypto (ETH, SOL, USDC) for swaps, transfers, and token launches. Check with bankr wallet portfolio.
  • LLM credits — USD balance for LLM Gateway API calls. Check with bankr llm credits. Top up at bankr.bot/llm.

Same account, same API key, completely separate balances. New accounts start with $0 LLM credits.

Advanced

Separate LLM and Agent API Keys

By default, one API key is used for both LLM Gateway and Agent API. If you need separate keys (different permissions, rate limits, or billing):

# Set a dedicated LLM key after login
bankr config set llmKey YOUR_LLM_KEY

# Or pass it during login
bankr login email user@example.com --llm-key YOUR_LLM_KEY

The CLI resolves your LLM key in this order: BANKR_LLM_KEY env var → llmKey in ~/.bankr/config.json → falls back to your main API key.

Key Permissions

Manage key permissions at bankr.bot/api:

ToggleControls
LLM GatewayAccess to llm.bankr.bot for model requests
Agent APIAccess to wallet actions, prompts, and transactions
Read OnlyAgent API only — restricts to read operations (balances, portfolio)

A key used only for LLM Gateway doesn't need Agent API enabled, and vice versa.

Manual Configuration

Prefer the CLI

bankr llm setup openclaw --install generates the full config automatically with all models, pricing, and context limits. Manual configuration is only needed if you want to customize individual model entries.

To manually add or override a single model, merge into your openclaw.json:

{
models: {
mode: "merge",
providers: {
bankr: {
baseUrl: "https://llm.bankr.bot",
apiKey: "${BANKR_LLM_KEY}",
api: "openai-completions",

models: [
{ id: "claude-opus-4.6", name: "Claude Opus 4.6", contextWindow: 1000000, maxTokens: 128000, api: "anthropic-messages", cost: { input: 15.0, output: 75.0, cacheRead: 1.5, cacheWrite: 18.75 } },
{ id: "gpt-5.4", name: "GPT-5.4", contextWindow: 1050000, maxTokens: 128000, cost: { input: 2.5, output: 15.0, cacheRead: 0.25, cacheWrite: 2.5 } },
{ id: "gemini-3-pro", name: "Gemini 3 Pro", contextWindow: 1048576, maxTokens: 65536, cost: { input: 1.25, output: 10.0, cacheRead: 0.3125, cacheWrite: 1.25 } }
// Run `bankr llm models` for the full list
]
}
}
}
}

Set as Default Model

{
agents: {
defaults: {
model: {
primary: "bankr/claude-opus-4.6"
}
}
}
}

Per-Model API Format

The provider-level api: "openai-completions" is the default for all models. Claude models override this with api: "anthropic-messages" at the model level, so OpenClaw automatically uses the right API format for each model. This is handled automatically by bankr llm setup openclaw.

Model Properties Reference

PropertyDescription
idModel identifier used in requests
nameDisplay name in OpenClaw UI
inputSupported input types: ["text"] or ["text", "image"]
contextWindowMax input tokens
maxTokensMax output tokens
cost.inputUSD per million input tokens
cost.outputUSD per million output tokens
cost.cacheReadUSD per million cache-read tokens
cost.cacheWriteUSD per million cache-write tokens

Testing

curl https://llm.bankr.bot/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $BANKR_LLM_KEY" \
-d '{"model": "gemini-3-flash", "messages": [{"role": "user", "content": "Hello!"}]}'

Troubleshooting

402 Payment Required: Your LLM credits are exhausted or were never funded. Run bankr llm credits to check, and top up at bankr.bot/llm. New accounts start with $0. LLM credits are separate from your trading wallet.

Model not found: Ensure the model id matches exactly what the gateway expects. Use bankr llm models to list available models.

429 Rate Limited: You've exceeded 60 requests/minute. Wait and retry.

FAQ

How do I top up LLM credits? Go to bankr.bot/llm — you can pay with USDC, ETH, BNKR, and other ERC-20s on Base. You can also configure auto top-up to automatically refill when your balance drops below a threshold. Check your balance anytime with bankr llm credits.

My trading wallet has ETH but LLM calls fail. LLM credits and your trading wallet are separate balances. Your wallet balance doesn't automatically fund LLM calls — you need to top up or enable auto top-up at bankr.bot/llm?tab=credits.

How do I skip the provider step in OpenClaw TUI? Use openclaw onboard --non-interactive with your Bankr credentials:

openclaw onboard --non-interactive \
--auth-choice custom-api-key \
--custom-base-url "https://llm.bankr.bot" \
--custom-model-id "claude-sonnet-4.6" \
--custom-api-key "$BANKR_LLM_KEY" \
--custom-compatibility anthropic

See the Need OpenClaw + Have Bankr path for the full walkthrough.

What does pricing look like? Pricing follows the official cost defined by each model provider (Anthropic, Google, OpenAI). There is no markup — you pay the same per-token rates.

Is performance the same as calling providers directly? Besides minimal routing overhead, latency and throughput should match the upstream providers.

What model name format should I use? In OpenClaw config, prefix with bankr/ (e.g. bankr/claude-sonnet-4.6). In direct API calls, use the bare ID (e.g. claude-sonnet-4.6).