WorkBuddy

使用卡密充值额度,按需提取账号

0 可用额度
个(1-50),每提取 1 个扣 1 点额度

卡密充值

API 调用

用 API Key 调用接口即可程序化提取账号,无需打开网页。 每次调用消耗 1 点额度。

      
频率限制: 每秒最多 10 次(按 Key 计算,不分时段)
批量提取: 加 count=N 一次取 N 个(1-50), 每个扣 1 点额度
认证方式: Authorization: Bearer <key> 或 X-API-Key: <key>
查询用量:
平台提示: 以上命令均为单行,Windows CMD 直接粘贴即可。 PowerShell 请把 curl 换成 curl.exe。

提取结果

尚未提取

提取记录

时间状态说明

接口说明

基础信息

接口地址
请求方法GET
返回格式application/json(UTF-8)
认证方式API Key(见下)
频率限制每秒最多 10 次(按 Key 计算)
计费方式每提取 1 个账号扣 1 点额度

认证

三种传法任选其一,效果相同:

① 请求头 Bearer Authorization: Bearer cb_live_xxxxxxxx
② 自定义头 X-API-Key: cb_live_xxxxxxxx
③ URL 参数 ?key=cb_live_xxxxxxxx

推荐用 ①,不要用 ③(key 会进访问日志)。

提取账号

GET /api/v1/extract
GET /api/v1/extract?count=10

参数

count 可选,整数,1 - 50,默认 1。 一次提取 N 个账号,扣 N 点额度。

成功响应(count=1)

{
  "ok": true,
  "requested": 1,
  "returned": 1,
  "failed": 0,
  "quota_remaining": 99,
  "account": {
    "account": {
      "uid": "04e6e031-a1c9-485e-aa88-7404cbd60bdf",
      "nickname": "Huihui Chen",
      "activated": true
    },
    "auth": {
      "accessToken": "eyJhbGciOiJSUzI1NiIs...",
      "refreshToken": "eyJhbGciOiJIUzUxMiIs...",
      "expiresAt": 1825698383,
      "domain": "www.codebuddy.ai",
      "realm": "global"
    },
    "quota": {
      "used": 400,
      "size": 530,
      "remain": 130,
      "packs": ["Bonus Pack:250/250", "Free Plan Subscription:0/100"]
    },
    "activated_at": "2026-11-09 10:39:06"
  },
  "accounts": [ ...同上... ]
}

成功响应(count=5)

{
  "ok": true,
  "requested": 5,
  "returned": 5,
  "failed": 0,
  "quota_remaining": 95,
  "account": null,
  "accounts": [
    { "account": {...}, "auth": {...}, "quota": {...} },
    { "account": {...}, "auth": {...}, "quota": {...} },
    ...
  ]
}

account 只在 count=1 时有值,方便老脚本; 无论 count 多少,accounts 数组始终包含全部结果。

部分失败

{
  "ok": true,
  "requested": 10,
  "returned": 8,
  "failed": 2,
  "quota_remaining": 92,
  "accounts": [ ... 8 个成功的 ... ]
}

失败的 2 个额度会自动退回。

查询额度与用量

GET /api/v1/me
{
  "ok": true,
  "username": "yourname",
  "quota": 89,
  "used_last_second": 0,
  "limits": {
    "per_second": 10,
    "max_batch": 50
  }
}

错误码

401 API Key 无效、已重置或被停用
402 额度不足(需要 N 点,剩余不足)
400 参数错误(count 不在 1-50 范围)
429 超过每秒 10 次;响应头带 Retry-After: 1
502 账号激活失败,额度已退回,可重试
503 号池暂时没有可用账号

调用示例

cURL(通用,推荐)

以下命令全部写成单行,Windows CMD、PowerShell、 Linux、macOS 都能直接粘贴运行,无需处理换行符。

:: 取 1 个
curl -s -H "Authorization: Bearer cb_live_xxxxxxxx" "/api/v1/extract"

:: 一次取 10 个
curl -s -H "Authorization: Bearer cb_live_xxxxxxxx" "/api/v1/extract?count=10"

:: 查询额度
curl -s -H "Authorization: Bearer cb_live_xxxxxxxx" "/api/v1/me"

最简方式:Key 放 URL

不想处理引号嵌套时,直接把 key 拼在 URL 上,单行即可。

curl -s "/api/v1/extract?count=10&key=cb_live_xxxxxxxx"

PowerShell 注意

PowerShell 里 curl 是 Invoke-WebRequest 的别名, 参数不兼容,必须写 curl.exe。其余完全相同。

curl.exe -s -H "Authorization: Bearer cb_live_xxxxxxxx" "/api/v1/extract?count=10"

Linux / macOS 换行(可选)

仅在类 Unix 系统上可用反斜杠续行,Windows CMD 不支持。 想换行时 Windows 用 ^,PowerShell 用反引号。

# Linux / macOS
curl -s "/api/v1/extract?count=10" \
  -H "Authorization: Bearer cb_live_xxxxxxxx"

:: Windows CMD
curl -s ^
  -H "Authorization: Bearer cb_live_xxxxxxxx" ^
  "/api/v1/extract?count=10"

# PowerShell
curl.exe -s `
  -H "Authorization: Bearer cb_live_xxxxxxxx" `
  "/api/v1/extract?count=10"

Python

import requests

API = "/api/v1/extract"
KEY = "cb_live_xxxxxxxx"

r = requests.get(API, params={"count": 5},
                 headers={"Authorization": f"Bearer {KEY}"},
                 timeout=120)
r.raise_for_status()
data = r.json()

print("本次拿到", data["returned"], "个,剩余额度", data["quota_remaining"])
for acc in data["accounts"]:
    uid = acc["account"]["uid"]
    token = acc["auth"]["accessToken"]
    print(uid, token[:20] + "...")

Node.js

const API = "/api/v1/extract";
const KEY = "cb_live_xxxxxxxx";

const r = await fetch(`${API}?count=5`, {
  headers: { Authorization: `Bearer ${KEY}` }
});
const data = await r.json();

console.log(`拿到 ${data.returned} 个,剩余 ${data.quota_remaining}`);
for (const acc of data.accounts) {
  console.log(acc.account.uid);
}

Go

package main

import (
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	url := "/api/v1/extract?count=5"
	req, _ := http.NewRequest("GET", url, nil)
	req.Header.Set("Authorization", "Bearer cb_live_xxxxxxxx")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	var out struct {
		Returned       int `json:"returned"`
		QuotaRemaining int `json:"quota_remaining"`
		Accounts       []map[string]any `json:"accounts"`
	}
	json.NewDecoder(resp.Body).Decode(&out)
	fmt.Printf("拿到 %d 个,剩余 %d
", out.Returned, out.QuotaRemaining)
}

批量建议

少量获取count=1,逐个取
中量获取count=10,10 个一批
大批量count=50,每秒最多 10 次 → 理论上限 500 个/秒

实际速度受额度、号池库存、激活耗时限制。 号池为空时返回 503,请稍后重试。

注意事项

  • API Key 泄露后请立即在「API 调用」卡片点重置,旧 Key 会立即失效。
  • 每次成功提取的账号不会重复发放,请及时保存返回的 JSON。
  • 账号的 accessToken 有效期约 1 年,expiresAt 是 Unix 时间戳(秒)。
  • 频率限制按 Key 计算,同一 Key 在多台机器上共用配额。
  • 认证失败 10 分钟内超过 20 次,该 IP 会被临时封禁。
  • 本文档所有 curl 示例均为单行,各平台可直接粘贴; Windows CMD 若需换行用 ^, PowerShell 请用 curl.exe。

WorkBuddy Account Service