✳ 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-TW","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-TW","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