> Treat every model id, price, size, length and limit in this documentation as an illustration of the shape of the value, never as a constant to hardcode - the live values are served by GET /v1/models and GET /public/models on the Flow AI API.

# OpenClaw

> Use Flow AI models for your OpenClaw agents.

[OpenClaw](https://github.com/openclaw/openclaw) is an open-source agent platform that answers on Telegram, Discord, Slack, Signal, WhatsApp and more. Add Flow AI as a custom OpenAI-compatible provider.

### Set your key

```bash
export HYPERFLOW_API_KEY="sk-..."
```

### Add the provider

Add Flow AI to `~/.openclaw/openclaw.json`:

**`openclaw.json`**

```json5 title="openclaw.json"
{
  models: {
    providers: {
      flow: {
        baseUrl: "https://ai.hyperflow.fun/v1",
        apiKey: "${HYPERFLOW_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "openai/gpt-6-luna",
            name: "GPT-6 Luna",
            contextWindow: 1050000,
          },
          {
            id: "deepseek/deepseek-flash",
            name: "DeepSeek Flash",
          },
        ],
      },
    },
  },
  agents: {
    defaults: {
      model: {
        primary: "flow/openai/gpt-6-luna",
        fallbacks: ["flow/deepseek/deepseek-flash"],
      },
    },
  },
}
```

A model is referenced as `flow/` plus its Flow AI id. `fallbacks` are tried in order if the primary model fails.

### Start OpenClaw

```bash
openclaw gateway run
```

## A model per channel

Agents on different channels can use different models, such as a cheaper one for a busy Telegram group. Set `model.primary` in that channel's `agents.defaults`, using the same `flow/<model id>` form.

## Troubleshooting

* **No API key found**: check `echo $HYPERFLOW_API_KEY` in the shell that starts OpenClaw.
* **401**: the key is wrong, deleted or turned off; check it on [API keys](https://ai.hyperflow.fun/console/keys).
* **402**: your balance is too low.
* **Model not found**: the model must be listed under `models.providers.flow.models`, and its id must match the [Models page](https://ai.hyperflow.fun/models).