Skip to content

(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:

RouteAddressFor
Standard routehttps://tian-shu.orgThe vast majority of cases; stable and reliable
Direct routehttps://api.tian-shu.orgLong-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.

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:

Graphical clients / your own programs

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.