Client setup¶
One Nexus API key works in every client. Create it in the Telegram bot, then add a separate connection entry in the client so its own default stays unchanged. That entry is not a second Nexus account and does not create a second balance.
The base URL depends on the protocol the client speaks. Enter the base, not the full route. The client appends the operation path.
| Workflow | Protocol | Base URL | Route the client builds |
|---|---|---|---|
| Chat apps and most OpenAI-compatible tools | OpenAI Chat | https://api.nexus-hub.tech/v1 |
POST /v1/chat/completions |
| Codex and response clients | OpenAI Responses | https://api.nexus-hub.tech/v1 |
POST /v1/responses |
| Claude Code and Claude Desktop | Anthropic Messages | https://api.nexus-hub.tech |
POST /v1/messages |
| Gemini clients | Gemini-compatible | https://api.nexus-hub.tech/v1beta |
POST /v1beta/models/{model}:generateContent |
Setup order¶
- Create a Nexus API key in the Telegram bot.
- Add a separate connection entry in the client.
- Choose the protocol and base URL from the table.
- Put the key in the client's protected field or in an environment variable. Do not add a
Bearerprefix unless the field asks for the whole header. - Copy a model id from
GET /v1/modelsfor this key. On Models and prices, check which route family that id belongs to. - Send a short message. A normal reply means the connection works.
Choose a protocol¶
Use this for chat apps, including Cherry Studio. Base URL
https://api.nexus-hub.tech/v1. The client calls
POST /v1/chat/completions.
Use this for Codex. Base URL https://api.nexus-hub.tech/v1. The client
calls POST /v1/responses. Do not switch Codex to Chat Completions.
Use this for Claude Code and Claude Desktop. Base URL
https://api.nexus-hub.tech, with no /v1 suffix. The client calls
POST /v1/messages and sends anthropic-version: 2023-06-01.
Use https://api.nexus-hub.tech/v1beta only when the client documents the
Gemini format. The model id belongs in the request path.
Before troubleshooting
Recheck the route, the model id for this key, and the exact field in the
client. Send support only the route, error code, approximate time, and
x-request-id. Do not send the key, a full prompt, or request headers.
If it does not work¶
401orinvalid_key: the key is missing, has extra spaces, or was revoked.model_not_foundormodel_not_allowed: the id is not in this key'sGET /v1/modelslist.unsupported_model: the id is visible, but not on this protocol. Pick another route or another id.endpoint_not_allowed: this key cannot use the selected route.404orunsupported_endpoint: compare the address the client actually calls with the table. Do not paste the full operation path into the base URL field.
Nexus also accepts a missing /v1, a repeated /v1, and a trailing slash.
Keep the clean base from the table anyway, and trust the address preview when
the client shows one.
The value table is on the compatibility matrix. Guides: Codex CLI, ChatGPT / Codex Desktop, Claude Code, Claude Desktop, VS Code, Zed, T3 Code, CC Switch, Cherry Studio, Direct API, custom integration, and another client.