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

# OpenClaw

> Connect OpenClaw to Eden AI and route your agent through 500+ models with automatic fallbacks and a single API key.

export const TechArticleSchema = ({title, description, path, articleSection, about, proficiencyLevel = "Beginner", dependencies, keywords = [], datePublished, dateModified, image, inLanguage = "en"}) => {
  const baseUrl = "https://www.edenai.co/docs";
  const canonicalUrl = `${baseUrl}/${path}`.replace(/\/+$/, "");
  const ogParams = new URLSearchParams({
    division: articleSection || "",
    title: title || "",
    description: description || ""
  });
  const resolvedImage = image || `https://edenai.mintlify.app/_mintlify/api/og?${ogParams.toString()}`;
  const data = {
    "@context": "https://schema.org",
    "@type": "TechArticle",
    "@id": `${canonicalUrl}#techarticle`,
    mainEntityOfPage: {
      "@type": "WebPage",
      "@id": canonicalUrl
    },
    headline: title,
    name: title,
    description: description,
    url: canonicalUrl,
    inLanguage: inLanguage,
    isPartOf: {
      "@type": "WebSite",
      name: "Eden AI Documentation",
      url: baseUrl
    },
    author: [{
      "@type": "Organization",
      name: "Eden AI",
      url: "https://www.edenai.co/"
    }],
    publisher: {
      "@type": "Organization",
      name: "Eden AI",
      url: "https://www.edenai.co/",
      logo: {
        "@type": "ImageObject",
        url: "https://www.edenai.co/assets/logo.png"
      }
    }
  };
  if (articleSection) data.articleSection = articleSection;
  if (about) data.about = {
    "@type": "Thing",
    name: about
  };
  if (proficiencyLevel) data.proficiencyLevel = proficiencyLevel;
  if (dependencies) data.dependencies = dependencies;
  if (keywords && keywords.length) data.keywords = keywords;
  if (datePublished) data.datePublished = datePublished;
  if (dateModified) data.dateModified = dateModified;
  data.image = Array.isArray(resolvedImage) ? resolvedImage : [resolvedImage];
  const json = JSON.stringify(data);
  const schemaId = `techarticle-${canonicalUrl}`;
  React.useEffect(() => {
    if (typeof document === "undefined") return;
    document.querySelectorAll(`script[data-schema-id="${schemaId}"]`).forEach(n => n.remove());
    const script = document.createElement("script");
    script.type = "application/ld+json";
    script.dataset.schemaId = schemaId;
    script.textContent = json;
    document.head.appendChild(script);
    return () => script.remove();
  }, [json, schemaId]);
  return null;
};

<TechArticleSchema title={"OpenClaw"} description={"Connect OpenClaw to Eden AI and route your agent through 500+ models with automatic fallbacks and a single API key."} path="v3/integrations/openclaw" articleSection="Autonomous Agents" about={"Autonomous AI Agents"} proficiencyLevel="Intermediate" keywords={["Eden AI", "AI API", "OpenClaw"]} datePublished="2026-05-06T00:00:00Z" dateModified="2026-06-30T00:00:00Z" />

