> ## 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](/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>

## Benefits

<CardGroup cols={2}>
  <Card title="Token compression" icon="archive">
    Edgee trims tool results, reduces tool surface area, and optionally shortens model output — cutting token costs with no change to output quality.
  </Card>

  <Card title="Any model, one key" icon="key">
    Access models from Anthropic, OpenAI, Mistral, and more through a single Edgee API key — no per-provider account management.
  </Card>

  <Card title="Automatic fallback" icon="shield-check">
    If a provider returns a 5xx or times out, Edgee reroutes to the next available provider. Your OpenClaw session continues uninterrupted.
  </Card>

  <Card title="Observability" icon="chart-line">
    Every request is logged in the Edgee Console with token counts, latency, compression savings, and cost breakdowns — per session and across your team.
  </Card>
</CardGroup>

<Note>
  Token compression applies to all requests routed through Edgee. You can bring your own provider keys via [BYOK](/features/byok) — compression still applies as long as requests pass through Edgee.
</Note>

## Next Steps

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