Chat clients and SDKs
Chat clients
Clients such as Cherry Studio, Chatbox, LobeChat and NextChat all support custom providers.
OpenAI-compatible type (recommended, works for all text models)
| Setting | Value |
|---|---|
| Provider type | OpenAI / OpenAI compatible |
| API address | https://api.codingrouter.ai; if the client does not add /v1 automatically, use https://api.codingrouter.ai/v1 |
| API Key | Your token |
| Model | Click "Get model list" to fetch them automatically, or enter the model name manually |
If you are unsure whether to include /v1, try without it first. If the connection test returns a web page or 404, switch to the one with /v1.
Anthropic or Gemini type
Some clients (such as Cherry Studio) let you pick an Anthropic or Gemini provider type directly, which gives access to native features. Set the API address to https://api.codingrouter.ai and use tokens from the claude and gemini groups respectively.
VS Code extensions
For Cline, Roo Code, Continue and similar extensions, choose the OpenAI Compatible provider:
| Setting | Value |
|---|---|
| Base URL | https://api.codingrouter.ai/v1 |
| API Key | Your token |
| Model ID | A model name, for example claude-sonnet-5-5 (the token's group must match) |
If the extension also offers an Anthropic provider, you can use that instead: set the Base URL to https://api.codingrouter.ai and use a token from the claude group.
SDKs
| SDK | Install | Base URL parameter | Value |
|---|---|---|---|
| OpenAI Python | pip install openai | base_url | https://api.codingrouter.ai/v1 |
| OpenAI Node.js | npm install openai | baseURL | https://api.codingrouter.ai/v1 |
| Anthropic Python | pip install anthropic | base_url | https://api.codingrouter.ai |
| Anthropic Node.js | npm install @anthropic-ai/sdk | baseURL | https://api.codingrouter.ai |
| Google GenAI Python | pip install google-genai | http_options=types.HttpOptions(base_url=...) | https://api.codingrouter.ai |
| Google GenAI Node.js | npm install @google/genai | httpOptions: { baseUrl } | https://api.codingrouter.ai |
For full examples see Chat Completions, Claude Messages and Gemini.
Other frameworks
LangChain, LlamaIndex, Vercel AI SDK and similar frameworks use the SDKs above underneath. Set the same Base URL and API Key. For example, LangChain:
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="gpt-5.5",
base_url="https://api.codingrouter.ai/v1",
api_key="sk-your-token",
)
print(llm.invoke("Hello").content)Environment variables
Many tools read the official SDK environment variables, so you can set them without changing code:
# OpenAI SDK
export OPENAI_BASE_URL="https://api.codingrouter.ai/v1"
export OPENAI_API_KEY="sk-your-token"
# Anthropic SDK
export ANTHROPIC_BASE_URL="https://api.codingrouter.ai"
export ANTHROPIC_API_KEY="sk-your-token"