Prerequisites
Before you begin, you need:- A MaxAPI API key
- An available model ID
- Node.js 22 or later
- OpenClaw installed locally
1
Install OpenClaw
Install OpenClaw globally with npm, then start its onboarding flow.
2
Store the API key
Store your MaxAPI API key in an environment variable.
3
Add the MaxAPI provider
Add
maxapi under models.providers in your OpenClaw configuration. Replace YOUR_MODEL_ID with an ID from the model list.Match
contextWindow and maxTokens to the selected model. For a vision-capable model, set input to ["text", "image"].4
Verify the configuration
Check model status, then select the MaxAPI model.
Troubleshooting
Invalid API key
Invalid API key
Confirm that
MAXAPI_API_KEY is available to the shell or service that starts OpenClaw, and that the key is active.Model not found
Model not found
Ensure
models[].id exactly matches the MaxAPI model list. Select it using the maxapi/MODEL_ID format.The request returns 400
The request returns 400
Ensure
api is set to openai-completions. Check whether the model supports tools, image input, or other advanced request fields.The request times out
The request times out
Add or increase
timeoutSeconds in the provider configuration. Use asynchronous endpoints for video, image, and music generation.