Config File Location
OpenClaw uses a JSON configuration file located at~/.openclaw/openclaw.json.
Basic Configuration
Create or edit the configuration file~/.openclaw/openclaw.json:
Configuration Reference
| Field | Description |
|---|---|
agents.defaults.model.primary | Default model, format: provider/model-name |
models.providers | Custom model provider configuration |
baseUrl | API endpoint, use https://api.apiyi.com/v1 |
apiKey | Your APIYI key |
api | API type: openai-completions for OpenAI compatible, anthropic-messages for Anthropic compatible |
Multi-Model Configuration
Configure multiple models and switch between them using/model <id> in chat: