工具OpenClaw
OpenClaw
将 Void API 注册为自定义的 OpenAI 兼容模型提供商。
MODEL_ID 是占位符。请从目录中选择支持该工具接口和功能的模型。
API 密钥
将密钥保存在环境变量中。
export VOID_API_KEY='void_your_key'在 Bash 或 Zsh 中运行。仅为当前终端设置这些值。若要在后续会话中保留,还请将这些命令添加到 ~/.bashrc 或 ~/.zshrc。
配置
将提供商添加到 ~/.openclaw/openclaw.json。该文件支持 JSON5。
~/.openclaw/openclaw.json{ "agents": { "defaults": { "model": { "primary": "void-api/MODEL_ID" } } }, "models": { "mode": "merge", "providers": { "void-api": { "baseUrl": "https://void-api.tech/v1", "apiKey": "${VOID_API_KEY}", "api": "openai-completions", "models": [ { "id": "MODEL_ID", "input": [ "text", "image" ] } ] } } } }运行
检查模型目录,然后选择一个 Void API 模型。
shellopenclaw models list openclaw models set 'void-api/MODEL_ID'