Skip to main content
This guide is for self-hosted OpenClaw users who want to connect AI Sonar as their AI provider.
For standard OpenClaw agent execution, install the AI Sonar provider plugin:
The plugin discovers AI Sonar’s live chat-model catalog and keeps 18 fallback models for offline discovery. Models use the aisonar/<model-id> format. npm package · ClawHub listing · Source code

Manual provider configuration

Use manual models.providers entries when you explicitly need separate Responses API, Claude native, Gemini native, or MiniMax native routes. If you choose manual configuration, configuring aisonar alone is enough. Add the other providers only when you explicitly need Responses API, Claude native, Gemini native, or MiniMax native behavior.
Use the /v1 suffix only for openai-completions and openai-responses.Native providers such as anthropic-messages and google-generative-ai should use https://api.aisonar.dev without /v1, otherwise OpenClaw may construct the wrong provider path.

Prerequisites

  • A self-hosted OpenClaw instance
  • An API key — Get one here

Configuration

Edit your OpenClaw config:
  • Self-hosted: ~/.openclaw/openclaw.json
Add AI Sonar providers under models.providers:
All 5 providers use the same API Key. You only need one AI Sonar account.
The models arrays above only show common examples. Add more model IDs to each provider as needed.

Using Models

OpenClaw still references models with the provider/model format:

Model Examples

Browse all available models at aisonar.dev/models.

When to Use Which Provider

  • aisonar: default choice for most general-purpose agent and chat use cases.
  • aisonar-responses: use when your OpenClaw workflow explicitly depends on OpenAI Responses semantics.
  • aisonar-claude: use when you want Claude’s native Messages behavior.
  • aisonar-gemini: use when you want Gemini-native request/response formatting or existing Gemini-style integrations.
  • aisonar-minimax: use when you want MiniMax on its native route.
If you do not need Gemini-native behavior, you can still call Gemini models through aisonar/gemini-* on the OpenAI-compatible route.

Common Mistakes

Current OpenClaw docs use models.providers. If you keep the older top-level providers array format, OpenClaw may ignore the config or fail to resolve the provider prefixes as expected.
openai-responses maps to AI Sonar’s /v1/responses path, so aisonar-responses must use https://api.aisonar.dev/v1.
anthropic-messages and google-generative-ai should use https://api.aisonar.dev without /v1. Adding /v1 can produce incorrect request paths.
Yes. Current OpenClaw documentation still includes the built-in google provider and also supports custom providers using api: "google-generative-ai". So aisonar-gemini remains a valid native Gemini route for OpenClaw users.

Verify Setup

After saving the config, restart your OpenClaw instance and test with a simple message. If you see a response, the provider is configured correctly.

Next Steps

Once OpenClaw is connected, these guides help you use AI Sonar more effectively: