Prerequisites
- You have completed Create an account.
- You have completed Get an API Key.
- OpenClaw is installed and
openclaw --versionworks. - You have the 4096bytes API Key, Base URL, and model name.
Configure a custom Provider
Run this command to add 4096bytes as a custom model Provider.YOUR_4096BYTES_API_KEY with the API Key you created in the dashboard. Use the current dashboard values for id, name, contextWindow, and reasoning.
Set the agent default model
Set the 4096bytes model as the agent default model and give it a short alias.gpt-5.5, replace 4096bytes/gpt-5.5 in the command.
Restart the gateway
After writing the config, restart the OpenClaw gateway.Activate the new model
Set the current session to use the 4096bytes model.gpt-5.5 with the model ID shown in the dashboard.
Test the model call
Send a short message to verify the connection.Common issues
OpenClaw says the JSON is invalid
OpenClaw says the JSON is invalid
Check for trailing commas, unescaped quotes, or missing braces. With
--strict-json, the value must be valid JSON.Authentication failed
Authentication failed
Check that
apiKey is complete and copied without extra spaces or newlines. Confirm the API Key was not deleted, expired, or over quota.Model not found
Model not found
Confirm that the
id in models matches the model ID used by openclaw models set. Copy the model name from the dashboard instead of old screenshots or another user’s config.Config does not take effect
Config does not take effect
Run
openclaw gateway restart first. If it still fails, check that both models.providers.4096bytes and agents.defaults.models were written successfully.