
Find your way in.
Configure your endpoint, choose a model and make your first API call.
Your first API call.
Use the OpenAI SDK with your provisioned endpoint for Chinese models. Compatibility describes the API format, not the model provider.
Use your favorite editor.
Prepare three things: an API key, your endpoint and a model ID.
- 01
Open model settings
In Cursor, open Settings → Models. Find the OpenAI API key settings.
- 02
Add your connection
Paste your GLACIER AI key and set the custom OpenAI Base URL to your provisioned API base address.
- 03
Select a model and test
Add or enable the exact model ID from your account. Select it in local Chat and send a short message.
What to enter
- API key
- Your GLACIER AI API key
- Base URL
- Use the endpoint supplied with your account.
- Model ID
- Copy the exact model ID from your account.
Custom gateway access depends on the endpoint and model. Cursor Tab and background features do not use this custom connection. This preview provides setup guidance; a live GLACIER AI connection has not been tested here.
- 01
Add a custom model
Open TRAE Settings → Models → Add Model. Choose Custom Config and OpenAI Chat Completions when available.
- 02
Fill in the model settings
Enter your API key, exact model ID and Custom Request URL. Use the URL format described below.
- 03
Save and select it
Save the model. Switch off Auto if enabled, choose your custom model in the conversation and send a short message.
What to enter
- API key
- Your GLACIER AI API key
- Custom Request URL
- Use the endpoint supplied with your account.
- Model ID
- Copy the exact model ID from your account.
Full URL off: use the API base URL (usually ending in /v1). Full URL on: use the complete Chat Completions URL, including /chat/completions. Older versions may require the full URL directly.
Open API keysMenu labels vary by TRAE version. Agent workflows also require a compatible model with tool-calling support. This preview provides setup guidance; a live GLACIER AI connection has not been tested here.
Connect with the SDK
1. Install the SDK
pip install openai2. Set your environment
Set GLACIERAPI_API_KEY and GLACIERAPI_BASE_URL using the credentials and endpoint supplied for your account.
3. Send a message
The example uses the documented berserk-v4flash model ID. Confirm other model IDs before switching.
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["GLACIERAPI_API_KEY"],
base_url=os.environ["GLACIERAPI_BASE_URL"]
)
response = client.chat.completions.create(
model="berserk-v4flash",
messages=[{"role": "user", "content": "Hello!"}]
)