Skip to content

Using 树新在线 API in Immersive Translate

沉浸式翻译 supports custom OpenAI-compatible endpoints as a translation provider. Users can achieve this through third-party gateways.

Configuration Steps

Go to the extension settings, select the translation service, and pick OpenAI or Custom AI Service. Enter the API Key, expand Advanced Settings to fill in the custom API endpoint URL, enter the model name (e.g. gpt-5.6-luna), then test the connection. Interface labels may differ slightly across versions; follow the on-screen instructions.

The Most Common Mistake When Entering the Address

Some fields require the full path https://api.treenew.online/v1/chat/completions, while others only accept up to https://api.treenew.online/v1. An incorrect entry returns 404 or a connection failure. If the endpoint expects a specific path, supply the complete URL; if it accepts an OpenAI-compatible base URL, enter up to /v1. Try the base URL first; add the full path only if it fails.

Recommendations

Translation workloads generate high request volumes with short contexts, so choosing an appropriate model is more cost-effective. See pricing at https://treenew.online/pricing/. Lower the maximum segment length and concurrency to avoid rate limits. The model list is available at https://treenew.online/models/.

Verification

Use curl to confirm the key and endpoint are valid:

bash
curl https://api.treenew.online/v1/chat/completions \
  -H "Authorization: Bearer 你的令牌" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-luna","messages":[{"role":"user","content":"test"}]}'

API Key is created on the 「令牌」 page at https://api.treenew.online.

See also

Home · Console