Skip to content

Integrating 树新在线 OpenAI-Compatible API Gateway in Dify

Dify supports connecting to any compatible endpoint through the OpenAI-API-compatible model provider. Users can integrate the 树新在线 gateway into the Dify platform.

Configuration Steps

Go to the Dify settings page, navigate to Model Providers, locate the OpenAI-API-compatible option, and add a model. Enter the model name (e.g., gpt-5.6-luna), API Key (created on the token page at https://api.treenew.online), and API endpoint URL (https://api.treenew.online/v1). Select LLM as the model type and save. Interface labels may vary by version.

Key Reminders

Important Note: 树新在线 only supports the /v1/chat/completions endpoint and does not provide embeddings. Therefore, Text Embedding models required by Dify knowledge bases and RAG features cannot use this service; you must configure a separate provider that offers embeddings. Pure chat applications are unaffected, but creating a knowledge base after this configuration will fail.

Model Parameters

Fill in parameters such as context length and max tokens according to the actual capabilities of the selected model. If unsure, check the model list at https://treenew.online/models/.

Verification

Use the following curl command to verify that the key and endpoint are reachable:

bash
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"}]}'

See also

Home · Console