✳ RandomKit

REST API 文档

REST API 文档 · 参数 · 结果 · RandomKit

POST /api/v1/generate

Send a JSON body with Content-Type: application/json. This example generates integers.

ParameterDescription
toolGenerator name. Use integers for whole numbers.
input.min / input.maxInclusive bounds from −10¹² to 10¹². Defaults: 1 and 100.
input.count1–10,000. Default: 1.
input.uniqueSet true to sample without replacement. Default: false.
input.sortSet true for ascending order. Default: generation order.
localeOptional. With a locale, the response includes formatted. en, ru, zh-TW, zh-CN, hi, ja, ko, es

curl

curl -X POST "https://randomkit.tech/api/v1/generate" -H "Content-Type: application/json" -d '{"tool":"integers","locale":"zh-CN","input":{"min":1,"max":100,"count":5,"unique":true,"sort":true}}'

fetch

const response = await fetch('/api/v1/generate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"tool":"integers","locale":"zh-CN","input":{"min":1,"max":100,"count":5,"unique":true,"sort":true}})
})
const data = await response.json()
if (!response.ok) throw new Error(data.error)
console.log(data.values, data.formatted)
console.log(response.headers.get('RateLimit-Remaining'))

Response and quota

Successful responses contain tool and values. With locale, they also include locale, label and formatted. Formatted integers have number and text fields.

400: invalid request. 429: quota exhausted, with Retry-After in seconds. 503: quota service unavailable. Requests rejected with 400 also count toward the quota.

Verifiable draws and Seed

Use the browser tools for Seed and drand. On the draw page you can select a winner and download a JSON proof. Open verifiable draw

API Playground

工具

CORE
Web CryptoSeeddrand
随机整数Open tool
CORE
Web CryptoSeed
随机数列Open tool
SOCIAL
Web CryptoSeed
列表打乱Open tool
GAMES
Web CryptoSeed
在线骰子Open tool
GAMES
Web CryptoSeed
抛硬币Open tool
GAMES
Web CryptoSeed
扑克牌洗牌Open tool
GAMES
Web CryptoSeed
彩票选号Open tool
SECURITY
Web Crypto
密码生成器Open tool
SECURITY
Web CryptoSeed
随机字符串Open tool
CORE
Web CryptoSeed
正态分布Open tool
DATA
Web CryptoSeed
随机色值Open tool
DATA
Web CryptoSeed
随机坐标Open tool
SECURITY
Web CryptoSeed
随机字节Open tool
DATA
Web CryptoSeed
随机日期时间Open tool
CORE
Web CryptoSeed
高级整数Open tool
WIDGETS
Web CryptoSeed
整数小组件Open tool
WIDGETS
drand
抽奖小组件Open tool
SOCIAL
drand
慈善抽奖Open tool
SOCIAL
Web CryptoSeed
姓名转盘Open tool
SOCIAL
Web CryptoSeed
随机选名Open tool
SOCIAL
Web CryptoSeed
随机分组Open tool
CORE
Web CryptoSeed
随机选号Open tool
DATA
Web CryptoSeed
随机字符Open tool
DATA
Web CryptoSeed
随机词语Open tool
DATA
Web CryptoSeed
随机生日Open tool
DATA
Web Crypto
随机选图Open tool
SOCIAL
Web CryptoSeed
评论抽奖Open tool
CORE
Seed
可复现抽样Open tool
SOCIAL
Web CryptoSeed
活动转盘Open tool
DATA
Web CryptoSeed
测试数据Open tool
SECURITY
Web CryptoSeed
网络标识符Open tool
DATA
Web CryptoSeed
随机表情Open tool
SOCIAL
Web CryptoSeed
随机组队Open tool
CORE
Web CryptoSeed
随机小数Open tool
SOCIAL
Web CryptoSeed
随机决策Open tool
SOCIAL
drand
可验证抽奖Open tool