Sogni: Learn logo

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.
  • 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": 131072,
            "contextTokens": 131072,
            "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?"

#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.

#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.

Last updated 2026-04-20