Tools & Integrations

Tool Connection Guides — Detailed Step-by-Step

Detailed guides to help you connect and use AI tools (Claude Code, Cursor, Codex CLI, OpenCode...) without requiring paid subscriptions from official providers, by directing the API endpoint directly to our platform at undefined.

Before you start — 3 things you need ready

1. API Key

Create at Manage API Keys, format sk-xxxxxxxx. Shows only once — save immediately.

2. Base URL

Use exact /v1. Use the URL shown in each tool's example. SubPool also tolerates a duplicated /v1 prefix, but omitting it is recommended when the tool appends /v1 itself.

3. Model ID

Get exact ID (e.g. claude-sonnet-4-6) at Pricing page — click copy icon next to any model.

Back to all tools SubPool Integrations
Claude Code

Claude Code

Terminal coding agent, Anthropic standard

Stable (Multilingual) Endpoint: /v1/messages
1

Requirement

This configuration works for both Claude Code CLI and Claude Code in Visual Studio Code. Install either the CLI (npm install -g @anthropic-ai/claude-code) or the Claude Code extension from the Visual Studio Code Marketplace. Node.js >= 18 is required either way.

Claude Code CLI
npm install -g @anthropic-ai/claude-code
Install extension on Visual Studio Code

2

Choose your OS


3

Choose how to set up

Fastest way about 1 minute

Step 1 — Open Terminal: press Cmd + Space, type Terminal, press Enter.

Step 2 — In the window that just opened, paste the command below and press Enter:

Terminal (macOS)
curl -fsSL /setup/claude-code/claude-code.sh | bash

The script asks for your SubPool API key, then lets you pick a model for each of the 4 roles Claude Code uses — FABLE, OPUS, SONNET, HAIKU (press Enter on any of them to use Model Switch, so you can change the model later from the website without rerunning the script). If a settings.json already exists, it is renamed to settings_backup_<timestamp>.json right next to it before the new one is written — nothing is ever deleted.

Verify Connection

Run claude in any folder and send a prompt. Response without 401 error confirms setup.

Back to all tools SubPool Integrations
Claude (Desktop App)

Claude (Desktop App)

Claude desktop app, configured via inference gateway

Endpoint: /v1/chat/completions
1

Prerequisites

  • Claude Desktop installed (macOS or Windows) — see Step 2 below to enable Developer Mode, a required step before anything else here.
  • Quit the app completely before editing the file. As with Cline, edits made while the app is running get overwritten when it saves its own state.
  • Only the macOS path is verified. The Windows path is inferred from where the app conventionally stores its config — if your machine has no such folder, use the lookup command in the Windows tab below.

2

Choose your OS


3

Connect the Gateway for the first time

On macOS there's nothing elaborate to do: on the app's opening screen (Get Started), just click Or sign in with Gateway.


4

Choose how to set up

Fastest way about 1 minute

Paste the single line below into a command window and press Enter. The script asks for your API key and model, then writes the config for you. You never have to find a hidden folder or edit JSON, and any existing file is backed up before it is replaced.

The script lists the Claude models active on your account for you to pick from (Model Switch and other providers' models don't work here).

Step 1 — Open Terminal: press Cmd + Space, type Terminal, press Enter.

Step 2 — In the window that just opened, paste the command below and press Enter:

Terminal (macOS)
curl -fsSL /setup/claude-app/claude-app.sh | bash

Verify Connection

Reopen Claude. If it shows a sign-in screen, choose Continue with Gateway (do not sign in with a claude.ai account). If that screen shows “Your provider setup needs a fix”, your inferenceModels field is still wrong — see the note above. Once past that screen, start a new session and send a short prompt to confirm the gateway points at SubPool.

Back to all tools SubPool Integrations
Codex CLI

Codex CLI

OpenAI coding agent, Responses API standard

Endpoint: /v1/responses
1

Prerequisites

  • Codex CLI installed via npm, or the Codex extension from the VS Code Marketplace — both share the config below.
  • Configured via TOML format — [model_providers.subpool] header is case sensitive.
  • If this machine has previously installed Codex and done `codex login` with a ChatGPT account, log out first: open a terminal and run codex logout.

2

Choose your OS


3

Choose how to set up

Fastest way about 1 minute

Paste the single line below into a command window and press Enter. The script asks for your API key and model, then writes the config for you. You never have to find a hidden folder or edit JSON, and any existing file is backed up before it is replaced.

Step 1 — Open Terminal: press Cmd + Space, type Terminal, press Enter.

Step 2 — In the window that just opened, paste the command below and press Enter:

Terminal (macOS)
curl -fsSL /setup/codex/codex.sh | bash

Check the model after opening Codex

After configuring and opening Codex, if the model shown is Custom, that's correct — use it as-is. Do NOT switch to a different model from Codex's built-in list — switching makes Codex fall back to OpenAI's default provider (no longer going through SubPool), which won't work.

Verify Connection

Open Codex, start a new chat session, and send a short message. A normal reply (no 401 or invalid api key error) confirms it's talking to SubPool.

