Endpoint

GET /api/password FREE

也支持 POST 方法,参数通过 JSON body 发送。

参数

参数Type默认说明
lengthnumber16密码长度(4~128)
upperbooleantrue大写字母
lowerbooleantrue小写字母
digitsbooleantrue数字
symbolsbooleanfalse特殊字符
excludeAmbiguousbooleantrue排除易混淆字符(1 l I 0 O)
countnumber1生成数量(1~100)

示例

GET

curl https://ckpsw.com/api/password?length=20&symbols=true&count=5

POST

curl -X POST https://ckpsw.com/api/password \
  -H "Content-Type: application/json" \
  -d '{"length":24,"symbols":true,"count":3}'

响应(单个)

{ "password": "aB3xK9mP2vR7wL5nQ8jF", "length": 20, "count": 1, "options": { "upper": true, "lower": true, "digits": true, "symbols": true, "excludeAmbiguous": true } }

响应(多个)

{ "passwords": ["aB3xK9mP2v", "L5nQ8jF1wR"], "count": 5, "length": 10, "options": { ... } }