openclaw.json: a base URL, an API key and the models you want, under models.providers.
Overview
OpenClaw is an open-source personal AI assistant that runs on your own machine. A local Gateway connects it to the chat apps you already use, and you can also reach it from a terminal UI and a web Control UI. By pointing it at Eden AI, its default model runs through Eden AI’s OpenAI-compatible chat endpoint with a single Eden AI key.Prerequisites
- OpenClaw installed and onboarded. The installer scripts start onboarding for you; if you installed the npm package instead, run
openclaw onboard --install-daemon. See the OpenClaw installation guide. - Eden AI API key from app.edenai.run → API Keys
Setup
1. Add Eden AI as a custom provider
OpenClaw reads its config from~/.openclaw/openclaw.json (on Windows: %USERPROFILE%\.openclaw\openclaw.json). Onboarding creates this file, so merge the models and agents.defaults.model keys below into it rather than replacing it:
openclaw config set models.providers.edenai '<json>' --strict-json --merge to set just the provider from the command line. Use any provider/model from the Eden AI catalog that supports function calling, since OpenClaw sends tools with every request.
A few notes on the config above:
apiisopenai-completionsbecause Eden AI’s/v3/chat/completionsis OpenAI-compatible. Without it the model can fail to load withno "api" specified.agents.defaults.model.primarymakes the Eden AI model OpenClaw’s default. OpenClaw splits the ref at the first/, soedenai/anthropic/claude-sonnet-latestis the provider key (edenai) plus the modelid.contextWindowis the model’scontext_lengthfrom the catalog. OpenClaw uses the value you set, so copy it from the catalog entry of each model you add.maxTokensis the reply cap you choose.costvalues are placeholders, so OpenClaw’s local cost tracking shows zero. Eden AI bills the key you used: see monitoring for consumption and cost.supportsTools: truedeclares that this endpoint accepts tool definitions.reasoning: falsestops OpenClaw from sendingreasoning_effortto this model.
2. Select the model
agents.defaults.model.primary already makes the Eden AI model the default. To change the default later from the command line, run:
openclaw configure has a model section too, but it keeps an existing agents.defaults.model.primary and it does not take the Eden AI base URL: that lives in models.providers.edenai.baseUrl from step 1. Its Gateway step only configures OpenClaw’s local server (port, bind address, auth).
3. Start OpenClaw
agents.defaults.utilityModel is set; set it to an edenai/... ref to use a cheaper model for them.
Model naming
Eden AI model ids areprovider/model. In an OpenClaw ref you add the provider key in front, so the Eden AI model anthropic/claude-sonnet-latest is edenai/anthropic/claude-sonnet-latest. Pick chat models that support function calling. These ids work today:
anthropic/claude-sonnet-latest: balanced reasoning and reliable tool calling, a good defaultanthropic/claude-opus-latest: maximum capabilityanthropic/claude-haiku-latest: fast and cheap
*-latest alias follows the provider’s current model. The full list, with each model’s capabilities and context length, is in List LLM Models.
Switching models
Add another entry to the provider’smodels array to give OpenClaw its context window and cost metadata, then select it with openclaw models set edenai/<provider>/<model>. On a custom endpoint OpenClaw also accepts a model that is not listed in models.
Fallbacks
A backup model can come from either side, and the two are separate mechanisms. OpenClaw switches models.agents.defaults.model.fallbacks is a list of refs that OpenClaw tries in order when the primary fails:
policy/<name> as a model id under models.providers.edenai.models and select the ref edenai/policy/<name> (OpenClaw splits the provider at the first /). On a custom endpoint OpenClaw accepts model names it does not list (openclaw@v2026.10.8:docs/concepts/models.md:237), and Eden AI runs the policy’s chain for policy/<name>; a request that names an ordinary model runs that model.
Expert Models as Tools (MCP)
Eden AI also hosts an MCP server that exposes the expert model catalog (OCR, web search, speech, translation and more) as tools. Add it with the CLI:~/.openclaw/openclaw.json directly. The Gateway watches the file and applies changes on its own:
openclaw mcp doctor edenai --probe to check that the server answers. See the MCP server page for the full tool catalog and the conventions its tools share.
Troubleshooting
401 / Invalid API key or Invalid token
Eden AI does not recognize the key in apiKey: it answers Invalid API key for a wrong or revoked sk-eden-... key and Invalid token for a token of any other shape. Create a fresh one at app.edenai.run → API Keys and check for leading or trailing spaces.
Unknown model: edenai/...
This message comes from OpenClaw, not from Eden AI: it could not resolve the ref. Check that the part before the first / is the provider key under models.providers (edenai) and that the rest is the model id from your config.
Model(s) not found or inactive
Eden AI returns this 400 when the model id is not in the catalog. Use an id the catalog lists: provider/model, for example anthropic/claude-sonnet-latest, or a routable name.
no "api" specified
The provider is missing its api field. Set "api": "openai-completions" at the provider level (see step 1).
Connection issues
Confirm the base URL is exactlyhttps://api.edenai.run/v3 and check Eden AI status at app-edenai.instatus.com.
Next Steps
- Hermes Agent - Self-hosted, persistent AI agent from Nous Research
- nanobot - Self-hosted personal AI agent framework
- Routing policies - Save a model chain and call it as
policy/<name>