Skip to content

Misc Public API ​

3. Group List (Group) ​

3.1 Get All Group Names ​

Endpoint: GET /api/group/

Auth: Admin

Request parameters: None

Response:

json
{
  "success": true,
  "message": "",
  "data": ["default", "vip", "svip"]
}

Description: Returns every group name defined in the group_prices table.

4. System Options (Option) ​

4.1 Get All System Options ​

Endpoint: GET /api/option/

Auth: Root

Request parameters: None

Response:

json
{
  "success": true,
  "message": "",
  "data": [
    { "key": "QuotaForNewUser", "value": "1000000" },
    { "key": "QuotaPerUnit", "value": "500000" },
    { "key": "TopUpLink", "value": "" },
    ...
  ]
}

Description: Sensitive options (tokens, SMTP passwords, etc.) are filtered or masked.

4.2 Update a System Option ​

Endpoint: PUT /api/option/

Auth: Root

Request body:

json
{
  "key": "QuotaPerUnit",
  "value": "500000"
}

Request fields:

FieldTypeRequiredDescription
keystringyesOption name
valuestringyesOption value

Available options:

Option nameDescription
QuotaForNewUserQuota granted to new users
QuotaForInviterReward quota for the inviter
QuotaForInviteeReward quota for the invitee
QuotaRemindThresholdQuota reminder threshold
PreConsumedQuotaPre-consumed quota
TopUpLinkTop-up link
ChatLinkChat link
QuotaPerUnitQuota per unit (how much internal quota equals ¥1)
DisplayInCurrencyEnabledWhether to display amounts as currency (true/false)
DisplayTokenStatEnabledWhether to display token stats (true/false)
ApproximateTokenEnabledWhether to use approximate token counting (true/false)
RetryTimesRetry count
LogConsumeEnabledWhether to enable consumption logs (true/false)
AutomaticDisableChannelEnabledAuto-disable channels (true/false)
AutomaticEnableChannelEnabledAuto-enable channels (true/false)
ChannelDisableThresholdChannel disable threshold
ChannelDefaultCooldownSecondsDefault cooldown (seconds)
ChannelMaxCooldownSecondsMax cooldown (seconds)
ChannelConcurrencyEnabledEnable per-channel concurrency limit (true/false)
ChannelStickySessionEnabledEnable sticky session (true/false)
ErrorNextError response strategy JSON

Response:

json
{
  "success": true,
  "message": ""
}

14. Other Public Endpoints ​

EndpointMethodDescription
/api/statusGETGet system status (no auth required)
/api/noticeGETGet system notice
/api/aboutGETGet about page content
/api/home_page_contentGETGet home page content
/api/verificationGETSend email verification code
/api/reset_passwordGETSend password reset email
/api/user/resetPOSTReset password
/api/oauth/githubGETGitHub OAuth callback
/api/oauth/oidcGETOIDC OAuth callback
/api/oauth/larkGETLark OAuth callback
/api/oauth/stateGETGenerate OAuth state code
/api/oauth/wechatGETWeChat OAuth callback
/api/oauth/wechat/bindGETBind WeChat account (requires login)
/api/oauth/email/bindGETBind email (requires login)
/api/user/logoutGETLogout
/api/user/affGETGet affiliate code
/api/user/subscriptionGETGet subscription info

Appendix B: Permission Levels ​

LevelValueDescription
Guest0Unauthenticated visitor
User1Regular user
Admin10Admin
Root100Super admin

Appendix C: Billing Types ​

billing_typeDescription
tokenPer-token billing, priced in ¥ per million tokens
per_requestPer-request billing, priced in ¥ per request

Token billing formula:

quota = ceil((inputPrice × inputTokens + outputPrice × completionTokens + cachedPrice × cachedTokens) / 1,000,000 × groupDiscount × QuotaPerUnit)

Per-request billing formula:

quota = ceil(perRequestPrice × sizeRatio × N × groupDiscount × QuotaPerUnit)

Group discount matching rules:

  1. GroupName + ModelName exact match → use that discount.
  2. GroupName + "" (empty) → use that group's default discount.
  3. No match → discount is 1.0 (no discount).

QuotaPerUnit: Default 500,000, meaning 500,000 internal quota equals ¥1.

Appendix D: Channel Type Reference ​

TypeAdaptor
1OpenAI
2Azure OpenAI
3Custom channel
4Claude (Anthropic)
5Google Gemini
6Tongyi Qianwen (Ali)
7iFlytek Spark (SparkDesk)
8Baidu ERNIE (Baidu)
9ByteDance Doubao (Doubao)
10MiniMax
11DeepSeek
12Cohere
13360 Brain
14Ollama
15Moonshot
16Zhipu AI (GLM)
17Baichuan
18Yi (01.AI)
19DeepSeek (dedicated adaptor)
20-40+Other adaptors