Your first call in a minute.
Create a free account and copy the key from your dashboard. It starts with qr_. Then pick a language:
curl "https://quantumrand.dev/v1/generate/hex?n=128" \ -H "X-API-Key: qr_your_key"
pip install getquantumrand
from getquantumrand import QuantumRandClient
qr = QuantumRandClient("qr_your_key")
print(qr.hex(128))
npm install getquantumrand
const { QuantumRandClient } = require("getquantumrand");
const qr = new QuantumRandClient({ apiKey: "qr_your_key" });
console.log(await qr.hex(128));
go get github.com/getquantumrand/quantumrand-sdks/go
client := quantumrand.NewClient("qr_your_key")
hex, err := client.GenerateHex(128)
The SDKs are open source on GitHub. To try every endpoint in the browser, use the interactive reference.
One header.
Send your key in X-API-Key on every request. Keep it on your server: anyone with the key can spend your daily calls.
Two optional protections can be switched on from your dashboard, or through the API:
| IP allowlist | Only the IP addresses you list can use the key; anything else gets 403. POST /keys/allowed-ips |
| Request signing | Send X-Timestamp (Unix seconds) and X-Signature = hex HMAC-SHA256 of timestamp + METHOD + path + query, keyed with the secret POST /keys/signing/enable returns. Requests more than 5 minutes off are refused. |
Same shape every time.
{ "success": true,
"data": { "hex": "9f2c41d07be3a85e1c6f0b94d2e7a315",
"num_bits": 128,
"elapsed_ms": 0.4,
"source": "quantum-seeded" } }
{ "success": false,
"error": "Invalid or inactive API key.",
"request_id": "5f0c…" }
Every response carries an X-Request-ID header. Quote it if you contact support at hello@qntyx.io.
Check the source field.
Core endpoints call it source; sector endpoints call it entropy_source.
| quantum-seeded | Seeded from IBM quantum hardware within the last 48 hours. The normal state. |
| quantum-seeded (stale seed) | The last real seed is more than 48 hours old. Still served, clearly flagged. |
| csprng-fallback (awaiting first quantum seed) | The first minute or so after a restart. The operating system's generator fills in. |
If you need quantum-seeded values only, reject any response whose label is not exactly quantum-seeded.
Six ways to ask for randomness.
Every path also works under /v1/. Bits per call are capped by your plan.
| Endpoint | Parameters |
|---|---|
| GET /generate/bits | n bits, 1 to 4,096 (default 256) |
| GET /generate/hex | n bits, a multiple of 4, 4 to 4,096 |
| GET /generate/integer | min, max (defaults 0 and 100). Uniform, by rejection sampling |
| POST /generate/key | bits: 128, 192, 256 or 512 |
| POST /generate/batch | Body: up to 20 requests, each with a type (bits, hex, integer, key) and params |
| POST /generate/webhook | Body: an HTTPS callback_url. Returns a job ID at once and posts the result to your URL. Private and local addresses are refused |
Thirty ready-made helpers.
All are POST, take a JSON body and draw from the same quantum-seeded generator by default. Expiry times and single-use flags are labels: QuantumRand doesn't track them, so your system enforces them. Parameters for each are in the interactive reference.
/finance/txid · otp · nonce · keypair · audit-sign/gaming/roll · seed · shuffle · loot · provable/health/record-seal · rx-sign · access-log · consent-seal · device-id/legal/timestamp · evidence-seal · contract-sign · claim-token · notarize/security/keygen · entropy-audit · token · salt · challenge/iot/device-id · firmware-sign · session-key · provision · telemetry-sealNot ready: /gaming/provable returns a commitment and a seed hash, but the seed isn't stored and the verify step isn't live, so outcomes can't be checked by players yet.
Seal it now, check it later.
Twelve sector endpoints return a seal: finance/audit-sign, the four healthcare seals (record-seal, rx-sign, access-log, consent-seal), all five legal endpoints, iot/firmware-sign and iot/telemetry-seal. Each is an HMAC-SHA256 under a secret kept for your account, covering every field of the response's data object.
POST /v1/seals/verify { "data": { …the whole data object, exactly as you received it… } } { "success": true, "data": { "valid": true, "seal_type": "health/record-seal" } }
Change any field and valid is false. Only the account that made a seal can verify it, so these are not public signatures: a third party has to ask you to check. They are not qualified timestamps, electronic signatures or notarizations. The dashboard has a Verify a seal tab.
Leave it on the default.
Any endpoint takes an optional backend. Without one you get quantum_seeded, which is what almost everyone wants. The simulators are for teaching and testing: their responses say "security_grade": false, and every endpoint that returns a key, token, seed, nonce, seal or game outcome refuses them with 400. Never use simulator output as a secret.
| quantum_seeded | Default. The NIST SP 800-90A generator seeded from IBM quantum hardware. Instant. |
| aer_simulator | Qiskit's circuit simulator. At most 32 bits of entropy per response. Not for secrets. |
| origin_cloud, origin_wuyuan | A mock running inside QuantumRand: no circuit runs. Not Origin's real chip. Not for secrets. |
| ibm_hardware | A live job on IBM quantum hardware. Real, but queued: expect minutes, not milliseconds. Paid plans only, up to 3 runs a day per key; Free keys get 403. |
Daily calls, reset at midnight UTC.
Your plan sets calls per day and bits per call: Free 1,000 and 256, Indie 50,000 and 1,024, Startup 500,000 and 2,048, Business 10,000,000 and 4,096. Every response tells you where you stand:
| X-RateLimit-Limit | Calls allowed today |
| X-RateLimit-Used | Calls made today, including this one |
| X-RateLimit-Remaining | Calls left today |
| X-RateLimit-Reset | Seconds until midnight UTC |
| X-RateLimit-Warning | Present when you are close to the limit |
What went wrong, and what to do.
| Status | Meaning |
|---|---|
| 400 | A value is not allowed, such as n that isn't a multiple of 4, or a callback URL that isn't HTTPS. The error says which. |
| 401 | No X-API-Key header, or a request signature that is missing, wrong or more than 5 minutes off. |
| 403 | The key is invalid or revoked, your IP isn't on the key's allowlist, or a Free key asked for ibm_hardware. |
| 422 | A parameter has the wrong type or is out of range. |
| 429 | You've used today's calls (or today's direct IBM runs). They reset at midnight UTC. |
| 502 | The backend you chose (usually ibm_hardware) is unavailable. Retry, or use the default. |
| 503 | QuantumRand's database is briefly unreachable. Wait for the Retry-After seconds and try again. |