API Integration Docs

API Connection & Integration Guide

SubPool fully supports the most popular communication standards available today — including OpenAI Chat Completions, Anthropic Messages, and OpenAI Responses. This allows you to easily connect and use powerful AI models directly in Cursor, Claude Code, Codex, Cline, Continue, and many other development environments.

Quickstart in 3 simple steps

Create key

1. Get API Key

Create a personal API Key (format sk-...) at the Manage API Keys page.

Endpoint

2. Select Base URL

Configure official Base URL: https://subpool.net/v1 (or root URL).

Configuration

3. Paste into Tool

Open the Tools & Integrations page, choose your tool and operating system, copy the configuration snippet, and you're ready to go!

1. Request Authentication Headers

SubPool accepts 2 flexible authentication header formats. Simply choose the format compatible with your tool or library:

OpenAI Standard (Authorization)

Authorization: Bearer sk-xxxxxxxxxxxxxxxx

Anthropic Standard (x-api-key)

x-api-key: sk-xxxxxxxxxxxxxxxx

2. Detailed Tool-by-Tool Integration Guides

For detailed per-tool setup instructions, configuration files, and launch commands, open the Tools & Integrations page:

Detailed setup guides for every tool:

Visit Tools & Integrations for installation steps, configuration files, and launch commands for all AI CLI and IDE tools.

Go to Tools & Integrations →

Step 1: Choose Tool / IDE · Step 2: Choose Operating System

Claude Code CLI Integration

Terminal coding agent, Anthropic standard

~/.claude/settings.json
View all tool configuration guides →
Codex CLI Integration

OpenAI coding agent, Responses API standard

~/.codex/auth.json ~/.codex/config.toml
View all tool configuration guides →
Cline (VS Code Extension) Integration

VS Code extension coding agent

~/.cline/data/globalState.json ~/.cline/data/secrets.json
View all tool configuration guides →
Continue Extension Integration

Autocomplete & chat extension for VS Code / JetBrains

~/.continue/config.json
View all tool configuration guides →
OpenCode CLI Integration

Open-source multi-provider terminal coding agent

~/.config/opencode/opencode.json
View all tool configuration guides →
Hermes Agent Integration

YAML + .env configured coding agent

~/.hermes/config.yaml ~/.hermes/.env
View all tool configuration guides →
OpenClaw Integration

Multi-agent framework configured via JSON

~/.openclaw/openclaw.json
View all tool configuration guides →
Qwen Code CLI Integration

Alibaba terminal coding agent, OpenAI standard

~/.qwen/settings.json
View all tool configuration guides →
DeepSeek CLI Integration

TOML configured CLI, OpenAI standard

~/.deepseek/config.toml
View all tool configuration guides →
Claude Cowork Integration

Claude desktop app, configured via inference gateway

~/Library/Application Support/Claude-3p/
View all tool configuration guides →
Cursor IDE Integration

AI-native IDE based on VS Code

  1. Open Cursor → select Cursor Settings (or press Cmd+, / Ctrl+,).
  2. Go to section Models → under OpenAI API Key, paste your key.
  3. Enable switch Override OpenAI Base URL and enter:
View all tool configuration guides →

3. OpenAI Chat Completions

Fully compatible with the OpenAI v1 chat completions standard.

Request endpoint: POST /v1/chat/completions
curl
curl https://subpool.net/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
        "model": "switch-default",
        "messages": [
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Hello!"}
        ],
        "stream": false
      }'

4. Anthropic Messages

Fully compatible with the Anthropic Messages API standard.

Request endpoint: POST /v1/messages

For Claude Code and Anthropic native tools.

curl
curl https://subpool.net/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: $YOUR_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
        "model": "switch-default",
        "max_tokens": 1024,
        "messages": [
          {"role": "user", "content": "Hello!"}
        ]
      }'

5. OpenAI Responses

Support for the new OpenAI Responses API standard.

Request endpoint: POST /v1/responses

For Codex CLI.

curl
curl https://subpool.net/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
        "model": "switch-default",
        "input": "Hello!"
      }'

OpenAI Image Generation Protocol

OpenAI-compatible image generation API for models such as cx/gpt-5.5-image and ag/gemini-3.1-flash-image.

POST /v1/images/generations
curl
curl https://subpool.net/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
        "model": "cx/gpt-5.5-image",
        "prompt": "A calm lake at sunrise"
      }'

6. Active Models Library

All AI models ready to serve — compatible with OpenAI & Anthropic API standards.

View pricing & model list →

List of all active models and their token pricing.

Error Handling & Status Codes

Status Description
401 Unauthorized Invalid, missing, or revoked API key. Check Authorization header.
402 Payment Required Insufficient balance to process this request. Please top up.
404 Not Found Requested model not found or inactive. Verify model name.
429 Too Many Requests Rate limit or concurrency limit exceeded. Reduce request frequency.
500 / 502 / 503 Upstream Error Upstream provider error. Automatic failover will be attempted.