OpenClaw Integration
OpenClaw can use Sogni Intelligence as an OpenAI-compatible model provider. This is useful for coding agents that need a Qwen model with long-context reasoning, streaming, and OpenAI-compatible tool-call semantics.
#Prerequisites
- OpenClaw installed and able to start its gateway.
- A Sogni API key from dashboard.sogni.ai/api-key.
- A Sogni account with Spark or SOGNI token balance.
#Configure A Sogni Provider
OpenClaw stores endpoint details under models.providers. Add a Sogni provider using either OpenClaw's config commands or by editing the relevant models.json for your agent.
Minimal provider shape:
{
"models": {
"mode": "merge",
"providers": {
"sogni": {
"baseUrl": "https://api.sogni.ai/v1",
"api": "openai-completions",
"models": [
{
"id": "qwen3.6-35b-a3b-gguf-iq4xs",
"name": "Sogni Qwen3.6 35B-A3B",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 262144,
"contextTokens": 262144,
"maxTokens": 32768
},
{
"id": "qwen3.5-35b-a3b-abliterated-gguf-q4km",
"name": "Sogni Qwen3.5 35B-A3B Abliterated",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 32768,
"contextTokens": 32768,
"maxTokens": 32768
}
]
}
}
}
}
Then store the API key for the provider:
openclaw models auth paste-token --provider sogni
When prompted, paste your Sogni API key.
Set the default model:
openclaw models set sogni/qwen3.6-35b-a3b-gguf-iq4xs
Restart or reload the OpenClaw gateway if your setup requires it, then verify:
openclaw models status --probe
Run a quick test:
openclaw agent --message "Hello. Which model and provider are you using?"
#Add Creative Media Tools
The provider setup above gives OpenClaw an OpenAI-compatible Sogni LLM endpoint. If you also want OpenClaw to generate images, videos, music, durable workflows, personas, memories, and local media utilities through a dedicated agent skill, install the public Sogni Creative Agent Skill:
openclaw plugins install sogni-creative-agent-skill
For a local checkout, link the generated .openclaw-link/ directory from the skill repo rather than the repository root:
cd /path/to/sogni-creative-agent-skill
npm install
npm link
npm run openclaw:sync
openclaw plugins install -l "$PWD/.openclaw-link"
openclaw gateway restart
Use the provider for model selection and reasoning. Use the skill when the agent should call sogni-agent directly, access the per-skill Sogni media surface, or run hosted workflow commands such as --api-chat, --api-workflow, and --durable-chat.
#Coding-Agent Notes
Sogni accepts developer messages and maps them into system-level instructions for compatibility with modern coding agents. When a request includes a developer message and no explicit task_profile, Sogni defaults the request to the coding profile.
Sogni media tools are available by default on /v1/chat/completions. For coding-only OpenClaw agents, disable them if your OpenClaw configuration supports provider-specific extra request body fields:
{
"sogni_tools": false
}
If OpenClaw does not expose extra body fields in your version, the default media tools can remain enabled. They are only called when the model selects them.
#Cost Control
If you enable Sogni media tools in your OpenClaw setup, those tool calls spend Spark or SOGNI tokens. Two things to know:
- Pick the billing token. Pass
token_type: "spark"(purchased) or"sogni"(native) in OpenClaw's per-provider extra-body if your version supports it. Defaults toauto. - Vendor models require explicit naming. OpenAI GPT Image 2 and ByteDance Seedance 2.0 require Premium Spark and are never selected by the router on your behalf — your prompt or extra-body has to name them.
For a coding-only OpenClaw agent that should never spend on media, keep sogni_tools: false (see the previous section). For approvals, hard caps, and the durable cost-approval flow, see Billing & Cost Control.
#Troubleshooting
| Issue | Fix |
|---|---|
401 authentication_error |
Re-run openclaw models auth paste-token --provider sogni with a valid Sogni API key. |
| Model not found | Use sogni/qwen3.6-35b-a3b-gguf-iq4xs or run GET https://api.sogni.ai/v1/models for the current list. |
Provider reports no_model |
Confirm the provider config includes at least one Sogni model under models.providers.sogni.models. |
402 insufficient_quota |
Add Spark or SOGNI token balance in the Sogni dashboard. |
| Gateway uses an old provider config | Restart the gateway and run openclaw models status --probe. |
See the OpenClaw model providers reference and configuration reference for the current provider configuration format.