303 models · 40 model vendorsLearn more
CoreAPI × OpenClaw

Configure
OpenClaw with
via CoreAPI

Use CoreAPI as a custom model provider for OpenClaw: one API with a broad model catalog at official list prices. This guide follows the current OpenClaw onboarding flow (2026.3.8+) and covers install, provider config, verification, and model switching.

~/.openclaw/openclaw.json
# Sample only—verify against your OpenClaw version before production
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "coreapi-claude/claude-sonnet-4-5-20250929"
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "coreapi-openai": {
        "baseUrl": "https://unixcore.io/v1",
        "apiKey": "${COREAPI_KEY}",
        "api": "openai-completions",
        "models": [{ "id": "deepseek-flash", "name": "DeepSeek Flash" }]
      },
      "coreapi-claude": {
        "baseUrl": "https://unixcore.io",
        "apiKey": "${COREAPI_KEY}",
        "api": "anthropic-messages",
        "models": [{ "id": "claude-sonnet-4-5-20250929", "name": "Claude Sonnet 4.5" }]
      }
    }
  }
}
00 — Start here

Guide scope
and prerequisites

Guide headline

Configure OpenClaw with CoreAPI

Use CoreAPI as a custom model provider for OpenClaw to access the model catalog in one API at official list prices. This page follows the current OpenClaw onboarding flow (2026.3.8+).

Prerequisites

Prerequisites

Node.js >= 22 and a CoreAPI API key are required. For daemon installs, store COREAPI_KEY in ~/.openclaw/.env so openclaw.json can reference $COREAPI_KEY without hardcoding secrets.

Quick commands
openclaw onboard --install-daemon
openclaw gateway status
openclaw dashboard

printf 'COREAPI_KEY=%s\n' 'your_coreapi_key' >> ~/.openclaw/.env
chmod 600 ~/.openclaw/.env

After adding ~/.openclaw/.env or editing provider config, restart once with openclaw gateway restart, then run diagnostics. Use full provider/model refs in all commands and sessions. For version drift, re-check the Configuration Reference.

01 — Provider setup notes

Why two providers
for one CoreAPI key

API-shape based provider routing
OpenClaw routes by API compatibility (not vendor label alone), so use separate providers for openai-completions and anthropic-messages.
Single key, multi-provider config
Keep a single COREAPI_KEY and reuse it across coreapi-openai and coreapi-claude blocks. Use explicit provider/model references everywhere.
Current flow verification
Run onboarding once, restart gateway after changes, then validate with models status, provider-scoped models list, and doctor diagnostics.
02 — Wire it into OpenClaw

Install, onboard, configure,
verify, switch

Version-aware notes

OpenClaw uses ~/.openclaw/openclaw.json as the source config you edit. Custom providers are materialized into per-agent models.json files under ~/.openclaw/agents/<agentId>/. Re-check keys and behavior after upgrades using the Configuration Reference and Environment Variables guides. Treat CoreAPI base URLs as defined only in the live documentation.

01 Install or update OpenClaw
Recommended: curl -fsSL https://openclaw.ai/install.sh | bash. Or npm install -g openclaw@latest if you keep a global npm install.
02 Run onboarding once
Run: openclaw onboard --install-daemon. In Model/Auth choose Skip for base install, keep default workspace unless needed, and let wizard finish daemon + health check.
03 Store COREAPI_KEY
For daemon installs, append COREAPI_KEY to ~/.openclaw/.env and chmod 600. Keep using shell/service secrets workflows if you already have one.
04 Add {brand} providers in openclaw.json
Add coreapi-openai (openai-completions) and coreapi-claude (anthropic-messages), then set primary to coreapi-claude/claude-sonnet-4-5-20250929.
05 Restart and verify
Run openclaw gateway restart, then openclaw models status, openclaw models list --provider coreapi-claude, and openclaw doctor. Expect no config schema/auth errors for CoreAPI providers.
06 Switch models with provider/model
Set default with openclaw models set coreapi-claude/claude-sonnet-4-5-20250929. In chat, switch via /model coreapi-openai/deepseek-flash.
07 Optional clean reinstall
If repairing an older broken setup, stop gateway, remove ~/.openclaw, rerun onboarding, then re-apply CoreAPI config. This resets local config, sessions, logs, and auth state.
Config snippet (merge into openclaw.json)
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "coreapi-claude/claude-sonnet-4-5-20250929"
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "coreapi-openai": {
        "baseUrl": "https://unixcore.io/v1",
        "apiKey": "${COREAPI_KEY}",
        "api": "openai-completions",
        "models": [{ "id": "deepseek-flash", "name": "DeepSeek Flash" }]
      },
      "coreapi-claude": {
        "baseUrl": "https://unixcore.io",
        "apiKey": "${COREAPI_KEY}",
        "api": "anthropic-messages",
        "models": [{ "id": "claude-sonnet-4-5-20250929", "name": "Claude Sonnet 4.5" }]
      }
    }
  }
}

Basic setup does not require manually creating auth-profiles.json. Use ${COREAPI_KEY} in providers and inject the variable through ~/.openclaw/.env, shell, or service manager.

03 — Reference pricing

Live rates live
on the CoreAPI site

The table below uses illustrative per-million-token numbers. Model catalog, pricing, and SLAs follow the current CoreAPI terms. CoreAPI's docs and console show right now.

04 — FAQ

Check these
before you integrate

Do I need auth-profiles.json for this setup?

No for the basic setup. OpenClaw can resolve provider apiKey from models.providers.*.apiKey via $COREAPI_KEY. Use auth-profiles.json only for per-profile stored secrets or rotation.

Why are there 2 provider entries for one vendor?

OpenClaw routes by API format compatibility. Keep separate entries for openai-completions and anthropic-messages.

Where is config actually edited and materialized?

Edit ~/.openclaw/openclaw.json. Custom providers are materialized into per-agent models.json under ~/.openclaw/agents/<agentId>/ after sync/load.

Which model IDs are used in this guide?

deepseek-flash and claude-sonnet-4-5-20250929. You can add any model from the CoreAPI models page to the matching provider block.

CoreAPI × OpenClaw | OpenAI-compatible API & agent gateway - One API Access to AI Models - CoreAPI