cURL
curl "https://api.ruseo.cn/api/card_key?count=100&format=onlyKey&separator=-&card_prefix=VIP&start_number=1&card_length=6&key_prefix=KEY&key_length=16&numbers=1&uppercase=1&lowercase=0&special=0"
批量生成卡密/激活码,支持卡号+卡密格式、自定义前缀、多种字符类型,可用于软件激活、会员卡号、兑换码等场景
https://api.ruseo.cn/api/card_key
接口调用前需要确认的核心配置。
/api/card_keycard_key必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
count |
否 | int | 生成数量,默认1,最大10000 | 100 |
format |
否 | string | 格式类型:onlyKey(仅卡密)、spaceKey(卡号 空格 卡密)、commaKey(卡号,逗号,卡密)、customKey(自定义分隔符) | onlyKey |
separator |
否 | string | 自定义分隔符,format=customKey时生效 | - |
card_prefix |
否 | string | 卡号前缀 | VIP |
start_number |
否 | int | 起始卡号,默认1 | 1 |
card_length |
否 | int | 卡号位数,默认6 | 6 |
key_prefix |
否 | string | 卡密前缀 | KEY |
key_length |
否 | int | 卡密长度,默认16,范围4-32 | 16 |
numbers |
否 | string | 是否包含数字:1是0否,默认1 | 1 |
uppercase |
否 | string | 是否包含大写字母:1是0否,默认1 | 1 |
lowercase |
否 | string | 是否包含小写字母:1是0否,默认0 | 0 |
special |
否 | string | 是否包含特殊符号:1是0否,默认0 | 0 |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/card_key?count=100&format=onlyKey&separator=-&card_prefix=VIP&start_number=1&card_length=6&key_prefix=KEY&key_length=16&numbers=1&uppercase=1&lowercase=0&special=0
curl "https://api.ruseo.cn/api/card_key?count=100&format=onlyKey&separator=-&card_prefix=VIP&start_number=1&card_length=6&key_prefix=KEY&key_length=16&numbers=1&uppercase=1&lowercase=0&special=0"
$url = 'https://api.ruseo.cn/api/card_key?count=100&format=onlyKey&separator=-&card_prefix=VIP&start_number=1&card_length=6&key_prefix=KEY&key_length=16&numbers=1&uppercase=1&lowercase=0&special=0';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/card_key?count=100&format=onlyKey&separator=-&card_prefix=VIP&start_number=1&card_length=6&key_prefix=KEY&key_length=16&numbers=1&uppercase=1&lowercase=0&special=0')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "card_key",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
count |
int | 生成数量 | 100 |
keys |
array | 卡密列表 | ["VIP000001-KEYABC123DEF456", "VIP000002-KEYGHI789JKL012"] |
config |
object | 生成配置信息 | {"format":"customKey","card_prefix":"VIP",...} |
点击左侧“发送请求”查看结果...