Source: https://ailoot.ai/docs/integrations/claude-code/
Canonical: https://ailoot.ai/docs/en/integrations/claude-code/
Language: en

[Terminal agents](https://ailoot.ai/docs/en/integrations/#agents) 

# Claude Code

[Markdown](https://ailoot.ai/docs/en/integrations/claude-code/index.md)

Terminal agent · Anthropic Messages

| Format | Where to set it up |
| --- | --- |
| Anthropic Messages | Environment variables or the "env" block in ~/.claude/settings.json (for a single project, .claude/settings.local.json); VS Code extension — claudeCode.environmentVariables; check with the /status command |

## [](https://ailoot.ai/docs/integrations/claude-code/#setup)Setup

Copy the configuration and replace `sk-...` with your key from the Ailoot Dashboard. Prefer storing the key in the environment variable `AILOOT_API_KEY`, if the application supports it.

Before starting, request GET /v1/models with your Ailoot key. Choose an exact model ID whose methods include POST /v1/messages, then use that ID in the configuration. For agents, also check tool support and the features required by your client version.

`~/.claude/settings.json`

```json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.ailoot.ai",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
  }
}
```

```bash
export AILOOT_API_KEY="sk-..."
export ANTHROPIC_AUTH_TOKEN="$AILOOT_API_KEY"
claude
```

Example model: `claude-sonnet-5-5`. Choose any other model from the [catalog](https://ailoot.ai/models/en/) — check that it supports the format you need.

## [](https://ailoot.ai/docs/integrations/claude-code/#notes)Good to know

Use a URL without /v1: Claude Code adds /v1/messages itself. ANTHROPIC\_AUTH\_TOKEN is sent as Authorization: Bearer, ANTHROPIC\_API\_KEY as x-api-key; Ailoot accepts both. CLAUDE\_CODE\_ENABLE\_GATEWAY\_MODEL\_DISCOVERY=1 loads our models into /model through /v1/models. For 400 errors about unknown fields, use CLAUDE\_CODE\_DISABLE\_EXPERIMENTAL\_BETAS=1. Anthropic's documentation does not support using Claude Code with non-Claude models through a gateway, although our /v1/messages endpoint serves them; we recommend Claude models. Remote Control and voice input are unavailable when using a gateway.

## [](https://ailoot.ai/docs/integrations/claude-code/#check)Test

- For the Anthropic format, the URL is `https://api.ailoot.ai` without `/v1`.
- Ask a short question. If you get an error, check the code and Request ID, then consult [Errors and limits](https://ailoot.ai/docs/en/errors/).
- 404 immediately after setup almost always means the URL is wrong: an extra or missing `/v1`.
- 402 — insufficient balance for the reserve. Agents reserve more than chat: [why](https://ailoot.ai/docs/en/billing/reserve/).

Application documentation: [https://code.claude.com/docs/en/llm-gateway-connect](https://code.claude.com/docs/en/llm-gateway-connect)

Still have questions? Send your Request ID and a description — we'll help you troubleshoot.[Contact support](mailto:support@ailoot.ai)

## Connect NotebookLM to Claude Code with a community MCP server

The PleasePrompto community server automates Chrome. It is separate from the official Google product and Claude Code; it does not use an Ailoot API key or Ailoot billing. The procedure follows the maintainer’s documentation.

Use Node.js 18 or later, Chrome and a Google account with access to your notebook. Review the linked maintainer documentation before installing.

Register the local server in Claude Code:

```bash
claude mcp add notebooklm -- npx notebooklm-mcp@latest
```

In Claude Code, open /mcp and select the notebooklm server. Ask it to call `setup_auth`. Complete Google sign-in in the Chrome window opened by that server, using the account with access to the notebook. Then call `get_health` and check that `authenticated` is true.

Copy your real notebook URL from the browser. Ask Claude Code to call `ask_question` with that URL in `notebook_url`, your question in question, and `source_format` set to `footnotes`. These are documented tool fields; use your actual URL rather than an example notebook ID. Check the returned answer and citations. Reuse the returned `session_id` only for follow-up questions about the same notebook.

### Transfer notes without MCP

Google also documents Export to Docs for a notebook note. Open the exported document and save the text you want Claude Code to read in your project. This is a manual transfer. Later edits in Docs do not synchronize with the notebook, and sharing permissions do not carry over.

Sources and exact tool schema: [maintainer](https://github.com/PleasePrompto/notebooklm-mcp#connect-to-claude-code) · [tools](https://github.com/PleasePrompto/notebooklm-mcp/blob/main/docs/tools.md) · [flow](https://github.com/PleasePrompto/notebooklm-mcp/blob/main/docs/usage-guide.md#first-time-setup) · [claude](https://code.claude.com/docs/en/mcp) · [google](https://support.google.com/notebooklm/answer/16262519?hl=en)

## Ailoot · The company and its project portfolio





Ailoot combines established operating experience, a large client base, stable service and ongoing KPI control.





The company and its project portfolio: millions of customers; monthly sales in the billions.





Ailoot brings that operating experience to API access for AI features in customer products, agents, applications and automations.
