(5) Configure Clients
By this point you should have: signed up → added credit → created an API key with the right group → confirmed your Node.js environment works. Now let's connect your client / CLI to Tianshu.
Endpoint (route)
Tianshu offers two routes:
| Route | Address | For |
|---|---|---|
| Standard route | https://tian-shu.org | The vast majority of cases; stable and reliable |
| Direct route | https://api.tian-shu.org | Long-running requests such as image generation, bypassing gateway timeouts |
OpenAI-compatible endpoints need /v1
If you use an OpenAI-compatible client / tool (Codex, the OpenAI SDK, Cherry Studio's OpenAI-compatible config, etc.), append /v1 to the address: https://tian-shu.org/v1. For dedicated configs such as Claude Code, follow the example in the corresponding guide.
Recommended: one-click setup with CC-Switch
To make configuration as easy as possible, we recommend the open-source tool CC-Switch to manage the connection configs for Claude Code and Codex graphically, sparing you from editing files by hand:
Power users: configure the CLI manually
If you'd rather edit the config files yourself, follow the manual guides:
- Install the CLI (Environment Check)
- Claude Code Manual Setup
- Codex Manual Setup
- Claude Code Cache Optimization Proxy (advanced; saves credit)
Graphical clients / your own programs
- For graphical clients, see Third-Party Clients.
- To write your own code, see the Python / Node.js examples in Quick Start.
Whichever method you use
Complete the earlier steps first — make sure the token group is correct and that Node.js and the relevant CLI both run properly — before you start configuring.
