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.
# 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" }]
}
}
}
}Guide scope
and prerequisites
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
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.
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.
Why two providers
for one CoreAPI key
Install, onboard, configure,
verify, switch
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.
{
"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.
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.
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.