Back to all tools SubPool Integrations
ChatGPT (Desktop App)

ChatGPT (Desktop App)

The Codex tab built into OpenAI's official ChatGPT Desktop App

Stable (Multilingual) Endpoint: /v1/responses
1

Prerequisites

  • ChatGPT (Desktop App) installed, with the Codex tab open in the app.
  • ChatGPT Desktop App reads the same ~/.codex/config.toml and auth.json as Codex CLI/the VS Code extension (confirmed in OpenAI's official docs) — there's no separate config file for it.
  • If this machine has previously signed in to a ChatGPT account in Codex/ChatGPT App, sign out first: run codex logout in a terminal if Codex CLI is installed, or sign out directly in the app (account/profile menu) if you have no terminal.

Note

Quit ChatGPT (Desktop App) completely before running the script — if it's still running, it can overwrite what you just wrote when you later quit it.


2

Choose your OS


3

Choose how to set up

Fastest way about 1 minute

Paste the single line below into a command window and press Enter. The script asks for your API key and model, then writes the config for you. You never have to find a hidden folder or edit JSON, and any existing file is backed up before it is replaced.

Step 1 — Open Terminal: press Cmd + Space, type Terminal, press Enter.

Step 2 — In the window that just opened, paste the command below and press Enter:

Terminal (macOS)
curl -fsSL /setup/chatgpt-app/chatgpt-app.sh | bash

Check the model after opening the Codex tab

After configuring and opening the Codex tab, if the model shown is Custom, that's correct — use it as-is. Do NOT switch to a different model from the built-in list — switching makes the app fall back to OpenAI's default provider (no longer going through SubPool), which won't work.

Verify Connection

Open the Codex tab in ChatGPT (Desktop App), start a new session, and send a short message. A normal reply (no auth error) confirms it's talking to SubPool.

Back to all tools SubPool Integrations
OpenCode

OpenCode CLI

Open-source multi-provider terminal coding agent

Endpoint: /v1/chat/completions
1

Prerequisites

  • OpenCode CLI installed.

2

Choose your OS


3

Choose how to set up

Fastest way about 1 minute

Paste the single line below into a command window and press Enter. The script asks for your API key and model, then writes the config for you. You never have to find a hidden folder or edit JSON, and any existing file is backed up before it is replaced.

Step 1 — Open Terminal: press Cmd + Space, type Terminal, press Enter.

Step 2 — In the window that just opened, paste the command below and press Enter:

Terminal (macOS)
curl -fsSL /setup/opencode/opencode.sh | bash

Verify Connection

Run opencode models subpool or use /models in the TUI. If the provider is missing, check provider.subpool and the models section in opencode.json.

Back to all tools SubPool Integrations
Cursor

Cursor IDE

AI-native IDE based on VS Code

Endpoint: /v1/chat/completions

Prerequisites

  • Latest version of Cursor IDE installed.
  • SubPool Key created in advance.

Configuration Steps

  1. Open Cursor → top right or menu Cursor → Settings → Cursor Settings (Cmd + , on macOS, Ctrl + , on Windows/Linux).
  2. In Settings window, select Models tab on left sidebar.
  3. Scroll down to API Keys, find OpenAI API Key — paste your SubPool key.
  4. Enable Override OpenAI Base URL switch, enter official Base URL (ending with /v1).
  5. Click Verify (if present) or close Settings — Cursor tests key automatically.
  6. Open AI chat (Cmd/Ctrl + L), select Add model if needed, type exact Model ID.
Cursor Settings → Models
OpenAI Base URL: /v1
OpenAI API Key:  sk-xxxxxxxxxxxxxxxx-xxxxxx-xxxxxxxx

Verify Connection

Open chat panel, send a test prompt. Normal response confirms active connection.

Note

Cursor caches verified models — if you change Base URL or key, delete old model entries and re-add them.

Back to all tools SubPool Integrations
Cline

Cline

VS Code extension coding agent

Endpoint: /v1/chat/completions

Prerequisites

  • VS Code and Cline extension installed.
  • Cline stores settings in 2 JSON files — editing directly on disk is faster and reliable.

Configuration Steps

  1. Quit VS Code completely before editing files.
  2. Edit ~/.cline/data/globalState.json for provider and model configuration.
  3. Edit ~/.cline/data/secrets.json for API key declaration.
  4. Reopen VS Code and confirm active model in Cline panel.
~/.cline/data/globalState.json
{
  "actModeApiProvider": "openai",
  "planModeApiProvider": "openai",
  "openAiBaseUrl": "",
  "openAiModelId": "switch-default",
  "planModeOpenAiModelId": "switch-default"
}
~/.cline/data/secrets.json
{
  "openAiApiKey": "sk-xxxxxxxxxxxxxxxx-xxxxxx-xxxxxxxx"
}

Verify Connection

Send a prompt in Cline panel. Response with tool execution indicates success.

Note

openAiBaseUrl here must NOT include /v1 suffix — Cline appends it automatically.

Back to all tools SubPool Integrations
Continue

Continue

Autocomplete & chat extension for VS Code / JetBrains

Endpoint: /v1/chat/completions

Prerequisites

  • Continue extension installed in VS Code or JetBrains.

Configuration Steps

  1. Open Continue settings or ~/.continue/config.json.
  2. Add SubPool configuration object to models array.
  3. Save file — Continue auto-reloads configuration.
  4. Select SubPool model from Continue chat dropdown.
~/.continue/config.json
{
  "models": [
    {
      "title": "SubPool",
      "provider": "openai",
      "model": "switch-default",
      "apiBase": "/v1",
      "apiKey": "sk-xxxxxxxxxxxxxxxx-xxxxxx-xxxxxxxx"
    }
  ]
}

Verify Connection

Send a chat prompt in Continue. Streaming response confirms success.

Back to all tools SubPool Integrations
Hermes Agent

Hermes Agent

YAML + .env configured coding agent

Endpoint: /v1/chat/completions

Prerequisites

  • Hermes Agent installed.
  • Hermes separates config (YAML) and secrets (.env) — edit both.

Configuration Steps

  1. Configure ~/.hermes/config.yaml for model and custom provider.
  2. Configure ~/.hermes/.env with OPENAI_API_KEY.
  3. Restart Hermes Agent.
~/.hermes/config.yaml
model:
  default: "switch-default"
  provider: "custom"
  base_url: "/v1"
~/.hermes/.env
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxx-xxxxxx-xxxxxxxx

Verify Connection

Run Hermes Agent and send a prompt. No auth errors confirms connection.

Back to all tools SubPool Integrations
OpenClaw

OpenClaw

Multi-agent framework configured via JSON

Endpoint: /v1/chat/completions

Prerequisites

  • OpenClaw framework installed.

Configuration Steps

  1. Open/create ~/.openclaw/openclaw.json.
  2. Declare subpool provider in models.providers and set primary model to subpool/custom.
  3. Specify exact Model ID for both id and name.
  4. Restart OpenClaw.
~/.openclaw/openclaw.json
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "subpool/custom"
      }
    }
  },
  "models": {
    "providers": {
      "subpool": {
        "baseUrl": "/v1",
        "apiKey": "sk-xxxxxxxxxxxxxxxx-xxxxxx-xxxxxxxx",
        "apiType": "openai",
        "models": [{ "id": "switch-default", "name": "switch-default" }]
      }
    }
  }
}

