Set up OpenClaw with InferSpeed: GLM-5.3, pay per token

Add an inferspeed provider to ~/.openclaw/openclaw.json and make it the default model, put your key in the INFERSPEED_API_KEY environment variable, then run openclaw doctor to check the config. OpenClaw uses the OpenAI Chat Completions endpoint, and you pay per token.

The config blocks match developers.md (checked 2026-10-19).

Setup

1. Create a key at https://inferspeed.ai/keys and put it in an environment variable:

export INFERSPEED_API_KEY="sk-****"

2. Merge this into ~/.openclaw/openclaw.json (JSON5; merge it with what is there, do not overwrite the file):

{
  models: {
    mode: "merge",
    providers: {
      inferspeed: {
        baseUrl: "https://api.inferspeed.ai/v1",
        apiKey: "${INFERSPEED_API_KEY}",
        api: "openai-completions",
        models: [{ id: "glm-5.3", name: "glm-5.3" }],
      },
    },
  },
  agents: { defaults: { model: { primary: "inferspeed/glm-5.3" } } },
}

OpenClaw replaces ${INFERSPEED_API_KEY} with the environment variable when it loads the file, so the key never appears in the config file. If your config lives elsewhere, set OPENCLAW_CONFIG_PATH.

Check it works

openclaw doctor

Then start OpenClaw as usual; the default model is inferspeed/glm-5.3.

Common errors

ErrorCauseFix
400 model_not_availableThe model name could not be routed (strict mode X-Model-Strict: 1, or no live routing target; see Model routing in developers.md)available_models in the response lists the models this key can call; use one of them
403 INSUFFICIENT_BALANCEThe balance is used upTop up, then retry

Prices (USD per 1M tokens)

ModelInputOutputCache readOfficial price (input / output)
glm-5.3$0.84$2.64$0.156$1.40 / $4.40

All models and live prices: https://inferspeed.ai/model-plaza

FAQ

Can I use Kimi?
One key calls every live model (GET /v1/models lists the models your key can call); use the model ID kimi-k3. This page only gives the config for glm-5.3.

What are the default limits?
30 requests per minute and 5 concurrent requests for new accounts, across all keys of the account.