Use DaoXE in OpenClaw

OpenClaw is the open-source personal AI assistant that lives in your chat channels and runs real tasks on your machines. Its model layer is config-first: one models.providers block turns DaoXE into a first-class provider.

Updated 2026-09-15

OpenClaw's Gateway resolves every agent model from ~/.openclaw/openclaw.json — JSON5, hot-reloaded. Its custom-provider docs name DaoXE's shape exactly: api: "openai-completions" behind a /v1 base URL, the documented route for any OpenAI-compatible server (cheapest APIs guide).

Why route OpenClaw through DaoXE#

  • One key behind a whole assistant. Chat, cron jobs, sub-agents and tool loops all resolve through the providers you declare — a DaoXE key covers hundreds of models from ~25 providers, so a large planner model and a cheap worker model share one balance.
  • You own the metadata. Context window, input modalities and output caps are declared in your config, not guessed by the client.
  • Reviewable by design. One JSON5 block states exactly what OpenClaw sends where — no hidden routing between the assistant and the endpoint.

Set it up in OpenClaw#

  1. Register the provider. Under models.providers in ~/.openclaw/openclaw.json, add a daoxe entry: baseUrl: "https://daoxe.com/v1", api: "openai-completions", apiKey: "${DAOXE_API_KEY}" — the env-substitution form the docs use.
  2. Register the models too. Add models: [{ id: "YOUR_EXACT_MODEL_ID" }] copied verbatim from DaoXE's GET /v1/models, and mark vision-capable models input: ["text", "image"]. A provider entry with no explicit model rows registers nothing.
  3. Pick the defaults. Set agents.defaults.model.primary to "daoxe/YOUR_EXACT_MODEL_ID" — references are always provider/model. Optional aliases and per-model settings go under agents.defaults.models.
  4. Save and verify. The Gateway watches the file and hot-reloads; or apply additive edits with openclaw config set models.providers.daoxe '<json>' --strict-json --merge (destructive rewrites need --replace). Confirm with openclaw models list, switch via openclaw models set daoxe/….
json5
// ~/.openclaw/openclaw.json — add DaoXE as a custom provider
{
  env: { vars: { DAOXE_API_KEY: "sk-you…-key" } },
  agents: {
    defaults: {
      model: { primary: "daoxe/YOUR_EXACT_MODEL_ID" },
    },
  },
  models: {
    mode: "merge",
    providers: {
      daoxe: {
        baseUrl: "https://daoxe.com/v1",
        apiKey: "${DAOXE_API_KEY}",
        api: "openai-completions",
        models: [
          { id: "YOUR_EXACT_MODEL_ID", name: "DaoXE primary",
            input: ["text", "image"], contextWindow: 200000 },
        ],
      },
    },
  },
}

Caveats worth knowing

A provider is not a model: the docs are blunt that agents.defaults.models["provider/model"] "neither restricts overrides nor registers a new runtime model" — every custom model must also appear in models.providers.daoxe.models[] with the exact id. Vision is opt-in metadata: omit input and a model defaults to text-only — image attachments then arrive as text references, not pixels — so mark capable DaoXE models explicitly. Compat flags are auto-forced: on non-native openai-completions routes OpenClaw sends system rather than OpenAI's developer role and skips OpenAI-only request shaping; an explicit supportsDeveloperRole: true is still overridden — don't fight it. Cost display is yours to fill: an omitted cost block defaults to all-zero, so OpenClaw's usage counters show $0 on a DaoXE route while the account is billed server-side — set realistic figures if you watch that panel. More clients: client setup notes.

Verify you actually get the model#

Prove the endpoint works before blaming the client — if this fails, no setting will fix it:

bash
export DAOXE_API_KEY="your_api_key"

# List the exact model IDs your account can call
curl --fail-with-body --show-error --silent \
  https://daoxe.com/v1/models \
  -H "Authorization: Bearer ${DAOXE_API_KEY}"

Prove the endpoint outside the assistant first, then diff a hard prompt against the official API at temperature 0:

bash
curl --fail-with-body --show-error --silent \
  https://daoxe.com/v1/chat/completions \
  -H "Authorization: Bearer ${DAOXE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_EXACT_MODEL_ID",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'

Verify us — don't trust us

Point the open benchmark at DaoXE and at the official API and compare at temperature 0. Then learn to detect model swapping so a cheaper endpoint can't quietly swap you to a smaller model.

Frequently asked questions#

Can OpenClaw use DaoXE?

Yes — a daoxe entry under models.providers with api: "openai-completions", baseUrl: "https://daoxe.com/v1", your key, and explicit model rows; then point agents.defaults.model.primary at daoxe/<id>.

Does DaoXE's native Claude Messages work here?

As a second provider, yes — the docs support api: "anthropic-messages" for Anthropic-compatible routes. Note OpenClaw suppresses implicit beta headers on non-direct Anthropic routes, so set headers["anthropic-beta"] explicitly if a flow needs beta features.

Why doesn't my model show in the picker?

Because provider entries register no models by themselves — add a matching { id: "…" } row under the provider's models array with the exact ID from GET /v1/models.

What does it cost?

Per-model, account-scoped — live pricing; top-up is a flat 1 RMB = $1 of credit on every payment method.

Try DaoXE — and benchmark it yourself

One key for GPT, Claude, Gemini, DeepSeek and more. Point the open benchmark at us and compare — don't take our word for it.