OpenClaw GLM-5.3 Setup | Custom Provider Config with an API Key
Add a custom provider under models.providers in openclaw.json with baseUrl https://api.ulkcloud.com/v1, api openai-completions, and your API key, then list glm-5.3, glm-5.3-flash, and glm-5.3-abliterated with reasoning: false. With reasoning: true, OpenClaw sends reasoning_effort, which ULK Cloud accepts but ignores because each model's reasoning strength is fixed.
To use GLM-5.3 in OpenClaw, add ULK Cloud as a custom provider under models.providers in ~/.openclaw/openclaw.json: set baseUrl to https://api.ulkcloud.com/v1, api to openai-completions, and apiKey to your ULK Cloud key, then list glm-5.3, glm-5.3-flash, and glm-5.3-abliterated as models with reasoning: false. Select a model as ulkcloud/glm-5.3. With reasoning: true, OpenClaw adds reasoning_effort to its requests; ULK Cloud accepts that field but ignores it, because each model's reasoning strength is fixed.
This guide was checked on November 26, 2026 against the documentation and source code of OpenClaw 2026.11.10, the latest npm release at the time, and by sending requests shaped like OpenClaw's to the ULK Cloud API. It was updated on December 3, 2026, after ULK Cloud began accepting reasoning_effort; requests with low, none, and high returned 200.
The OpenClaw config for GLM-5.3
Add the following to ~/.openclaw/openclaw.json. The file is JSON5, so comments and trailing commas are allowed. If the file already has agents or models sections, merge these keys into them instead of adding a second copy.
{
agents: {
defaults: {
model: { primary: "ulkcloud/glm-5.3" },
models: {
"ulkcloud/glm-5.3": { alias: "glm" },
"ulkcloud/glm-5.3-flash": { alias: "glm-flash" },
"ulkcloud/glm-5.3-abliterated": { alias: "glm-abliterated" },
},
},
},
models: {
mode: "merge",
providers: {
ulkcloud: {
name: "ULK Cloud",
baseUrl: "https://api.ulkcloud.com/v1",
apiKey: "${ULK_API_KEY}",
api: "openai-completions",
models: [
{
id: "glm-5.3",
name: "GLM-5.3",
reasoning: false,
input: ["text"],
cost: { input: 0.4, output: 1.3, cacheRead: 0, cacheWrite: 0 },
contextWindow: 1000000,
maxTokens: 32768,
compat: { supportsUsageInStreaming: true },
},
{
id: "glm-5.3-flash",
name: "GLM-5.3 Flash",
reasoning: false,
input: ["text"],
cost: { input: 0.12, output: 0.2, cacheRead: 0, cacheWrite: 0 },
contextWindow: 1000000,
maxTokens: 32768,
compat: { supportsUsageInStreaming: true },
},
{
id: "glm-5.3-abliterated",
name: "GLM-5.3 Abliterated",
reasoning: false,
input: ["text"],
cost: { input: 3, output: 6, cacheRead: 0, cacheWrite: 0 },
maxTokens: 32768,
compat: { supportsUsageInStreaming: true },
},
],
},
},
},
}
The OpenClaw Gateway watches this file, and changes to models.providers and agents.defaults.models apply without a restart. The provider ID ulkcloud is a name you choose. Do not use zai, which is OpenClaw's built-in provider for Z.AI's own API.
What each OpenClaw setting does
Each field in the ULK Cloud entry has a reason. The values come from OpenClaw's custom provider documentation and from ULK Cloud's model list.
| Setting | Value | Why |
|---|---|---|
api | openai-completions | OpenClaw sends requests to /v1/chat/completions. This is also OpenClaw's default when a custom provider has a baseUrl but no api. |
reasoning | false | With true, OpenClaw sends reasoning_effort when thinking is on. ULK Cloud accepts that field but ignores it, because each model's reasoning strength is fixed, so the thinking level has no effect. |
input | ["text"] | ULK Cloud accepts text only. OpenClaw attaches images only to models marked as image-capable. |
maxTokens | 32768 | OpenClaw sends this as max_completion_tokens. ULK Cloud holds the cost of that many output tokens from your balance until the request ends. |
contextWindow | 1000000 | The published context length of glm-5.3 and glm-5.3-flash. ULK Cloud does not publish one for glm-5.3-abliterated, so it is left out, and OpenClaw falls back to 200,000 tokens. |
cost | ULK Cloud prices | USD per 1 million tokens. OpenClaw uses them only to estimate cost in its own usage display. |
compat.supportsUsageInStreaming | true | OpenClaw does not ask unknown remote servers for token usage in streams. ULK Cloud supports stream_options.include_usage, so this turns it on. |
agents.defaults.models | Aliases | Short names for /model. These entries do not register models; the models.providers list does. |
For a custom endpoint like api.ulkcloud.com, OpenClaw 2026.11.10 already leaves out the fields that only OpenAI's own API accepts: it sends no store, no prompt-cache hints, and no developer role. The request it builds uses model, messages, stream, max_completion_tokens, tools, tool_choice, and sampling fields such as temperature, all of which ULK Cloud accepts. Tool calling works: a tool call, its tool result message, and the follow-up reply passed through ULK Cloud in our test.
Keep the ULK Cloud API key out of openclaw.json
Store the key in ~/.openclaw/.env and reference it as ${ULK_API_KEY} in the config. OpenClaw reads environment variables from that file and substitutes the value into the config.
- Sign in to the ULK Cloud console at
https://console.ulkcloud.comand create an API key. Keys start withsk-ulk-. - Add one line to
~/.openclaw/.env:
ULK_API_KEY=sk-ulk-your-key
- Keep
apiKey: "${ULK_API_KEY}"in the provider entry. If the variable is missing, OpenClaw leaves it unresolved and logs a warning.
There is a second reason to keep the key out of the config. OpenClaw is an agent that reads files. If it reads a file that contains an API key and sends that text to the model, ULK Cloud stops the request with secret_detected before it reaches the model. A key that lives only in .env is less likely to end up in a prompt.
Check the connection with OpenClaw commands
Run these commands after saving the config. All of them are documented in OpenClaw's CLI reference.
openclaw config validatechecks thatopenclaw.jsonparses and matches the schema.openclaw models list --provider ulkcloudshould listglm-5.3,glm-5.3-flash, andglm-5.3-abliterated.openclaw models statusshows the default model (ulkcloud/glm-5.3) and whether a credential was found for it.- In a chat,
/model glm-flashswitches the current session toglm-5.3-flash, and/model statusshows which model the session is using.
openclaw models status without options does not call the model. To send one real request, stop the Gateway first, because the live check needs exclusive access to OpenClaw's state directory:
openclaw gateway stop
openclaw models status --probe --probe-provider ulkcloud --probe-max-tokens 1024
The live check is a real request and is billed like any other. A result of ok means ULK Cloud answered. Keep --probe-max-tokens at 1024 or more: in our test, a 64-token cap on glm-5.3-flash ended with an empty reply, which OpenClaw would report as format.
Which GLM-5.3 model to pick in OpenClaw
glm-5.3 is the default choice for agent work. glm-5.3-flash costs less than a third as much for input and about a sixth as much for output, and suits quick edits and short tool loops. glm-5.3-abliterated is for tasks the other two decline.
| Model | Input / 1M tokens | Output / 1M tokens | Context | Max max_tokens |
|---|---|---|---|---|
glm-5.3 | $0.40 | $1.30 | 1,000,000 | 131,072 |
glm-5.3-flash | $0.12 | $0.20 | 1,000,000 | 131,072 |
glm-5.3-abliterated | $3.00 | $6.00 | Not published | 131,072 |
Prices are as of November 26, 2026. Current prices are on the models page.
glm-5.3-abliterated is a version of GLM-5.3 with its refusal behavior removed. For every request, ULK Cloud adds an instruction prompt of about 5,300 tokens and bills it as input. In our test on November 26, 2026, the same short request counted 164 input tokens on glm-5.3 and 5,421 on glm-5.3-abliterated. At $3.00 per million, that adds about $0.016 per request. An OpenClaw agent sends one request per model turn, so a task with 50 tool calls adds about $0.80. The model refuses less often, but whether it answers still depends on the request.
The maxTokens value also matters for your balance. ULK Cloud holds input cost plus maxTokens of output cost while a request runs, and returns what was not used when it ends. At 32768, the output part of the hold is about $0.04 on glm-5.3, $0.007 on glm-5.3-flash, and $0.20 on glm-5.3-abliterated. At the maximum of 131072, it is four times that. Several OpenClaw runs at once each hold their own amount.
Errors OpenClaw can get from ULK Cloud
ULK Cloud returns OpenAI-style errors with a code and, for invalid requests, the param it rejected. A request rejected with 400 is checked before it reaches a model and is not billed.
| Status | ULK Cloud code | Cause in OpenClaw | Fix |
|---|---|---|---|
| 400 | unsupported_parameter | A field added through params.extraBody or similar. | Remove that field. The error names it in param. |
| 400 | invalid_value (messages.N.content) | An image was sent. | Keep input: ["text"]. ULK Cloud accepts text only. |
| 400 | invalid_value (max_completion_tokens) | maxTokens is above 131,072. | Set maxTokens to 131072 or less. |
| 400 | secret_detected | The agent read a file with an API key or private key, and it is in the prompt. | Remove the secret from the conversation. To send it anyway, add headers: { "X-ULK-Allow-Secrets": "true" } to the provider. |
| 401 | invalid_api_key | The key is wrong or was not sent. | Check ~/.openclaw/.env and any warning about an unresolved ULK_API_KEY. Keys start with sk-ulk-. |
| 402 | insufficient_balance | The balance cannot cover the hold for this request. | Top up, or lower maxTokens. |
| 402 | monthly_limit_reached | The key's monthly spending limit is reached. | Raise the limit in the console. |
| 404 | model_not_found | The model ID is misspelled, for example glm-5. | Use an exact ID from the table above. OpenClaw sends the ID without the ulkcloud/ prefix. |
| 429 | rate_limit_exceeded | More than 1,000 requests in a minute on one key. | Wait a moment and retry. |
| 502 / 504 | upstream_error / upstream_timeout | The model did not respond. | Retry. These requests are not billed. |
In ULK Cloud, reasoning_effort does not cause an error. Since December 2, 2026, ULK Cloud accepts it with any value, such as low, none, or high, and ignores it, so a model entry with reasoning: true copied from another provider still works. Other fields that ULK Cloud does not know still fail with Unsupported parameter: '<name>'. (code unsupported_parameter).
FAQ
Can I use GLM-5.3 Flash in OpenClaw?
Yes. Add glm-5.3-flash to the models list of the ULK Cloud provider and select it with /model ulkcloud/glm-5.3-flash, or with the alias /model glm-flash. It costs $0.12 per million input tokens and $0.20 per million output tokens.
How do I use GLM-5.3 abliterated in OpenClaw?
Add glm-5.3-abliterated as a model of the same provider with reasoning: false, and select ulkcloud/glm-5.3-abliterated. Every request carries about 5,300 extra input tokens that ULK Cloud adds and bills, so it costs more per tool call than the other two models.
Can I add the custom provider with a command instead of editing openclaw.json?
Yes. OpenClaw documents openclaw config set models.providers.ulkcloud '<json>' --strict-json --merge, where <json> is the provider object from the config above written as strict JSON. The command validates the result before saving it.
Is this the same as OpenClaw's Z.AI provider for GLM?
No. OpenClaw's built-in zai provider connects to Z.AI's own API with a Z.AI key. ULK Cloud is a separate custom provider with its own key, base URL, and prices, so give it its own provider ID such as ulkcloud.
Why does OpenClaw say "ulkcloud/glm-5.3-flash returned no token usage"?
In our streaming tests on November 26, 2026, glm-5.3 returned a usage chunk at the end of the stream, but glm-5.3-flash did not, even with stream_options.include_usage set. OpenClaw then estimates context size from the text and logs that usage was missing. ULK Cloud still bills by tokens, and the amount appears on the usage page of the console.
Does OpenClaw's thinking level change how GLM-5.3 reasons on ULK Cloud?
No. With reasoning: true, OpenClaw sends reasoning_effort, and ULK Cloud accepts the request but ignores that field, because ULK Cloud fixes the reasoning strength of each model. With reasoning: false, OpenClaw does not send the field, and the result is the same.