Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mercury-eab3b728.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

账户余额与用量

这部分接口同时提供平台自定义包装和 OpenAI 兼容结构。

API Key 用量

GET /api/usage/token/
curl https://www.geeknow.top/api/usage/token/ \
  -H "Authorization: Bearer YOUR_API_KEY"
成功响应:
{
  "code": true,
  "message": "ok",
  "data": {
    "object": "token_usage",
    "name": "default-token",
    "total_granted": 1000000,
    "total_used": 250000,
    "total_available": 750000,
    "unlimited_quota": false,
    "model_limits": {
      "gpt-4o": 10000
    },
    "model_limits_enabled": true,
    "expires_at": 1767225600
  }
}

OpenAI 兼容订阅信息

两个路径等价:
  • GET /dashboard/billing/subscription
  • GET /v1/dashboard/billing/subscription
响应示例:
{
  "object": "billing_subscription",
  "has_payment_method": true,
  "soft_limit_usd": 100.0,
  "hard_limit_usd": 100.0,
  "system_hard_limit_usd": 100.0,
  "access_until": 1767225600
}

OpenAI 兼容用量

两个路径等价:
  • GET /dashboard/billing/usage
  • GET /v1/dashboard/billing/usage
响应示例:
{
  "object": "list",
  "total_usage": 2500
}
soft_limit_usdhard_limit_usdtotal_usage 最终显示单位受站点配额展示配置影响,不一定始终是美元。

常见错误

/api/usage/token/ 缺少 Authorization

{
  "success": false,
  "message": "No Authorization header"
}

/api/usage/token/ Bearer 格式错误

{
  "success": false,
  "message": "Invalid Bearer token"
}

OpenAI 兼容余额接口错误

{
  "error": {
    "message": "query quota failed",
    "type": "upstream_error",
    "param": "",
    "code": null
  }
}

相关页面