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

# OpenClaw

## What is OpenClaw?

[OpenClaw](https://openclaw.ai/) is a personal AI assistant that runs locally on your machine (Mac, Windows, Linux). It can automate tasks, manage files, handle email and calendar, and supports extensions and plugins.

OpenClaw is compatible with the OpenAI API, so you can point it at Routify to access any model from the catalog through a single gateway.

## Setup

### Step 1: Get Your Routify API Key

1. Sign up or log in at [routify.ru](https://routify.ru/auth)
2. Create a new API key
3. Copy your key (starts with `sk-...`)

### Step 2: Add Routify as a Provider

Open `~/.openclaw/openclaw.json` and add Routify as a custom provider:

```json5 theme={null}
{
  env: { ROUTIFY_API_KEY: "sk-..." },
  models: {
    mode: "merge",
    providers: {
      routify: {
        baseUrl: "https://api.routify.ru/v1",
        apiKey: "${ROUTIFY_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "openai/gpt-5.4",
            name: "GPT-5.4",
            reasoning: false,
            input: ["text"],
            contextWindow: 1000000,
            maxTokens: 32000
          },
          {
            id: "anthropic/claude-sonnet-4-6",
            name: "Claude Sonnet 4.6",
            reasoning: false,
            input: ["text"],
            contextWindow: 200000,
            maxTokens: 16000
          },
          {
            id: "google/gemini-2.5-pro",
            name: "Gemini 2.5 Pro",
            reasoning: true,
            input: ["text"],
            contextWindow: 1000000,
            maxTokens: 65536
          }
        ]
      }
    }
  },
  agents: {
    defaults: {
      model: { primary: "routify/openai/gpt-5.4" }
    }
  }
}
```

<Note>
  The API key is stored in the `env` section and substituted via `${ROUTIFY_API_KEY}`. Do not hardcode the key directly in `apiKey`.
</Note>

### Step 3: Choose Your Default Model

Set your preferred model in `agents.defaults.model.primary` using the format `routify/<model-id>`:

```json5 theme={null}
agents: {
  defaults: {
    model: { primary: "routify/openai/gpt-5.4" }
  }
}
```

Popular models for OpenClaw:

| Model             | ID                            | Description                 |
| ----------------- | ----------------------------- | --------------------------- |
| GPT-5.4           | `openai/gpt-5.4`              | OpenAI flagship model       |
| GPT-5.4 Mini      | `openai/gpt-5.4-mini`         | Fast and cost-efficient     |
| Claude Sonnet 4.6 | `anthropic/claude-sonnet-4-6` | Strong Anthropic model      |
| Gemini 2.5 Pro    | `google/gemini-2.5-pro`       | Google model with reasoning |

Browse all available models at [routify.ru/models](https://routify.ru/models).

### Step 4: Launch OpenClaw

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

OpenClaw will now route requests through Routify.

## Adding Models

To add a new model, append an object to the `models` array in your `routify` provider:

```json5 theme={null}
{
  id: "deepseek/deepseek-r1",
  name: "DeepSeek R1",
  reasoning: true,
  input: ["text"],
  contextWindow: 131072,
  maxTokens: 32000
}
```

Key fields:

| Field           | Description                                                               |
| --------------- | ------------------------------------------------------------------------- |
| `id`            | Model ID from the Routify catalog                                         |
| `name`          | Display name                                                              |
| `reasoning`     | `true` for reasoning models (o-series, DeepSeek R1, Gemini with thinking) |
| `input`         | Input types: `["text"]` or `["text", "image"]`                            |
| `contextWindow` | Context window size                                                       |
| `maxTokens`     | Maximum output tokens                                                     |

## Reliability and Failover

Routify automatically routes requests across available providers. If a provider is unavailable, requests fail over to another upstream without changes to your OpenClaw configuration.

## Common Errors

### Authentication errors (401/403)

**Fix:**

1. Verify your API key is valid at [routify.ru/settings](https://routify.ru/settings)
2. Check that you have sufficient balance
3. Ensure your key hasn't been revoked

### Model not found (404)

**Fix:**

1. Verify the model ID in the [Routify catalog](https://routify.ru/models)
2. Use the `<provider>/<model>` format (e.g., `openai/gpt-5.4`)
3. Make sure the model is listed in the `models` array of your provider config in OpenClaw

## Resources

* [OpenClaw](https://openclaw.ai/)
* [OpenClaw Documentation](https://docs.openclaw.ai/)
* [Routify Models](https://routify.ru/models)
* [Routify API](https://api.routify.ru)
