> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kiosapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw

> Configure OpenClaw CLI to use KiosAPI as the backend provider.

# OpenClaw

[OpenClaw](https://github.com/openclaw/openclaw) is an open-source CLI coding agent that supports multiple LLM providers. This guide shows you how to configure it to use KiosAPI.

## Prerequisites

* **Node.js 18+** or **Bun**
* A **KiosAPI API key** (starts with `sk-`)

## Installation

Install OpenClaw globally:

```bash theme={null}
npm install -g openclaw
```

Or with Bun:

```bash theme={null}
bun install -g openclaw
```

Verify the installation:

```bash theme={null}
openclaw --version
```

## Configuration

### 1. Set environment variables

OpenClaw reads the API key and base URL from environment variables.

**Windows (PowerShell):**

```powershell theme={null}
setx OPENAI_API_KEY "sk-xxx"
setx OPENAI_BASE_URL "https://kiosapi.com/v1"
```

**macOS / Linux:**

Add to `~/.bashrc` or `~/.zshrc`:

```bash theme={null}
export OPENAI_API_KEY="sk-xxx"
export OPENAI_BASE_URL="https://kiosapi.com/v1"
```

Reload your shell:

```bash theme={null}
source ~/.bashrc  # or ~/.zshrc
```

### 2. Config file

Create or edit `~/.openclaw/config.json`:

```json theme={null}
{
  "provider": "openai",
  "apiBase": "https://kiosapi.com/v1",
  "apiKey": "sk-xxx",
  "model": "gpt-5.5"
}
```

Replace `sk-xxx` with your actual KiosAPI key.

> [!TIP]
>
> You can use any OpenAI-compatible model available on KiosAPI. Check the [models list](https://docs.kiosapi.com/api-reference/models/list-models.md) for available options.

## Usage

### Interactive mode

```bash theme={null}
openclaw
```

### Direct question

```bash theme={null}
openclaw "Create a React component for a todo list"
```

### Specify a model

```bash theme={null}
openclaw --model claude-sonnet-4-6 "Refactor this function"
```

## Troubleshooting

### Authentication Error

* Verify your API key is set correctly and starts with `sk-`
* Ensure `apiBase` in the config file matches the environment variable

### Connection Error

* Confirm the base URL is `https://kiosapi.com/v1` (with `/v1`)
* Check your network and firewall settings

## Verify Your Setup

```bash theme={null}
openclaw "Say hello"
```

## Need Help?

* [KiosAPI Dashboard](https://kiosapi.com)
* [Available Models](https://docs.kiosapi.com/api-reference/models/list-models.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.