Using 树新在线 API in Cursor
Cursor supports custom OpenAI-compatible endpoints. Once configured, you can call models provided by 树新在线.
Configuration Steps
Go to Cursor settings and find the section related to Models or AI, typically under the API configuration area. Wording may vary across versions, so locate the corresponding fields based on your interface. Fill in the OpenAI API Key and Override/Base URL, setting Base URL to https://api.treenew.online/v1. The API Key must be created on the 「令牌」 page at https://api.treenew.online. Enter the model name as gpt-5.6-luna (or any other name listed at https://treenew.online/models/). Save the settings and test by starting a conversation.
Notes
Cursor features such as Tab completion and Composer rely on Cursor's own backend; changing the OpenAI endpoint will not affect these capabilities. This gateway only supports the /v1/chat/completions endpoint, so any functionality that depends on other endpoints (e.g., embeddings) will not work. The model name must exactly match an entry from https://treenew.online/models/; otherwise requests will fail.
Verify the Configuration
Use the following curl command to test the gateway independently and rule out Cursor configuration issues:
curl https://api.treenew.online/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-luna",
"messages": [{"role": "user", "content": "test"}]
}'A successful JSON response confirms that the API Key and Base URL are valid.