30 个开发工具 API · RESTful · JSON 响应 · 免费使用
大多数接口无需认证即可使用(匿名模式:10次/分钟,100次/天)。
注册免费 API Key 获取更高配额(30次/分钟,500次/天):
curl -X POST https://www.kael.ink/api/keys/register \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "name": "Your Name"}'
使用时在请求头中添加:
curl -H "x-api-key: kael_YOUR_KEY" https://www.kael.ink/api/uuid
套餐: 匿名(免费)→ Free Key(免费)→ Pro ¥29/月 → Unlimited ¥99/月 · 查看详情
| 参数 | 类型 | 说明 |
|---|---|---|
| count | number | 可选 生成数量(1-100,默认 1) |
curl "https://www.kael.ink/api/uuid?count=3"
{
"uuids": [
"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"f6e5d4c3-b2a1-4098-7654-321fedcba987",
"12345678-abcd-4ef0-9876-543210abcdef"
]
}
| 参数 | 类型 | 说明 |
|---|---|---|
| text | string | 必填 要哈希的文本 |
| algo | string | 可选 算法:md5, sha1, sha256(默认), sha512 |
curl "https://www.kael.ink/api/hash?text=hello&algo=sha256"
{
"text": "hello",
"algorithm": "sha256",
"hash": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
}
| 参数 | 类型 | 说明 |
|---|---|---|
| text | string | 必填 要编码的文本 |
| type | string | 可选 base64(默认), url, hex, html |
| decode | boolean | 可选 true 为解码模式 |
curl "https://www.kael.ink/api/encode?text=你好世界&type=base64"
{
"original": "你好世界",
"type": "base64",
"encoded": "5L2g5aW95LiW55WM"
}
| 参数 | 类型 | 说明 |
|---|---|---|
| token | string | 必填 JWT token 字符串 |
curl "https://www.kael.ink/api/jwt/decode?token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.xxx"
{
"header": { "alg": "HS256" },
"payload": { "sub": "1234567890" },
"signature": "xxx"
}
| 参数 | 类型 | 说明 |
|---|---|---|
| length | number | 可选 长度(8-128,默认 16) |
| uppercase | boolean | 可选 包含大写(默认 true) |
| lowercase | boolean | 可选 包含小写(默认 true) |
| numbers | boolean | 可选 包含数字(默认 true) |
| symbols | boolean | 可选 包含特殊字符(默认 true) |
| count | number | 可选 生成数量(1-20,默认 1) |
curl "https://www.kael.ink/api/password?length=24&count=3"
| 参数 | 类型 | 说明 |
|---|---|---|
| password | string | 必填 要检测的密码 |
curl -X POST https://www.kael.ink/api/password-strength \
-H "Content-Type: application/json" \
-d '{"password": "MyP@ssw0rd!"}'
{
"score": 4,
"strength": "very strong",
"suggestions": [],
"details": { "length": 11, "hasUpper": true, "hasLower": true, "hasNumber": true, "hasSymbol": true }
}
| 参数 | 类型 | 说明 |
|---|---|---|
| json | string | 必填 JSON 字符串 |
curl -X POST https://www.kael.ink/api/json/validate \
-H "Content-Type: application/json" \
-d '{"json": "{\"name\": \"test\", \"age\": 25}"}'
{
"valid": true,
"type": "object",
"keys": ["name", "age"],
"size": 28
}
| 参数 | 类型 | 说明 |
|---|---|---|
| json | string | 必填 JSON 字符串 |
| indent | number | 可选 缩进空格数(默认 2) |
curl -X POST https://www.kael.ink/api/json/format \
-H "Content-Type: application/json" \
-d '{"json": "{\"a\":1,\"b\":2}"}'
| 参数 | 类型 | 说明 |
|---|---|---|
| pattern | string | 必填 正则表达式 |
| text | string | 必填 测试文本 |
| flags | string | 可选 标志位(g, i, m 等) |
curl -X POST https://www.kael.ink/api/regex \
-H "Content-Type: application/json" \
-d '{"pattern": "\\d+", "text": "abc123def456", "flags": "g"}'
| 参数 | 类型 | 说明 |
|---|---|---|
| text1 | string | 必填 原始文本 |
| text2 | string | 必填 对比文本 |
curl -X POST https://www.kael.ink/api/diff \
-H "Content-Type: application/json" \
-d '{"text1": "hello world", "text2": "hello kael"}'
| 参数 | 类型 | 说明 |
|---|---|---|
| color | string | 必填 颜色值(支持 hex、rgb、hsl) |
curl "https://www.kael.ink/api/color?color=%23f0b429"
{
"hex": "#f0b429",
"rgb": "rgb(240, 180, 41)",
"hsl": "hsl(42, 87%, 55%)"
}
| 参数 | 类型 | 说明 |
|---|---|---|
| text | string | 必填 要转换的文本 |
curl "https://www.kael.ink/api/slug?text=Hello%20World%20你好"
| 参数 | 类型 | 说明 |
|---|---|---|
| text | string | 必填 要编码的内容 |
| size | number | 可选 尺寸(50-1000,默认 200) |
| format | string | 可选 png(默认)或 svg |
curl "https://www.kael.ink/api/qr?text=https://www.kael.ink&size=300" -o qr.png
| 参数 | 类型 | 说明 |
|---|---|---|
| markdown | string | 必填 Markdown 文本 |
curl -X POST https://www.kael.ink/api/md2html \
-H "Content-Type: application/json" \
-d '{"markdown": "# Hello\n\n**bold** and *italic*"}'
| 参数 | 类型 | 说明 |
|---|---|---|
| markdown | string | 必填 Markdown 文本 |
| width | number | 可选 图片宽度(默认 800) |
| theme | string | 可选 light 或 dark(默认 light) |
curl -X POST https://www.kael.ink/api/md2image \
-H "Content-Type: application/json" \
-d '{"markdown": "# Hello World"}' -o output.png
| 参数 | 类型 | 说明 |
|---|---|---|
| paragraphs | number | 可选 段落数(默认 1) |
| lang | string | 可选 en(默认)或 zh |
curl "https://www.kael.ink/api/lorem?paragraphs=2&lang=zh"
| 参数 | 类型 | 说明 |
|---|---|---|
| w | number | 可选 宽度(默认 300) |
| h | number | 可选 高度(默认 200) |
| bg | string | 可选 背景色(默认 cccccc) |
| fg | string | 可选 文字色(默认 666666) |
| text | string | 可选 自定义文字 |
<img src="https://www.kael.ink/api/placeholder?w=400&h=300&bg=f0b429&text=Kael" />
| 参数 | 类型 | 说明 |
|---|---|---|
| min | number | 可选 最小值(默认 0) |
| max | number | 可选 最大值(默认 100) |
| count | number | 可选 数量(默认 1) |
curl "https://www.kael.ink/api/random?min=1&max=100&count=5"
curl https://www.kael.ink/api/ip
{
"ip": "1.2.3.4"
}
| 参数 | 类型 | 说明 |
|---|---|---|
| ts | number | 可选 Unix 时间戳(默认当前) |
| format | string | 可选 输出格式 |
curl https://www.kael.ink/api/ts
| 参数 | 类型 | 说明 |
|---|---|---|
| ua | string | 可选 UA 字符串(默认使用请求头) |
curl https://www.kael.ink/api/useragent
| 参数 | 类型 | 说明 |
|---|---|---|
| url | string | 必填 原始 URL |
| custom | string | 可选 自定义短码 |
curl -X POST https://www.kael.ink/api/shorten \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com/very/long/url"}'
⚠️ 需要 Pro 或 Unlimited 套餐
| 参数 | 类型 | 说明 |
|---|---|---|
| url | string | 必填 要截图的网页 URL |
| width | number | 可选 视口宽度(默认 1280) |
| height | number | 可选 视口高度(默认 720) |
| fullPage | boolean | 可选 全页截图 |
| format | string | 可选 png(默认)或 jpeg |
curl -H "x-api-key: kael_YOUR_PRO_KEY" \
"https://www.kael.ink/api/screenshot?url=https://example.com" -o screenshot.png
| 参数 | 类型 | 说明 |
|---|---|---|
| string | 必填 邮箱地址 | |
| name | string | 可选 名称 |
curl -X POST https://www.kael.ink/api/keys/register \
-H "Content-Type: application/json" \
-d '{"email": "dev@example.com", "name": "My App"}'
{
"success": true,
"key": "kael_a1b2c3d4e5",
"tier": "free",
"limits": { "rpm": 30, "daily": 500 }
}
curl -H "x-api-key: kael_YOUR_KEY" https://www.kael.ink/api/keys/info
{
"email": "dev@example.com",
"tier": "free",
"limits": { "rpm": 30, "daily": 500 },
"usage": { "today": 42, "total": 156 },
"created": "2026-03-02T10:00:00.000Z"
}
curl https://www.kael.ink/api/tiers
| 状态码 | 含义 | 说明 |
|---|---|---|
| 400 | Bad Request | 缺少必填参数或参数格式错误 |
| 401 | Unauthorized | API Key 无效 |
| 403 | Forbidden | Key 已禁用或套餐权限不足 |
| 429 | Too Many Requests | 超出速率限制(查看 X-RateLimit-* 头) |
| 500 | Internal Error | 服务端异常 |
{
"error": "Missing required parameter: text"
}
所有响应包含以下头信息:
| Header | 说明 |
|---|---|
| X-RateLimit-Limit | 每分钟请求上限 |
| X-RateLimit-Remaining | 当前窗口剩余次数 |
| X-RateLimit-Reset | 窗口重置时间(Unix timestamp) |
| X-RateLimit-Daily-Limit | 每日请求上限 |
| X-RateLimit-Daily-Remaining | 今日剩余次数 |
通过支付宝/微信支付升级 API Key 套餐。Upgrade your API key tier via Alipay/WeChat Pay.
/api/payment/products
— 查看可购买的套餐
curl https://www.kael.ink/api/payment/products
{
"products": {
"pro_monthly": { "title": "Kael API Pro 月付", "price": "29.00 CNY", "tier": "pro", "duration_days": 30 },
"pro_quarterly": { "title": "Kael API Pro 季付", "price": "79.00 CNY", "tier": "pro", "duration_days": 90 },
"unlimited_monthly": { "title": "Kael API Unlimited 月付", "price": "99.00 CNY", "tier": "unlimited", "duration_days": 30 }
},
"payment_methods": ["Alipay (支付宝)", "WeChat Pay (微信支付)"]
}
/api/payment/create
— 创建支付订单
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| product_id | string | ✅ | 产品ID (pro_monthly, pro_quarterly, pro_yearly, unlimited_monthly, unlimited_quarterly, unlimited_yearly) |
| api_key | string | ✅ | 要升级的 API Key |
curl -X POST https://www.kael.ink/api/payment/create \
-H "Content-Type: application/json" \
-d '{"product_id":"pro_monthly","api_key":"kael_xxx..."}'
{
"success": true,
"order_id": "KAEL_1709312400_abc12345",
"product": "Kael API Pro 月付",
"price": "29.00 CNY",
"qrcode_url": "https://...", // PC扫码支付
"pay_url": "https://...", // 手机端跳转
"message": "Scan QR code or open pay_url to complete payment"
}
/api/payment/notify
— 支付回调(系统内部使用)
由虎皮椒支付平台自动调用,支付成功后自动升级 API Key 套餐。
GET /api/idcard/validate?id={18-digit-id}
Validates Chinese 18-digit ID card numbers. Extracts birthday, gender, region code, age.
Response: { valid, regionCode, birthday, gender, age }
GET /api/phone/validate?number={phone}
Validates Chinese phone numbers and identifies carrier (Mobile/Unicom/Telecom/Broadnet).
Response: { valid, type, number, country, carrier }
GET /api/chmod?mode={755|rwxr-xr-x}
Convert between numeric (755) and symbolic (rwxr-xr-x) Unix permissions.
Response: { numeric, symbolic, owner, group, other }
GET /api/bytes?value={number}&from={B|KB|MB|GB|TB|PB}
Convert between byte units with human-readable output.
Response: { bytes, KB, MB, GB, TB, PB, human }
GET /api/date?value={now|timestamp|ISO}&tz={timezone}
Enhanced date converter: Unix timestamps, timezones, leap year, week/day of year.
Response: { iso, unix, utc, local, dayOfWeek, isLeapYear, ... }
POST /api/css/minify — Body: { "css": "..." }
Minify CSS by removing comments, whitespace, and unnecessary characters.
Response: { original, minified, savings, css }
POST /api/sql/format — Body: { "sql": "..." }
Format SQL queries with automatic indentation and keyword alignment.
Response: { formatted }