Skip to content

OpenClaw

Configure HeyEly as a custom provider inside OpenClaw's JSON5 config and Gateway environment.

OpenClaw loads custom providers from ~/.openclaw/openclaw.json (JSON5), where each provider declares its wire protocol and base URL. The configuration below routes OpenClaw to HeyEly over Chat Completions at https://heyely.si/v1.

Set up

  1. Generate an API key in Developers.
  2. Store your key inside ~/.openclaw/.env. Because OpenClaw's Gateway runs as a background service, variables exported only in your interactive shell may never reach it.
HEYELY_API_KEY=sk-df-...
  1. Register the HeyEly provider and default model inside ~/.openclaw/openclaw.json.
{
  agents: {
    defaults: {
      model: { primary: "heyely/anthropic/claude-sonnet-5.5" },
      models: {
        "heyely/anthropic/claude-sonnet-5.5": { alias: "Sonnet" },
      },
    },
  },
  models: {
    mode: "merge",
    providers: {
      heyely: {
        baseUrl: "https://heyely.si/v1",
        apiKey: "${HEYELY_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "anthropic/claude-sonnet-5.5",
            name: "Claude Sonnet 5.5",
            reasoning: true,
            input: ["text", "image", "file"],
            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
            contextWindow: 1000000,
            maxTokens: 128000,
          },
        ],
      },
    },
  },
}

OpenClaw hot-reloads provider edits automatically. If the new provider does not take effect immediately, run openclaw gateway restart.

Make sure every model you plan to call has a full entry inside models; creating an alias under agents.defaults.models alone does not register it. Leave cost fields set to zero because HeyEly's Credit and usage dashboard tracks actual billing.

Verify

  1. Run openclaw models list --provider heyely to confirm your configured model is registered.
  2. Run openclaw models status --probe to execute a live probe and verify it prints ok (otherwise it flags categories like auth, billing, or timeout).
  3. Send a quick message to your agent.
  4. Open Credit and usage to confirm the call sits at the top of Spend under your selected model.

Pick a model

  • OpenClaw references models as provider/model-id and splits on the first slash, so heyely/anthropic/claude-sonnet-5.5 maps to provider heyely and catalog ID anthropic/claude-sonnet-5.5.
  • Lock in a model with openclaw models set heyely/anthropic/claude-sonnet-5.5, or switch inside chat with /model heyely/anthropic/claude-sonnet-5.5.
  • Supported api values are openai-completions (default), openai-responses, and anthropic-messages. When using anthropic-messages, set baseUrl to https://heyely.si (OpenClaw appends /v1). Custom hosts disable implicit beta headers, so pass headers: { "anthropic-beta": "..." } if a model requires them.
  • Increase timeoutSeconds on the provider block when calling slower reasoning models.

Troubleshooting

You seeCauseFix
401 invalid_api_keyBackground Gateway did not load HEYELY_API_KEYSave it in ~/.openclaw/.env and restart the Gateway
Model missing from listOnly added as an alias without a provider models entryAdd a full entry under models.providers.heyely.models
Model refuses to switchInvalid JSON5 caused OpenClaw to keep the last valid configRun openclaw doctor, repair the config, and recheck
404 model_not_foundid does not match HeyEly's catalogCopy the exact ID from the Models page
402 insufficient_creditNo credit remaining on the accountAdd credit
402 free_credit_not_eligibleAccount holds only free credit and this model or request does not qualifyChoose an eligible open-weight text model, lower max_tokens, or add credit
402 key_limit_reachedThis API key hit its dollar capRaise the cap in Developers or swap keys