OpenClaw with BazaarLink: Custom Provider Setup and Free-Quota Checks
Register a BazaarLink provider in OpenClaw, set its model reference, validate the config and Gateway, and check tool support and free-model call budgets before automation.
OpenClaw can use a custom OpenAI-compatible provider, but it needs that provider registered in its model configuration. Setting OPENAI_API_KEY, OPENAI_BASE_URL and OPENAI_MODEL alone is not the current documented setup for a named custom provider.
Below is a BazaarLink configuration example based on the official OpenClaw installation guide, configuration guide and custom-provider reference, checked on 17 September 2026. This revision did not install OpenClaw or run a live agent task, so it does not claim an end-to-end tested result.
Install the actual OpenClaw CLI
Use the official installer or desktop download for your OS. OpenClaw's supported installation is not the old Python recipe that appeared in this article. Its official source repository is openclaw/openclaw, not openclaw-ai/openclaw.
If you use the CLI, finish its guided onboarding and confirm it is available:
openclaw --version
openclaw doctor
Keep the reported version with your configuration notes. If you prefer npm installation, follow the current official instructions for your npm version; lifecycle-script approval requirements can differ. A copied generic install command is not a substitute for checking those requirements.
Get a BazaarLink key and keep it outside the shared config
Sign in at /login, create a key under /keys, and use a separate key for this OpenClaw installation. Do not expose it in a screenshot, public configuration file or bug report.
Set BAZAARLINK_API_KEY in the environment of the process that runs the Gateway. For an interactive test, an environment variable in your terminal can work; a background service does not necessarily inherit that terminal's environment. Use OpenClaw's documented environment/secret configuration when installing it as a service.
Browse /models before picking a specific model. Confirm the exact ID, real context capacity and required capabilities. auto:free is useful for a basic connection check, but a model selected from a rotating free pool is not guaranteed to support every OpenClaw tool workflow.
Add a provider entry and select its model
OpenClaw reads JSON5 configuration from ~/.openclaw/openclaw.json. Merge the following provider/model fragment into the existing configuration; do not replace channel, security or other settings just to add a backend:
{
"agents": {
"defaults": {
"model": {
"primary": "bazaarlink/auto:free"
}
}
},
"models": {
"mode": "merge",
"providers": {
"bazaarlink": {
"baseUrl": "https://api.bazaarlink.ai/v1",
"apiKey": "${BAZAARLINK_API_KEY}",
"api": "openai-completions",
"models": [
{ "id": "auto:free", "name": "BazaarLink free-model selection" }
]
}
}
}
}
bazaarlink/auto:free is the OpenClaw model reference: the local provider name plus the model ID. The provider's models entry registers auto:free as the ID sent to the API. Setting a primary reference without a matching provider/model entry can leave the runtime unable to resolve it.
The api value openai-completions selects OpenClaw's documented Chat Completions adapter. Do not change it to a made-up label such as openai-compatible. The custom-provider reference documents the accepted shape and capability metadata.
Use this fragment only for a short connection check. Omitting metadata does not make OpenClaw's estimates safe: its documented defaults include text-only input and zero cost values. If neither discovery nor per-model metadata supplies a context capacity, context budgeting falls back to 200,000 tokens. Neither that fallback nor a client estimate proves the endpoint's real capacity or price.
Before automation, select a specific model and set verified capability, context, output-limit and pricing metadata as described in the custom-provider reference. A rotating auto:free pool does not provide one fixed model's metadata. Use BazaarLink's actual usage and billing records to check charges; client configuration cannot enlarge the model's context window.
Validate before running the agent
OpenClaw validates its configuration against a schema. Unknown fields and invalid types can prevent Gateway startup; that is a config problem, not evidence that the API key is bad. Run:
openclaw doctor
openclaw models list
openclaw gateway status
Confirm that the intended provider/model resolves and that the Gateway is running. Then open the UI:
openclaw dashboard
Ask for a one-sentence reply with external tools disabled. Check the response and BazaarLink usage before enabling browsing, file access or messaging. The official getting-started guide covers onboarding, the background Gateway and dashboard.
For the first tool task, use a disposable directory and a harmless file. Inspect the returned tool call, its arguments and the actual file result. A model saying it wrote a file is not sufficient evidence that OpenClaw executed the tool.
Free capacity is smaller than an agent's task count
The public BazaarLink free-tier table currently shows base limits of 10 requests/minute and 50/day, with ×1/×2 tier multipliers. The actual tier depends on current balance/subscription eligibility and configured thresholds. Free-model requests share the account quota; switching models does not create another allowance.
Past the free quota, accounts meeting the paid-fallback conditions can continue at normal paid rates; otherwise requests are rate-limited. Check the free-model rules and your usage instead of assuming every request through auto:free stays free.
An OpenClaw task can make several model calls for planning, tool results, retries and other work. My recommendation is to measure one complete task's calls before enabling automation. For a workload that needs stable tools and sustained capacity, choose a specific suitable model and a budgeted paid or self-hosted setup.
| Problem | What to check |
|---|---|
| CLI is missing | Supported installation and executable path |
| Gateway refuses to start | openclaw doctor and the config schema |
| Credential is missing in service mode | Environment/secret visibility to the Gateway service |
| Model reference is unresolved | Both the provider entry and matching model ID |
| Basic chat works but tool task fails | Actual model tool support, permissions and returned tool data |
| Repeated quota errors | Shared account allowance and calls per task; use backoff |
Keep application permissions narrow even when the model works. A compatible endpoint supplies inference; OpenClaw's execution, channel access and security settings remain your responsibility. For alternatives and their conditions, see the free LLM API comparison.
FAQ
How do I connect OpenClaw to BazaarLink?
Register BazaarLink under models.providers with baseUrl https://api.bazaarlink.ai/v1, a privately supplied API key, api openai-completions and a matching model entry. Set agents.defaults.model.primary to the provider/model reference, then validate the config and test a small request.
Is OpenClaw installed by running python main.py?
Use the supported OpenClaw CLI installer, package or desktop setup described in the official documentation. The former Python install/run recipe and repository name in this article were not the current documented OpenClaw path.
Can OpenClaw use auto:free indefinitely without charges?
Free capacity is finite and shared across models. The actual account tier depends on current eligibility and configured thresholds. Beyond the free quota, qualifying accounts can use paid fallback; otherwise requests are rate-limited. Measure model calls per task and monitor usage.
Can I trust OpenClaw's defaults when custom model metadata is missing?
No. Omitted cost metadata defaults to zero, and context budgeting can fall back to 200,000 tokens when neither discovery nor per-model metadata supplies a capacity. Select a specific model, configure its verified limits and pricing, and check actual BazaarLink billing before automation.
TWD billing · Taiwan invoices · leading AI models · OpenAI-compatible API