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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Use AIsa in OpenClaw

> Add AIsa as a remote MCP server in OpenClaw with one command and a browser sign-in. Optionally use AIsa as the LLM provider.

OpenClaw has a built-in MCP client. Add AIsa as a remote MCP server, sign in once, and your OpenClaw agents can discover and call AIsa capabilities across web research, finance, social, SEO, sales, and more.

AIsa MCP server:

```txt theme={null}
https://mcp.aisa.one/mcp
```

This guide has two parts:

1. Add the AIsa MCP server so OpenClaw can use AIsa's data and tools.
2. Optionally, configure AIsa as OpenClaw's LLM provider.

## 1. Connect AIsa capabilities

### Step 1: Add the server

```bash theme={null}
openclaw mcp add aisa --url https://mcp.aisa.one/mcp --transport streamable-http --timeout 30 --auth oauth
```

> [!NOTE]
>
> Keep `--transport streamable-http` and `--timeout 30`. Without `--transport`, OpenClaw connects over SSE and the server rejects it with `405`. Without `--timeout`, the connection test can time out.

### Step 2: Sign in

```bash theme={null}
openclaw mcp login aisa
```

OpenClaw prints an authorization URL. Open it, sign in to AIsa, and approve access. The browser is then redirected to a local callback URL (`http://127.0.0.1:8989/oauth/callback?code=...`); the page may not load. Copy the `code` value from the address bar and finish the sign-in:

```bash theme={null}
openclaw mcp login aisa --code <code>
```

> [accordion] Use your API key instead of OAuth
>
> For headless hosts, pass the API key as a Bearer header instead of `--auth oauth`. The single quotes keep `${AISA_API_KEY}` unexpanded, so OpenClaw stores the reference and reads the key from the environment at runtime instead of saving it in `openclaw.json`:
>
> ```bash theme={null}
> export AISA_API_KEY="sk-aisa-..."
> openclaw mcp add aisa --url https://mcp.aisa.one/mcp --transport streamable-http --timeout 30 \
>   --header 'Authorization=Bearer ${AISA_API_KEY}'
> ```
>
> `AISA_API_KEY` must be set in the environment that runs OpenClaw, or in the `env` block of `openclaw.json`.

### Step 3: Verify and reload

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

The output should include `aisa: 7 tools`. Restart the gateway so running agents pick up the server:

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

OpenClaw now has the AIsa tools. `search`, `list_categories`, `get_details`, `batch_get_schema`, and `batch_quote` (prices exact calls without running them) are free; `use` and `batch_use` run calls and are billed per call.

Try:

```txt theme={null}
Use AIsa capabilities to search the web and summarize the latest information about OpenClaw.
```

## 2. Optional: use AIsa as the LLM provider

OpenClaw can also route its agents' LLM requests through AIsa. Edit `openclaw.json` directly for full control over the model configuration: custom model lists, fallback chains, credentials in OpenClaw's auth store, or per-channel routing.

### Step 1: Get your AIsa API key

**1. Log in to the dashboard**

