# Integration-openclaw

## OpenClaw Integration

[OpenClaw](https://openclaw.ai/) is an AI coding agent CLI that supports custom LLM providers. Because SogniLLM is OpenAI API-compatible, you can configure it as a provider in OpenClaw and use Sogni's Qwen 3.5 models for coding tasks.

***

### Prerequisites

* **OpenClaw** installed (see the [OpenClaw docs](https://docs.openclaw.ai/) for setup)
* A **Sogni API key** (get one free at [app.sogni.ai](https://app.sogni.ai))

***

### Setup

#### Step 1: Add Authentication

```bash
openclaw models auth paste-token --provider sogni
```

When prompted, paste your **Sogni API key**.

#### Step 2: Configure the Base URL

```bash
openclaw config set "models.providers.sogni.baseUrl" "https://api.sogni.ai/v1"
```

#### Step 3: Set the Default Model

```bash
openclaw models set sogni/qwen3.5-35b-a3b-gguf-q4km
```

{% hint style="info" %}
To use the **abliterated (uncensored) variant** instead:

```bash
openclaw models set sogni/qwen3.5-35b-a3b-abliterated-gguf-q4km
```

{% endhint %}

#### Step 4: Restart the Gateway

```bash
openclaw gateway restart
```

#### Step 5: Verify

Check that the provider is configured correctly:

```bash
openclaw models status
```

You should see the Sogni provider listed with the Qwen 3.5 model. Test it with a quick message:

```bash
openclaw agent --message "Hello, which model are you?"
```

The model should respond identifying itself as Qwen 3.5.

***

### Troubleshooting

| Issue                      | Solution                                                                                      |
| -------------------------- | --------------------------------------------------------------------------------------------- |
| Provider not recognized    | Check spelling: the provider name must be `sogni` (lowercase).                                |
| Model not found            | Verify the exact model ID. Use the full slug: `sogni/qwen3.5-35b-a3b-gguf-q4km`               |
| `401 authentication_error` | Re-run `openclaw models auth paste-token --provider sogni` with a valid API key.              |
| `402 insufficient_quota`   | Your Sogni token balance is empty. Claim your daily bonus or purchase tokens at app.sogni.ai. |
| Gateway won't restart      | Try `openclaw gateway stop` then `openclaw gateway start`.                                    |
