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

# OpenClaw

> Use Edgee with OpenClaw to compress tokens, route requests, and observe every session.

Edgee's OpenAI-compatible API works with OpenClaw, letting you route all model traffic through Edgee to gain token compression, intelligent routing, and observability — without changing how you use OpenClaw day-to-day.

## Setup

<Steps>
  <Step title="Get your Edgee API key">
    In the [Edgee Console](https://www.edgee.ai), navigate to **API Keys**, click **Create API Key**, and copy the key. It will not be shown again.

    <Note>
      No Edgee account yet? [Create one here](https://www.edgee.ai) — the free tier includes observability and compression with no credit card required.
    </Note>
  </Step>

  <Step title="Add Edgee as a provider in OpenClaw">
    Open your OpenClaw config file at `~/.openclaw/openclaw.json` (create it if it doesn't exist) and add the `edgee` provider under `models.providers`:

    ```json5 theme={"dark"}
    {
      models: {
        mode: "merge",
        providers: {
          edgee: {
            baseUrl: "https://edgee.io/v1",
            apiKey: "sk-edgee-...",   // replace with your key
            api: "openai-completions",
            models: [
              {
                id: "claude-sonnet-4-6",
                name: "Claude Sonnet 4.6 (Edgee)",
                input: ["text"],
                contextWindow: 200000,
                maxTokens: 8096
              },
              {
                id: "gpt-4o",
                name: "GPT-4o (Edgee)",
                input: ["text", "image"],
                contextWindow: 128000,
                maxTokens: 16384
              }
            ]
          }
        }
      }
    }
    ```

    Replace `"sk-edgee-..."` with your Edgee API key. Add or remove models from the list to match what you want to use — see the [Edgee model list](/docs/llm-router/api-reference/models) for all available model IDs.

    <Tip>
      You can also set the key via an environment variable to avoid storing it in the file:

      ```json5 theme={"dark"}
      apiKey: "${EDGEE_API_KEY}"
      ```

      Then export `EDGEE_API_KEY` in your shell profile.
    </Tip>
  </Step>

  <Step title="Select an Edgee model in OpenClaw">
    Restart OpenClaw. Your Edgee models will appear in the model picker under the names you defined (e.g., "Claude Sonnet 4.6 (Edgee)").

    Select one to start routing requests through Edgee.
  </Step>
</Steps>

## Next Steps

* Browse the [model list](/docs/llm-router/api-reference/models) for all model IDs available through Edgee
* Enable [token compression](/docs/features/token-compression) to see what's being trimmed on each request
* Set up [observability](/docs/features/observability) to track usage across sessions
* Explore [retry and fallback](/docs/features/retry-and-fallback) to configure your provider failover chain

## Verify the connection

Send one request from the configured client, then open **Logs** in the same Edgee organization. Check the served model, provider, and key. For a CLI-launched coding agent, also inspect its session report.

If the request is missing, check that you launched through Edgee or saved the client’s gateway URL and Gateway API key. If it appears with an error, inspect the error before changing settings. See [Troubleshooting](/docs/troubleshooting) and [Gateway errors](/docs/llm-router/api-reference/errors).