Verify Connection

Run default agent and verify subpool provider log activity.

Back to all tools SubPool Integrations
Qwen Code

Qwen Code CLI

Alibaba terminal coding agent, OpenAI standard

Endpoint: /v1/chat/completions

Prerequisites

  • Qwen Code installed via npm: npm install -g @qwen-code/qwen-code

Configuration Steps

  1. Open/create ~/.qwen/settings.json.
  2. Set security.auth.selectedType to openai and paste SubPool key into openaiApiKey.
  3. Set model.openaiBaseUrl and model.name.
  4. Run qwen in terminal.
~/.qwen/settings.json
{
  "security": {
    "auth": {
      "selectedType": "openai",
      "openaiApiKey": "sk-xxxxxxxxxxxxxxxx-xxxxxx-xxxxxxxx"
    }
  },
  "model": {
    "openaiBaseUrl": "/v1",
    "name": "switch-default"
  }
}

Verify Connection

Run qwen and send a prompt. Normal response confirms connection.

Back to all tools SubPool Integrations
DeepSeek CLI

DeepSeek CLI

TOML configured CLI, OpenAI standard

Endpoint: /v1/chat/completions

Prerequisites

  • DeepSeek CLI installed.

Configuration Steps

  1. Open/create ~/.deepseek/config.toml.
  2. Declare [providers.openai] table with base_url, api_key, model.
  3. Save file and restart DeepSeek CLI.
~/.deepseek/config.toml
[providers.openai]
base_url = "/v1"
api_key = "sk-xxxxxxxxxxxxxxxx-xxxxxx-xxxxxxxx"
model = "switch-default"

Verify Connection

Open new CLI session after saving configuration.

Common Errors — Applies to All Tools

All tools listed above authenticate through the same SubPool gateway, so the errors below present identically whether you use Cursor, Codex, or any other tool. Read the error message to identify the root cause instantly.

Error Message HTTP Code Root Cause Fix / Solution
missing API key: provide Authorization: Bearer <key> or x-api-key: <key> 401 Request missing authentication header — key not configured or empty. Check tool configuration file and paste key into correct field.
invalid api key 401 Key header present but not matching any active key — invalid or revoked key. Create new key at Manage API Keys page and paste.
api key expired 403 Quota/prepaid key has expired. Create new key or switch to pay-as-you-go credit key.
api key quota exhausted 403 Quota key token allowance exhausted. Create new quota key or top up credit balance.
insufficient balance 402 Valid key but account balance insufficient for request. Top up account balance at Topup page.

Quick Error Isolation Tip

Before inspecting tool settings, make a direct curl call to the endpoint with your key. If curl succeeds but the tool fails, the issue is strictly inside local tool configuration, not your SubPool account.