Available models
—
SubPool provides a high-performance Universal AI Gateway fully compatible with OpenAI Chat Completions and Anthropic Messages protocols. Connect via official SDKs, cURL, or integrate seamlessly into your backend services.
SubPool is a high-performance universal AI gateway. Use one API key to access 50+ leading models from OpenAI, Anthropic, Google Gemini, DeepSeek, and other providers through industry-standard APIs.
| Parameter | Configuration value | Applies to |
|---|---|---|
| Base URL (OpenAI) | https://subpool.net/v1 |
OpenAI SDK, Cursor, Cline, OpenCode, Continue, Python & Node.js |
| Base URL (Anthropic) | https://subpool.net |
Claude Code CLI, Claude Desktop App, @anthropic-ai/sdk |
| API Key | sk-xxxxxxxxxxxxxxxx Create a key at Manage API keys | All requests to the SubPool Gateway |
| Model ID | claude-3-7-sonnet, gpt-4o, deepseek-chat... Find the exact model ID on the Pricing & Models | Automatically routed by model ID |
SubPool accepts both common authentication header formats. Choose the one supported by your tool or library:
Authorization: Bearer sk-xxxxxxxxxxxxxxxx
For the OpenAI Python/Node SDKs, cURL, LangChain, LlamaIndex, and Cursor.
x-api-key: sk-xxxxxxxxxxxxxxxx anthropic-version: 2023-06-01
For the Anthropic SDK, Claude Code CLI, and Claude Desktop.
Run a simple cURL command in your terminal to verify the connection and API key:
curl https://subpool.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SUBPOOL_API_KEY" \
-d '{
"model": "claude-3-7-sonnet",
"messages": [
{"role": "system", "content": "You are a helpful AI expert."},
{"role": "user", "content": "Hello! Please confirm the connection to the SubPool Gateway."}
],
"temperature": 0.7
}'
Sample success response (HTTP 200 OK)
{
"id": "chatcmpl-8zV3A4kL9Qx8p",
"object": "chat.completion",
"created": 1729061000,
"model": "claude-3-7-sonnet",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Connection successful! The SubPool Gateway is ready to process your request."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 18,
"total_tokens": 46
}
}
We provide detailed setup guides for Claude Code CLI, Cursor, Cline, Continue, OpenCode, and Codex CLI, including OS-specific instructions and one-click setup scripts.
The API follows the OpenAI API format and supports text generation, SSE streaming, tool/function calling, and vision.
curl https://subpool.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SUBPOOL_API_KEY" \
-d '{
"model": "claude-3-7-sonnet",
"messages": [
{"role": "system", "content": "You are a professional software architect."},
{"role": "user", "content": "Explain idempotent APIs with a clear example."}
],
"temperature": 0.7,
"max_tokens": 1500,
"stream": false
}'
| Field | Type | Description |
|---|---|---|
| model | string (required) | The target model ID (for example, claude-sonnet-5-5, gpt-6.1-sol, or deepseek-chat). |
| messages | array (required) | Messages using the role structure (`system`, `user`, `assistant`, `tool`) and content. |
| stream | boolean (optional) | When `true`, the server streams Server-Sent Events (SSE) token by token. Defaults to `false`. |
| temperature | number (optional) | Controls randomness, from 0.0 (more deterministic) to 2.0 (more creative). For coding, 0.2–0.7 is recommended. |
| max_tokens | integer (optional) | Maximum number of tokens to generate in the response. |
| tools | array (optional) | List of function definitions for OpenAI-compatible tool calling. |
For reasoning models such as DeepSeek R1 or Claude Sonnet with extended thinking, reasoning may be returned in the reasoning_content or in a separate reasoning block:
data: {"choices":[{"delta":{"reasoning_content":"First, let us analyze the base case..."}}]}
data: {"choices":[{"delta":{"content":"Here is the detailed solution..."}}]}
data: [DONE]
For Claude Code CLI, Claude Desktop, and applications using the official Anthropic SDK. Supports extended thinking and prompt caching.
curl https://subpool.net/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: $SUBPOOL_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-3-7-sonnet",
"max_tokens": 1500,
"system": "You are a senior software engineer.",
"messages": [
{"role": "user", "content": "Optimize the following SQL query for the fastest possible execution..."}
]
}'
system: "...", rather than inside the messages.max_tokens (for example: 1024, 2048, or 4096)."thinking": {"type": "enabled", "budget_tokens": 4096} to the request body to enable deeper reasoning.Analyze images, read documents with OCR, review UI/UX designs, and debug screenshots with leading vision models (GPT-6, Claude, Gemini).
SubPool Gateway accepts images directly in chat requests. You can provide a public URL or Base64-encoded string (data:image/jpeg;base64,...).
OCR & document reading
Extract tables, invoices, handwriting, and legal documents with high accuracy.
UI/UX & Frontend Code
Turn screenshots or Figma mockups into complete HTML/Tailwind/React code.
Chart analysis & debugging
Interpret financial charts, system architecture, and error logs captured from a terminal.
In the OpenAI format, a message’s content is an array containing both text and image blocks:
curl https://subpool.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SUBPOOL_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Analyze the system architecture in this diagram and identify potential bottlenecks:"},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/system-architecture.png",
"detail": "high"
}
}
]
}
],
"max_tokens": 1000
}'
For Claude models, you can send images using Anthropic’s native source object format:
curl https://subpool.net/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: $SUBPOOL_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-3-7-sonnet",
"max_tokens": 1500,
"messages": [
{
"role": "user",
"content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
}
},
{
"type": "text",
"text": "Describe this image and explain its key details."
}
]
}
]
}'
image/png), JPEG (image/jpeg), WEBP (image/webp) and GIF (image/gif).detail: "low" for quick image classification tasks that use only 85 fixed tokens. Use detail: "high" when you need to inspect small text or complex diagrams.SubPool returns standard HTTP status codes with detailed JSON error bodies to help developers debug and handle failures programmatically.
{
"error": {
"message": "Insufficient account balance to process this request. Please add funds.",
"type": "insufficient_quota",
"param": null,
"code": "balance_exhausted"
}
}
| HTTP status | Error | Cause & solution |
|---|---|---|
| 400 | Bad Request | Invalid JSON syntax or missing a required field (for example, model or messages). |
| 401 | Unauthorized | API key is invalid, disabled, or has an invalid Bearer header. Check the key on the API Keys page. |
| 402 | Payment Required | Your account balance is empty or too low for the estimated minimum charge. Add funds on the Top Up page. |
| 404 | Not Found | The model ID does not exist or is temporarily unavailable. Check the exact model ID on the pricing page. |
| 429 | Too Many Requests | Request rate limit exceeded (RPM/TPM). Use a retry strategy with exponential backoff. |
| 500 / 502 | Upstream Error | The upstream model provider returned an error. The system will retry through a backup route when available. |
Exponential Backoff & Jitter
For 429 or 503 errors, do not retry immediately. Increase the wait time between attempts (for example, 1s, 2s, 4s, and 8s with jitter) to avoid overloading the service.
Automatic balance monitoring
Handle 402 errors by notifying Slack/Telegram or setting a low-balance alert on the dashboard so your app is not interrupted.