Integrations
OpenClaw
Add ai.ml to OpenClaw as a custom model provider.
OpenClaw supports custom model providers. This guide uses its OpenAI Chat Completions client against /v1/chat/completions.
With the CLI
npx @aiml/cli setup openclawBy hand
Merge this into ~/.openclaw/openclaw.json (or $OPENCLAW_CONFIG_PATH):
{
"models": {
"mode": "merge",
"providers": {
"aiml": {
"baseUrl": "https://api.ai.ml/v1",
"apiKey": "${AIML_API_KEY}",
"api": "openai-completions",
"models": [
{
"id": "anthropic/claude-sonnet-4.6",
"name": "anthropic/claude-sonnet-4.6"
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "aiml/anthropic/claude-sonnet-4.6"
}
}
}
}Put the key in ~/.openclaw/.env. The config refers to it as ${AIML_API_KEY}, so it never sits in the config file itself:
AIML_API_KEY="aiml-live-…"- OpenClaw validates its config strictly, and a key it does not know stops its gateway. Run
openclaw config validateafter editing. models.mode: "merge"keeps OpenClaw's built-in providers alongside this one.- Model references are
aiml/<model id>, soaiml/anthropic/claude-sonnet-4.6. Add more entries undermodels, withcontextWindowandmaxTokenstaken fromGET /v1/models. - If your config file has comments,
aiml setupleaves it alone and prints the block to add by hand. Rewriting the file would lose the comments.
Verified with OpenClaw 2026.9.7.