# rdrand.com > Free hardware random number API: POST to https://rdrand.com/API/GenerateKey, /API/GenerateBytes or /API/GenerateUInt with no sign-up and no API key. Values come from the RDRAND instruction of Intel and AMD server CPUs. Free MIT-licensed client libraries for Node.js, Kotlin/Java, Rust and .NET use the caller's own CPU generator (RDRAND on x86_64, RNDR on ARMv8.5+ such as AWS Graviton3) and fall back to the API. Quick reference (base URL `https://rdrand.com/API/`, POST only, CORS `Access-Control-Allow-Origin: *`): - `POST /API/GenerateKey` with `length=N` → plain-text body of N characters, each uniform over `0-9A-Z_a-z` (63 symbols) - `POST /API/GenerateBytes` with `length=N` → N random bytes as standard base64 (with `=` padding) - `POST /API/GenerateUInt` (no parameters; send an empty body) → decimal integer from 0 to 2147483647 - Just for fun: `POST /API/FlipCoin` → `Heads` or `Tails`; `POST /API/Magic8Ball` (optional `question`, ignored) → one of the 20 classic Magic 8 Ball answers, such as `Signs point to yes` - Send `length` as a form field (`application/x-www-form-urlencoded`), a JSON body `{"length": N}`, or a query string `?length=N`. 0 ≤ N ≤ 16777216. - Success is HTTP 200 with the value as the body (labelled `Content-Type: text/html; charset=utf-8`, but it is plain text). A missing, invalid, negative or too-large `length` returns HTTP 500 with an HTML error page. GET requests return 404. - Example: `curl -d length=32 https://rdrand.com/API/GenerateKey` ## Docs - [Full documentation](https://rdrand.com/llms-full.txt): every endpoint, parameter rule and error, examples in curl, JavaScript, Python, Go, C#, Java, Rust, and the client libraries - [OpenAPI 3.1 description](https://rdrand.com/openapi.json): machine-readable spec for tool calling and code generation ## Client libraries - [Node.js 18+](https://rdrand.com/Downloads/jebtek-rdrand-2.0.0.tgz): `npm install https://rdrand.com/Downloads/jebtek-rdrand-2.0.0.tgz`, then `const { RdRand } = require("@jebtek/rdrand"); await new RdRand().generateKey(32)` - [Kotlin / Java 11+](https://rdrand.com/Downloads/rdrand-kotlin-2.0.0.jar): `com.jebtek.rdrand.RdRand().generateKey(32)` - [Rust](https://rdrand.com/Downloads/rdrand-rust-2.0.0.zip): crate `rdrand-client` (source zip); `rdrand_client::Client::new().generate_key(32)?` - [.NET Standard 2.0](https://rdrand.com/Downloads/JebteK.RdRand.2.0.0.nupkg): NuGet package `JebteK.RdRand`; `await new RdRandClient().GenerateKeyAsync(32)` ## Optional - [Website](https://rdrand.com/): interactive "try it" and examples - [Downloads page](https://rdrand.com/Home/Downloads): install instructions and platform support - [Legacy .NET wrapper v1.1](https://rdrand.com/Downloads/RdRandom-v1_1.zip): `RdRandom.Randomizer.GenerateKey(32)`; .NET Framework, requires RestSharp