DOC · MICRODC-BLOG-004v3.4 · BETA
2026-05-05 · TUTORIALS · ~5 MIN READ

Use MicroDC.ai as the LLM backend for OpenClaw.

OpenClaw is an open-source local agent — "the AI that actually does things." It can also run up a real bill if you point it at a premium API: every browser action, every email triage, every calendar lookup is a model call. Here's how to swap the backend for MicroDC.ai's OpenAI-compatible endpoint and cut the per-call cost by an order of magnitude.

Autonomous agents are a different cost shape than chatbots. A chat session is a few model calls per conversation. An agent doing real work — checking flights, summarizing inboxes, scraping a site, filling forms — fires off dozens or hundreds of calls per task. Multiply that by a few users on your machine, or by the agent's "ambient" background tasks, and you'll watch a Claude or GPT subscription chew through credits faster than expected.

The good news: OpenClaw's model gateway supports custom OpenAI-compatible providers. Setting MicroDC.ai as the backend takes about five minutes and a single config block. The agent doesn't notice the swap; the bill does.

Why this combo works.

OpenClaw's gateway routes model requests to whichever provider is configured for the chosen model name. It already supports OpenAI's hosted API, Anthropic's Claude, and any custom OpenAI-compatible endpoint — exactly the shape MicroDC.ai exposes at https://api.microdc.ai/v1. The result:

Step 1: install OpenClaw.

If you haven't already, install the latest OpenClaw via npm and onboard the daemon:

npm install -g openclaw@latest
openclaw onboard --install-daemon

The dashboard comes up at http://127.0.0.1:18789/. Walk through the onboarding wizard if it's your first install — it'll ask you for one model provider to start with. You can set MicroDC.ai as that provider directly, or finish onboarding with whatever you have and add MicroDC.ai as a second provider afterward.

Step 2: get a MicroDC.ai API key.

Create a free account at console.microdc.ai — takes about a minute, no credit card. Generate an API key from the dashboard. New accounts get welcome credits, so you can run real OpenClaw workloads through the integration before adding any funds.

Pick a model from the catalog. For an agent that needs to follow tool-call instructions reliably, qwen3:32b is our recommended default — modern, mid-sized, and reliable on the OpenAI tool-call format. llama3:70b is the heavier alternative if you want more reasoning headroom. For lighter background tasks where speed matters more than depth, drop to gpt-oss:20b or phi4:latest — meaningfully cheaper per call. The catalog uses Ollama-style name:tag identifiers; copy them verbatim.

Step 3: register MicroDC.ai as a custom provider.

OpenClaw's config lives at ~/.openclaw/openclaw.json. You can edit it directly or use the openclaw config set CLI. Either way, the provider entry looks like this (matching OpenClaw's documented custom-provider shape):

{
  "models": {
    "mode": "merge",
    "providers": {
      "microdc": {
        "baseUrl": "https://api.microdc.ai/v1",
        "apiKey": "mDC_your_api_key_here",
        "api": "openai-completions",
        "models": [
          {
            "id": "qwen3:32b",
            "name": "Qwen 3 32B (MicroDC.ai)",
            "reasoning": false,
            "input": ["text"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 32000,
            "contextTokens": 24000,
            "maxTokens": 8000
          },
          {
            "id": "gpt-oss:20b",
            "name": "GPT-OSS 20B (MicroDC.ai)",
            "reasoning": false,
            "input": ["text"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 32000,
            "contextTokens": 24000,
            "maxTokens": 4000
          }
        ]
      }
    }
  }
}

Or via the CLI in one line (escape the JSON to taste in your shell):

openclaw config set models.providers.microdc \
  '{ "baseUrl":"https://api.microdc.ai/v1", "apiKey":"mDC_your_key", "api":"openai-completions", "models":[ {"id":"qwen3:32b","name":"Qwen 3 32B","input":["text"],"contextWindow":32000,"contextTokens":24000,"maxTokens":8000} ] }' \
  --strict-json --merge

The --merge flag preserves existing providers — so any Claude / GPT entries you already had remain untouched. Now you can route specific agents to specific providers based on cost, latency, or quality needs.

Step 4: point your default agent at the new provider.

OpenClaw addresses models as provider/model-id. To make MicroDC.ai the default for a given agent:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "microdc/qwen3:32b",
        "fallbacks": ["microdc/gpt-oss:20b"]
      },
      "models": {
        "microdc/qwen3:32b": { "alias": "MicroDC.ai Qwen 3" }
      }
    }
  }
}

The fallback chain is useful: primary task on the 32B Qwen, drop to the smaller GPT-OSS if the primary is congested. Both calls bill at MicroDC.ai rates — fractional cost either way.

What to expect.

A few honest notes from running this combo in practice:

The pitch.

OpenClaw on a premium API works, but it's a luxury for serious agent use. Every autonomous step is a metered call, and "the AI that actually does things" can do quite a few things in a day. Routing through MicroDC.ai swaps the most expensive part of the stack for a fractional-cost equivalent without changing the agent itself, your data flow, or the local feel of the product.

Combine this with a model you trust on tool calls, set a sensible fallback chain, and you have a personal AI assistant whose monthly cost looks more like a hosting bill than an enterprise SaaS line item.

OpenClaw site →   Get a MicroDC.ai API key →