Connect [OpenClaw](https://openclaw.ai) to Eden AI and route your agent through 500+ models with automatic fallbacks and a single API key.

## Overview

OpenClaw is a terminal-based AI coding agent. By pointing it at Eden AI, you get:

* **500+ models**: Access OpenAI, Anthropic, Google, and more through a single API key
* **One key, many providers**: Switch models by changing a single config value — no per-provider keys
* **Automatic fallbacks**: Requests reroute to healthy providers if one goes down

Prefer a video walkthrough? Follow along on [YouTube](https://youtu.be/HxIAYOQT90Q).

## Prerequisites

* OpenClaw already installed. If not, see the [OpenClaw install guide](https://github.com/openclaw/openclaw)
* Eden AI API key from [app.edenai.run](https://app.edenai.run) → **API Keys**

## Setup

### 1. Add Eden AI as a custom provider

OpenClaw stores its config at `~/.openclaw/openclaw.json` (on Windows: `%USERPROFILE%\.openclaw\openclaw.json`). Open it in your editor of choice and add the Eden AI provider with a function-calling model:

<CodeGroup>
  ```json ~/.openclaw/openclaw.json theme={null}
  {
    "models": {
      "mode": "merge",
      "providers": {
        "edenai": {
          "baseUrl": "https://api.edenai.run/v3",
          "apiKey": "YOUR_EDEN_AI_API_KEY",
          "api": "openai-completions",
          "models": [
            {
              "id": "anthropic/claude-sonnet-4-5",
              "name": "Eden AI — Claude Sonnet 4.5",
              "contextWindow": 128000,
              "maxTokens": 16384,
              "input": ["text", "image"],
              "cost": {
                "input": 0,
                "output": 0,
                "cacheRead": 0,
                "cacheWrite": 0
              },
              "reasoning": false,
              "compat": {
                "requiresAssistantAfterToolResult": true,
                "supportsTools": true
              }
            }
          ]
        }
      }
    },
    "agents": {
      "defaults": {
        "model": {
          "primary": "edenai/anthropic/claude-sonnet-4-5"
        }
      }
    }
  }
  ```
</CodeGroup>

Use any `provider/model` from the Eden AI catalog. Pick one that supports function calling, since OpenClaw sends tools with every request.

<Note>
  A few notes on the config above:

  * **`api`** must be `openai-completions`. Eden AI exposes an OpenAI-compatible endpoint, and this tells OpenClaw which wire protocol to use. If you omit it, the model fails to load with `no "api" specified`.
  * **`agents.defaults.model.primary`** makes the Eden AI model OpenClaw's default. It must be `edenai/<model-id>` — the provider key (`edenai`) plus the model's `id` (e.g. `edenai/anthropic/claude-sonnet-4-5`).
  * **`name`** is just the display label shown in OpenClaw's model picker. If you switch `id` to another model, rename this field too so the picker doesn't show a stale label.
  * **`cost`** values are placeholders. Billing is handled on the Eden AI side through your API key, so OpenClaw's local cost tracking isn't used here. Check per-request cost in the [Eden AI dashboard](https://app.edenai.run).
  * **`supportsTools: true`** enables tool/function calling through Eden AI. Set it to `false` only if you want to restrict this provider to plain chat completions.
</Note>

### 2. Configure OpenClaw interactively

Run the built-in wizard:

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

In the **Model and auth** step, select `Eden AI — Claude Sonnet 4.5` — the model you defined in Step 1 (it's already your default from the `agents.defaults.model.primary` setting). Accept the defaults for the remaining steps (Workspace, Gateway, Channels, etc.) unless you have specific local-networking or channel needs.

<Note>
  The wizard's **Gateway** step configures OpenClaw's *local* server (port, bind address, auth mode, tailscale exposure) — it does **not** ask for the Eden AI API URL. That's already set as `models.providers.edenai.baseUrl` in Step 1.
</Note>

### 3. Start OpenClaw

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

Every LLM call now flows through Eden AI, with built-in fallbacks, unified billing, and per-request cost visibility.

## Using specific models

Target any model by setting the `id` to a `provider/model` string:

```json theme={null}
"id": "anthropic/claude-opus-4-7"
```

Common choices:

| Model                         | Best for                                                            |
| ----------------------------- | ------------------------------------------------------------------- |
| `anthropic/claude-sonnet-4-5` | **Recommended default** — balanced reasoning, reliable tool calling |
| `anthropic/claude-opus-4-7`   | Maximum capability                                                  |
| `anthropic/claude-haiku-4-5`  | Fast and cheap                                                      |
| `openai/gpt-5`                | OpenAI's frontier model                                             |
| `google/gemini-2.5-pro`       | Long context, multimodal                                            |

Browse the full catalog at [app.edenai.run/models](https://app.edenai.run/models).

## Troubleshooting

### `401 Unauthorized`

Verify your Eden AI key — grab a fresh one at [app.edenai.run](https://app.edenai.run) → **API Keys**. Check for leading/trailing spaces.

### `model not found`

Ensure the `id` uses the `provider/model` format (e.g. `anthropic/claude-sonnet-4-5`). No bare model names.

### `no "api" specified`

The provider is missing its `api` field. Set `"api": "openai-completions"` at the provider level (see Step 1) — Eden AI uses the OpenAI-compatible protocol.

### Connection issues

Confirm the base URL is exactly `https://api.edenai.run/v3` and check Eden AI status at [app-edenai.instatus.com](https://app-edenai.instatus.com).

## Next Steps

* [Hermes Agent](./hermes) - Self-hosted, persistent AI agent from Nous Research
* [Claude Code](./claude-code) - Official Claude CLI
* [OpenCode](./opencode) - Terminal-based AI coding assistant
