discount-token Guide

Leading AI Model API Service — All-in-one setup tutorial

Overview

discount-token provides API access to leading AI models including Zhipu GLM, Volcengine, Claude, GPT, and DeepSeek, compatible with major coding tools.

Base URL

Unified Endpoint

https://discount-token.com/v1

Compatible

OpenAI Format

Simply replace Base URL and API Key in any OpenAI-compatible client.

Limits

Rate Limits

20 RPM per user. 5-hour / daily / weekly quota limits apply.

Available Models

Claude Series

claude-opus-4-8Ultimate flagship
claude-opus-4-7High performance
claude-sonnet-5Best value
claude-sonnet-4-6Balanced
claude-sonnet-4-5Stable
claude-haiku-4-5Fast & light
claude-fable-5Creative writing

GPT Series

gpt-5.6Latest flagship
gpt-5.5High performance
gpt-5.4Balanced

DeepSeek Series

deepseek-r1Deep reasoning
deepseek-v4-proPro edition
deepseek-v4-flashUltra fast
deepseek-v3Stable

Zhipu GLM Series

glm-5.2Flagship reasoning
glm-5.1High performance
glm-5Standard
glm-4.7Lightweight & fast
glm-4.6Stable

Volcengine Series

doubao-seed-2.0-proDoubao flagship
doubao-seed-2.0-codeCode specialist
doubao-seed-2.0-liteLightweight
kimi-k2.6Kimi latest
Note: Model names are all lowercase with hyphens. Typing the wrong name returns 404 Model Not Found.

Create API Key

2

Top Up

Go to the "Top Up" page, choose an amount, and pay with Alipay. Balance is credited automatically.

3

Create API Key

Navigate to "API Keys", click "New", and copy the generated key (format sk-xxx). Save it securely — it's only shown once.

Cursor Setup

1

Add Custom Model

Open Cursor → SettingsModelsAdd Custom Model

Enter model name: glm-5.2

2

Configure OpenAI API

FieldValue
OpenAI API Keysk-your-key
Base URLhttps://discount-token.com/v1

Click Verify — green checkmark means success.

3

Start Using

Select model glm-5.2 in Chat or Composer.

Claude Code (Terminal)

Option 1: Environment Variables

BASH TerminalEnv vars
export OPENAI_API_KEY="sk-your-key"
export OPENAI_BASE_URL="https://discount-token.com/v1"

# Launch Claude Code
claude --model glm-5.2

Option 2: Config File

Edit ~/.claude/config.json:

JSON ~/.claude/config.jsonConfig
{
  "api_key": "sk-your-key",
  "base_url": "https://discount-token.com/v1",
  "model": "glm-5.2"
}

Codex / Codex++

1

Open Provider Settings

In Codex++, go to settings and find "Provider Management".

2

Add Provider

Add a new provider. Name: discount-token, Type: OpenAI Compatible.

3

Fill Configuration

FieldValue
Provider Namediscount-token
Base URLhttps://discount-token.com/v1
API Keysk-your-key
Modelglm-5.2 or doubao-seed-2.0-pro

Cline / Roo Code (VS Code)

FieldValue
API ProviderOpenAI Compatible
Base URLhttps://discount-token.com/v1
API Keysk-your-key
Modelglm-5.2

Kilo Code

FieldValue
ProviderOpenAI Compatible
Base URLhttps://discount-token.com/v1
API Keysk-your-key
Modelglm-5.2

OpenCode / Crush

Edit config file opencode.json:

JSON opencode.jsonConfig
{
  "provider": "openai",
  "api_key": "sk-your-key",
  "base_url": "https://discount-token.com/v1",
  "model": "glm-5.2"
}

API Format

This service is OpenAI-compatible, supporting /v1/chat/completions and /v1/responses.

Auth

Bearer Token

Header: Authorization: Bearer <your-key>

Compatible

OpenAI SDK

Works with all OpenAI SDKs and compatible clients.

cURL

POST /v1/chat/completionsChat example
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" }
    ]
  }'

Python

PY Python SDKopenai ≥ 1.0
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)

GLM-5.2 Peak Hours Notice

Important: Zhipu applies the following quota consumption rates for GLM-5.2:
PeriodTime (Beijing)Multiplier
Peak14:00 - 18:00 daily3x
Off-peak18:00 - 14:00 next day2x
Limited promo (until Sep)Off-peak only1x
Tips to save quota:
  • Use GLM-4.7 (1x) during peak hours — fast and sufficient for most tasks
  • Switch to GLM-5.2 for complex tasks during off-peak hours
  • Before Sep 30, GLM-5.2 is only 1x during off-peak — take advantage!

FAQ

Error 429 Too Many Requests

You exceeded 20 requests/minute. Wait 1 minute and retry.

Error 401 Unauthorized

Check your API Key is correct with no extra spaces.

Error 404 Model Not Found

Check model name spelling: glm-5.2 (lowercase, hyphenated).

5-hour quota exhausted

Quota resets automatically after 5 hours. Use off-peak for non-urgent tasks.

What Base URL to use?

Use https://discount-token.com/v1. If your tool auto-appends /v1, use https://discount-token.com.

Is streaming supported?

Yes. Add "stream": true to your request, identical to OpenAI.

discount-token is a Sub2API-powered OpenAI-compatible relay. API endpoint: https://discount-token.com/v1.

Home · 中文指南