Third-party Tool Integration
Applies to: Developers Updated: 2026-07-02
CloudRouter is compatible with the OpenAI / Anthropic protocols, so it can integrate with the vast majority of AI tools and frameworks that support a "custom Base URL". This guide is organized into three categories — command-line tools → AI coding IDEs/plugins → application development frameworks — with configuration methods for mainstream tools.
The API address is
https://api.cloudrouter.online, with route prefix/v1, and authentication viaAuthorization: Bearer sk-xxx.
Quick cheat sheet for what to fill in: for most tools you only need three things — ① Base URL:
https://api.cloudrouter.online/v1; ② API Key: your CloudRoutersk-Key (created and distributed by the Organization in the console); ③ Model name: the call name provided on the Call Guide page, either bare (e.g.claude-sonnet-4-6) or with a fingerprint (e.g.5MHXZWKA/gpt-4o) — see Call Guide & Dual Routing. The real path of the Anthropic protocol endpoint is/v1/messages: for tools that use the official SDK (such as Claude Code), just set the Base URL to the domain roothttps://api.cloudrouter.onlineand the SDK will automatically append/v1/messages; if a tool requires you to enter the full Base URL directly, usehttps://api.cloudrouter.online/v1. For tools not listed here, just apply the General Integration Principles.
Command-line tools (CLI)
1. Claude Code
Claude Code is Anthropic's official CLI tool; inject the CloudRouter config via environment variables.
In your shell config file (~/.zshrc or ~/.bashrc), set:
export ANTHROPIC_BASE_URL="https://api.cloudrouter.online"
export ANTHROPIC_API_KEY="YOUR_API_KEY"After saving, run source ~/.zshrc to apply, then use the claude command as usual.
Model tiers: In Claude Code, switch between the Opus / Sonnet / Haiku tiers via /model; CloudRouter routes to the corresponding model per the mapping. The specific available models are as shown on the console's "Call Guide".
Tip: prices are as shown on the "Model Marketplace" or the console's "Purchase" page.
2. Codex CLI
The OpenAI Codex CLI uses the OpenAI-compatible protocol; configure it via environment variables:
export OPENAI_BASE_URL="https://api.cloudrouter.online/v1"
export OPENAI_API_KEY="YOUR_API_KEY"Or specify a custom provider's base_url and model name in ~/.codex/config.toml, then start with that provider. See the Call Guide for the model name; bare name or with fingerprint both work.
3. Aider
Aider natively supports OpenAI-compatible endpoints; environment variables are recommended:
export OPENAI_API_BASE="https://api.cloudrouter.online/v1"
export OPENAI_API_KEY="YOUR_API_KEY"
# Add the openai/ prefix to the model name to use the compatible endpoint
aider --model openai/claude-sonnet-4-6You can also use the command-line switches --openai-api-base / --openai-api-key, or write them into .aider.conf.yml.
⚠️ Key point: when pointing at the compatible endpoint, the model name must carry the
openai/prefix, otherwise Aider resolves it against its built-in providers. If you use a fingerprint call name, the form is likeopenai/5MHXZWKA/gpt-4o(openai/is used by Aider to pick the provider and is stripped off, passing5MHXZWKA/gpt-4othrough to CloudRouter). It's recommended to test this three-segment form with small traffic first; if the fingerprint doesn't take effect, fall back to the bare nameopenai/claude-sonnet-4-6(routes to the routing group bound to this Key).
AI coding IDEs / plugins
The VSCode-family plugins below (Cline / Roo Code / Kilo Code / Continue, etc.) are configured almost identically: in the "OpenAI Compatible / custom provider" section, fill in the Base URL + API Key + model call name. See the Call Guide for the model call name; bare name or with fingerprint both work.
4. Cursor
Cursor supports custom OpenAI API configuration.
- Open Cursor Settings → Models
- Find the OpenAI API Key setting and enter your CloudRouter API Key
- Expand Override OpenAI Base URL and enter:
https://api.cloudrouter.online/v1 - Add the call name provided by the Call Guide (bare name or with fingerprint) to the model list, save, and verify the connection
Cursor shares the same lineage as VSCode, so the configuration system is consistent.
5. Cline (VSCode plugin)
- Click the settings icon in the top-right of the Cline panel
- Set API Provider to OpenAI Compatible
- Set Base URL to
https://api.cloudrouter.online/v1 - Set API Key to your CloudRouter Key
- Set Model ID to the call name provided by the Call Guide (e.g.
claude-sonnet-4-6, or with a fingerprint5MHXZWKA/gpt-4o)
💡 If you mainly use Claude models and want full native tool calling (reading/writing files, running commands), you can also set the Provider to Anthropic, with Base URL
https://api.cloudrouter.online(without/v1).
6. Roo Code / Kilo Code (VSCode plugins)
Both are Cline derivatives; the configuration flow is the same:
- Open the plugin settings panel (gear icon)
- Set API Provider to OpenAI Compatible
- Fill in Base URL
https://api.cloudrouter.online/v1, API Key, and Model (see the Call Guide for the call name; bare name or with fingerprint both work) - Save
⚠️ Roo Code only supports native tool calling, so choose a model that supports tool calling. Kilo Code's Base URL can accept a full path (including
/chat/completions), giving more flexibility.
7. Continue (VSCode / JetBrains plugin)
Edit ~/.continue/config.yaml and set CloudRouter as the endpoint for provider: openai:
models:
- name: CloudRouter Sonnet
provider: openai
model: claude-sonnet-4-6
apiBase: https://api.cloudrouter.online/v1
apiKey: YOUR_API_KEY
roles:
- chat
- editFill in model with the call name provided by the Call Guide (bare name or with fingerprint). When multiple models share the same Base URL / Key, you can use YAML anchors (& / <<: *) to reduce repetition.
8. Zed editor
Zed natively supports custom OpenAI-compatible providers; edit settings.json:
{
"language_models": {
"openai_compatible": {
"cloudrouter": {
"api_url": "https://api.cloudrouter.online/v1",
"available_models": [
{
"name": "claude-sonnet-4-6",
"display_name": "CloudRouter Sonnet",
"max_tokens": 128000
}
]
}
}
}
}Fill in name with the call name provided by the Call Guide (bare name or with fingerprint). The API Key is entered in the provider settings UI (stored in the system keychain), or set the environment variable CLOUDROUTER_API_KEY (generated from the uppercased provider ID plus _API_KEY).
⚠️
api_urlshould not have a trailing slash and must correctly include/v1.
9. Windsurf
Windsurf's native BYOK only supports Anthropic models. To integrate CloudRouter's OpenAI-compatible endpoint, it's recommended to install any of the Cline / Roo Code / Continue plugins within Windsurf, then configure the Base URL + Key per the corresponding section above.
If your version of Windsurf exposes a custom Base URL input field, you can fill in
https://api.cloudrouter.online/v1directly; if it only accepts the official Key with no Base URL field, that version only supports official BYOK and you'll need the plugin approach.
10. Other VSCode-family tools
Editors like Void and Tabby that support "OpenAI-compatible provider / custom Base URL" follow the same configuration logic as the plugins above: in their provider settings, fill in the Base URL https://api.cloudrouter.online/v1, the API Key, and the model call name.
Application development frameworks
11. LangChain
Use ChatOpenAI to point at CloudRouter:
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="claude-sonnet-4-6",
api_key="YOUR_API_KEY",
base_url="https://api.cloudrouter.online/v1"
)
print(llm.invoke("Hello").content)Install: pip install langchain-openai
12. LiteLLM
LiteLLM treats CloudRouter as an OpenAI-compatible provider:
import litellm
resp = litellm.completion(
model="openai/claude-sonnet-4-6", # the openai/ prefix uses the compatible endpoint
api_key="YOUR_API_KEY",
base_url="https://api.cloudrouter.online/v1",
messages=[{"role": "user", "content": "Hello"}]
)
print(resp.choices[0].message.content)Install: pip install litellm
13. Dify
In Dify, integrate via the "OpenAI-API-compatible" model provider:
- Go to Dify → Settings → Model Providers
- Select OpenAI-API-compatible
- Fill in:
- API Key: your CloudRouter Key
- API Base URL:
https://api.cloudrouter.online/v1 - Model Name: the call name provided by the Call Guide (e.g.
claude-sonnet-4-6, or with a fingerprint)
- After saving, you can select this model in Dify apps
14. n8n / other low-code platforms
Low-code/workflow platforms like n8n and Flowise mostly have built-in "OpenAI" or "OpenAI-compatible" nodes. Just change the Base URL in the node credentials to https://api.cloudrouter.online/v1, fill in your CloudRouter Key as the API Key, and set the model name to the call name provided by the Call Guide.
General Integration Principles
Any tool that supports the following configuration can integrate with CloudRouter:
| Setting | What to fill in |
|---|---|
| API Base URL / endpoint address | For the OpenAI protocol, use https://api.cloudrouter.online/v1; for the Anthropic protocol the endpoint is /v1/messages (official SDKs use the domain root and auto-complete it) |
| API Key | Your CloudRouter sk- Key (created and distributed by the Organization in the console) |
| Model name | The call name provided by the console's "Call Guide", bare name or with fingerprint |
| Protocol type | Select "OpenAI compatible" or "Anthropic compatible" |
| Auth header | Authorization: Bearer sk-xxx (x-api-key and x-goog-api-key are also supported) |
Common troubleshooting:
- 401 / Invalid API Key → check whether the Key is wrong or has extra spaces
- 404 / Model Not Found → check whether the model call name is a valid call name from the Call Guide
- Fingerprint call reports "group unreachable" → the group is out of your available range or currently unavailable, see Call Guide & Dual Routing
- Connection failure → check whether the Base URL is correct, whether
/v1is missing or duplicated, and whether there's an extra trailing slash
Just change one API address and Key, with no changes to any business code — this is exactly the value of CloudRouter's compatibility.
Next steps
- Figure out how to write the
modelfield → Call Guide & Dual Routing - Hit an error → Errors & Troubleshooting
- Model occasionally outputs a foreign language → Claude Language Drift Note
Contact us
- Email: support_cloudrouter@clouditera.com
- QQ group: 712273971
- Platform: cloudrouter.online