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

# OpenClaw

> Connect OpenClaw to NagaAI through the OpenAI-compatible API.

[OpenClaw](https://openclaw.ai) is an open-source personal AI assistant that can run on your own devices and connect to messaging channels you already use.

OpenClaw can use NagaAI through the OpenAI-compatible Chat Completions endpoint.

## Prerequisites

* OpenClaw installed and running
* A standard NagaAI API key from the [NagaAI Dashboard](https://naga.ac/dashboard)

## Configuration

<Steps>
  <Step title="Get a NagaAI API key">
    Create an API key in the dashboard.

    <Info>
      If you’re new to NagaAI, follow the [Quickstart](/get-started/quickstart) first.
    </Info>
  </Step>

  <Step title="Update your OpenClaw config">
    Open `~/.openclaw/openclaw.json` and add a provider named `nagaai`.

    Use this as a template and replace `YOUR_MODEL_ID` with a real NagaAI model ID:

    ```json theme={null}
    {
      "models": {
        "mode": "merge",
        "providers": {
          "nagaai": {
            "baseUrl": "https://api.naga.ac/v1",
            "apiKey": "YOUR_API_KEY",
            "api": "openai-completions",
            "models": [
              {
                "id": "YOUR_MODEL_ID",
                "name": "NagaAI model",
                "api": "openai-completions"
              }
            ]
          }
        }
      },
      "agents": {
        "defaults": {
          "model": {
            "primary": "nagaai/YOUR_MODEL_ID"
          }
        }
      }
    }
    ```

    <Note>
      If your OpenClaw setup expects more model metadata, copy an existing provider entry and only change the base URL, API key, and model ID.
    </Note>
  </Step>

  <Step title="Apply the config">
    Apply the updated file and restart OpenClaw if needed:

    ```bash theme={null}
    openclaw gateway config.apply --file ~/.openclaw/openclaw.json
    ```
  </Step>

  <Step title="Verify the connection">
    Start OpenClaw and run a simple prompt. If the assistant responds and your selected model is shown correctly, the integration is working.
  </Step>
</Steps>

## Notes

* **Base URL** must include `/v1`: `https://api.naga.ac/v1`
* OpenClaw model names use the provider prefix, for example: `nagaai/YOUR_MODEL_ID`
* Pick a current model from [naga.ac/models](https://naga.ac/models)
* Keep real API keys out of version control
