Skip to main content
OpenClaw is an open-source personal AI assistant that connects to chat apps and carries out tasks. It supports custom model services through models.providers, and DreamTo can be connected over either the Anthropic Messages or the OpenAI Chat Completions protocol.

Prerequisites

  • OpenClaw is installed and initialized (you have run openclaw onboard).
  • You have created an API Key on the API Keys page of the DreamTo console. We recommend first confirming in the console or with cURL that the key and model work.

Config file

OpenClaw reads its config from ~/.openclaw/openclaw.json (JSON5, so comments are allowed). You can edit the file directly, or open the Config page of the control panel at http://127.0.0.1:18789 and edit it in the Raw JSON editor. Run openclaw config file to see the path of the config file in effect.
Merge only the models and agents.defaults fields below; don’t overwrite the whole config.

Setup

1

Set the API Key environment variable

Reference it in the config as ${DREAMTO_API_KEY} to avoid a plaintext key in the file.
2

Add providers

~/.openclaw/openclaw.json
  • models[].id is the model ID sent to DreamTo and must match the Model Marketplace.
  • Models are referenced as provider ID/model ID, and the value in primary must exactly match a definition above.
  • Set contextWindow and maxTokens to the model’s actual specs; if omitted, OpenClaw uses conservative defaults.
3

Apply and verify

After you save, the Gateway reloads the config automatically. If it doesn’t take effect, run openclaw gateway restart. Then start a new session and send a message to test. If config validation fails, run openclaw doctor --fix.You can also switch the default model from the command line:

Gemini models

The native Gemini protocol uses different paths from the two above, so create a separate provider for it (protocol: Google Generative AI) with the address set to just https://api.dreamto.ai. Requests should end up at https://api.dreamto.ai/v1beta/models/<model ID>:generateContent. OpenClaw versions may build the path differently; if you get a 404, check for a duplicated or missing /v1beta.

FAQ

Make sure the OpenClaw Gateway process can read DREAMTO_API_KEY. When the Gateway runs as a service, add the variable to the service environment or put the key directly in the config.
  • The Anthropic provider’s baseUrl has no /v1; the OpenAI provider’s baseUrl includes /v1.
  • The provider/model referenced in primary must be defined under providers.
Make one direct call with the same key and model using the cURL examples to tell whether it’s a config issue or an API issue. When troubleshooting, include the X-Request-Id from the response headers.
If a model doesn’t accept the reasoning effort parameter, set compat: { supportsReasoningEffort: false } on that model, or remove reasoning: true.