[console.aisa.one](https://console.aisa.one/)

**2. Navigate to API Keys**

[Console → API Keys](https://console.aisa.one/api-keys)

**3. Create a new key**

Give it a label like `openclaw-local`. Copy the value (starts with `sk-aisa-`) immediately — it is shown only once.

### Step 2: Set your API key

Add the key to `~/.openclaw/openclaw.json` or export it in your shell:

```bash theme={null}
export AISA_API_KEY="sk-aisa-..."
```

> [!TIP]
>
> Prefer an environment variable over hardcoding the key in `openclaw.json`. See [Authentication](https://aisa.one/docs/guides/authentication.md) for rotation and storage best practices.

### Step 3: Configure the AIsa provider

Add this block to your `~/.openclaw/openclaw.json`:

```json theme={null}
{
  "env": {
    "AISA_API_KEY": "sk-aisa-..."
  },
  "models": {
    "mode": "merge",
    "providers": {
      "aisa": {
        "baseUrl": "https://api.aisa.one/v1",
        "apiKey": "${AISA_API_KEY}",
        "api": "openai-completions",
        "models": [
          { "id": "gpt-5.4-mini", "name": "GPT-5.4 Mini" },
          { "id": "kimi-k2.5", "name": "Kimi K2.5" },
          { "id": "claude-opus-4-8", "name": "Claude Opus 4.8" },
          { "id": "gemini-3.8-flash", "name": "Gemini 3.8 Flash" },
          { "id": "deepseek-v4.1-flash", "name": "DeepSeek V4.1 Flash" },
          { "id": "qwen3.7-max", "name": "Qwen3.7 Max" },
          { "id": "MiniMax-M3", "name": "MiniMax M3" },
          { "id": "glm-5", "name": "GLM 5" }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "aisa/kimi-k2.5"
      },
      "models": {
        "aisa/kimi-k2.5": {}
      }
    }
  }
}
```

OpenClaw now recognizes the `aisa` provider. Reference any model using the `aisa/<model-id>` format.

### Step 4: Restart OpenClaw

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

Your agents will now route requests through AIsa.

### Video walkthrough

[OpenClaw + AIsa manual setup](https://www.youtube.com/embed/mlSivxqRPTI)

## LLM model format

Always use the `aisa/<model-id>` format — for example, `aisa/kimi-k2.5`, `aisa/gpt-5.4`, or `aisa/claude-opus-4-8`. Add any supported model to the `models` array in your provider config; see the full list in the [model catalog](https://aisa.one/docs/guides/models.md).

## Advanced configuration

### Fallback chains

If the primary model fails (due to an upstream outage or rate limit), OpenClaw can automatically retry with a fallback model:

```json theme={null}
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "aisa/kimi-k2.5",
        "fallbacks": ["aisa/gpt-5.4-mini"]
      },
      "models": {
        "aisa/kimi-k2.5": {},
        "aisa/gpt-5.4-mini": {}
      }
    }
  }
}
```

### Store the key in OpenClaw's auth store

Keep your API key out of `openclaw.json` by saving it in OpenClaw's local auth store:

```bash theme={null}
printf "%s\n" "$AISA_API_KEY" | openclaw models auth paste-api-key --provider aisa
```

The key is saved under the `aisa:manual` profile (pass `--profile-id` to name it differently). OpenClaw resolves the credential from the auth store, so you can remove `apiKey` from `models.providers.aisa`.

### Per-channel models

Run a different model in specific chats. Keys under `channels.modelByChannel.<platform>` are channel or group IDs on that platform; values are `aisa/<model-id>`:

```json theme={null}
{
  "channels": {
    "modelByChannel": {
      "telegram": {
        "-1001234567890": "aisa/kimi-k2.5"
      },
      "discord": {
        "123456789012345678": "aisa/claude-opus-4-8"
      }
    }
  }
}
```

OpenClaw validates `openclaw.json` strictly: unknown top-level keys such as `telegram` or `discord` make the Gateway refuse to start.

## Monitoring usage

Track your usage and per-request details in the [AIsa dashboard](https://console.aisa.one). See [Usage](https://aisa.one/docs/guides/dashboard/overview.md#usage) for per-request details and spend breakdowns.

## Troubleshooting

> [accordion] 'No API key found for provider aisa'
>
> **Fix:**
>
> 1. Confirm `AISA_API_KEY` is set: `echo $AISA_API_KEY`
> 2. Verify `openclaw.json` references `${AISA_API_KEY}` (not a literal string).
> 3. Restart OpenClaw so it re-reads environment variables.
> 4. As a last resort, hardcode the key to confirm the rest of the config works, then move it back to an environment variable.

> [accordion] Authentication errors (401 / 403)
>
> **Fix:**
>
> 1. Confirm the key is valid in the [dashboard](https://console.aisa.one).
> 2. Ensure `baseUrl` is exactly `https://api.aisa.one/v1` (with no trailing slash).
> 3. See [Authentication](https://aisa.one/docs/guides/authentication.md) for rotation guidance.

> [accordion] Model not working
>
> **Fix:**
>
> 1. Double-check the model ID against the [catalog](https://aisa.one/docs/guides/models.md).
> 2. Make sure the model is listed in `models.providers.aisa.models`.
> 3. Reference it as `aisa/<model-id>`.

> [accordion] AIsa tools missing
>
> **Fix:**
>
> 1. Run `openclaw mcp list` and confirm **aisa** is configured with `streamable-http`.
> 2. Run `openclaw mcp status --verbose` to check the sign-in; if needed, run `openclaw mcp login aisa` again.
> 3. Run `openclaw gateway restart` so running agents reload the server.

> [accordion] 'SSE error: Non-200 status code (405)' or 'Request timed out'
>
> **Fix:** `openclaw mcp add` tests the connection before saving, so a failed add saves nothing. Run it again with `--transport streamable-http --timeout 30`. To replace an existing entry, run `openclaw mcp unset aisa` first.

> [accordion] 'Blocked: resolves to private/internal/special-use IP address'
>
> **Fix:** OpenClaw blocks hosts that resolve to private or special-use addresses. A proxy in fake-IP mode (for example Clash or Surge) can make `clerk.aisa.one` resolve this way. Exclude `aisa.one` from fake-IP, or use the API key option instead of OAuth.

## Related

> [card] [Authentication](https://aisa.one/docs/guides/authentication.md)
>
> API key lifecycle, storage, and best practices.

> [card] [Model Catalog](https://aisa.one/docs/guides/models.md)
>
> Current model IDs, context windows, endpoints, capabilities, and billing notes.

> [card] [OpenClaw docs](https://docs.openclaw.ai/)
>
> Official OpenClaw documentation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.