Register / Login
Visit https://discount-token.com, sign up or log in.
discount-token provides API access to leading AI models including Zhipu GLM, Volcengine, Claude, GPT, and DeepSeek, compatible with major coding tools.
https://discount-token.com/v1
Simply replace Base URL and API Key in any OpenAI-compatible client.
20 RPM per user. 5-hour / daily / weekly quota limits apply.
404 Model Not Found.
Visit https://discount-token.com, sign up or log in.
Go to the "Top Up" page, choose an amount, and pay with Alipay. Balance is credited automatically.
Navigate to "API Keys", click "New", and copy the generated key (format sk-xxx). Save it securely — it's only shown once.
Open Cursor → Settings → Models → Add Custom Model
Enter model name: glm-5.2
| Field | Value |
|---|---|
| OpenAI API Key | sk-your-key |
| Base URL | https://discount-token.com/v1 |
Click Verify — green checkmark means success.
Select model glm-5.2 in Chat or Composer.
export OPENAI_API_KEY="sk-your-key"
export OPENAI_BASE_URL="https://discount-token.com/v1"
# Launch Claude Code
claude --model glm-5.2
Edit ~/.claude/config.json:
{
"api_key": "sk-your-key",
"base_url": "https://discount-token.com/v1",
"model": "glm-5.2"
}
In Codex++, go to settings and find "Provider Management".
Add a new provider. Name: discount-token, Type: OpenAI Compatible.
| Field | Value |
|---|---|
| Provider Name | discount-token |
| Base URL | https://discount-token.com/v1 |
| API Key | sk-your-key |
| Model | glm-5.2 or doubao-seed-2.0-pro |
| Field | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://discount-token.com/v1 |
| API Key | sk-your-key |
| Model | glm-5.2 |
| Field | Value |
|---|---|
| Provider | OpenAI Compatible |
| Base URL | https://discount-token.com/v1 |
| API Key | sk-your-key |
| Model | glm-5.2 |
Edit config file opencode.json:
{
"provider": "openai",
"api_key": "sk-your-key",
"base_url": "https://discount-token.com/v1",
"model": "glm-5.2"
}
This service is OpenAI-compatible, supporting /v1/chat/completions and /v1/responses.
Header: Authorization: Bearer <your-key>
Works with all OpenAI SDKs and compatible clients.
curl https://discount-token.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-key" \
-d '{
"model": "glm-5.2",
"messages": [
{ "role": "user", "content": "Hello, write a short product intro" }
]
}'
from openai import OpenAI
client = OpenAI(
api_key="sk-your-key",
base_url="https://discount-token.com/v1"
)
response = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)
| Period | Time (Beijing) | Multiplier |
|---|---|---|
| Peak | 14:00 - 18:00 daily | 3x |
| Off-peak | 18:00 - 14:00 next day | 2x |
| Limited promo (until Sep) | Off-peak only | 1x |
You exceeded 20 requests/minute. Wait 1 minute and retry.
Check your API Key is correct with no extra spaces.
Check model name spelling: glm-5.2 (lowercase, hyphenated).
Quota resets automatically after 5 hours. Use off-peak for non-urgent tasks.
Use https://discount-token.com/v1. If your tool auto-appends /v1, use https://discount-token.com.
Yes. Add "stream": true to your request, identical to OpenAI.